OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #include "cc/pinch_zoom_scrollbar_painter.h" | |
6 | |
7 #include "third_party/skia/include/core/SkCanvas.h" | |
8 #include "ui/gfx/rect.h" | |
9 | |
10 namespace cc { | |
11 | |
12 PinchZoomScrollbarPainter::~PinchZoomScrollbarPainter() {} | |
13 | |
14 void PinchZoomScrollbarPainter::PaintScrollbarBackground(SkCanvas*, const gfx::R ect&) { | |
jamesr
2013/02/26 20:48:46
line wrap
wjmaclean
2013/03/01 15:30:32
Done.
| |
15 } | |
16 | |
17 void PinchZoomScrollbarPainter::PaintTrackBackground(SkCanvas*, const gfx::Rect& ) { | |
18 } | |
19 | |
20 void PinchZoomScrollbarPainter::PaintBackTrackPart(SkCanvas*, const gfx::Rect&) { | |
21 } | |
22 | |
23 void PinchZoomScrollbarPainter::PaintForwardTrackPart(SkCanvas*, const gfx::Rect &) { | |
24 } | |
25 | |
26 void PinchZoomScrollbarPainter::PaintBackButtonStart(SkCanvas*, const gfx::Rect& ) { | |
27 } | |
28 | |
29 void PinchZoomScrollbarPainter::PaintBackButtonEnd(SkCanvas*, const gfx::Rect&) { | |
30 } | |
31 | |
32 void PinchZoomScrollbarPainter::PaintForwardButtonStart(SkCanvas*, const gfx::Re ct&) { | |
33 } | |
34 | |
35 void PinchZoomScrollbarPainter::PaintForwardButtonEnd(SkCanvas*, const gfx::Rect &) { | |
36 } | |
37 | |
38 void PinchZoomScrollbarPainter::PaintTickmarks(SkCanvas*, const gfx::Rect&) { | |
39 } | |
40 | |
41 void PinchZoomScrollbarPainter::PaintThumb(SkCanvas* canvas, | |
42 const gfx::Rect& thumb_rect) { | |
43 canvas->clear(SkColorSetARGB(0, 0, 0, 0)); | |
44 SkPaint paint; | |
45 | |
46 // TODO(wjmaclean): currently the pinch-zoom overlay scrollbars are | |
47 // drawn as grey, but need to check this with UX design. | |
48 paint.setColor(SkColorSetARGB(128, 32, 32, 32)); | |
49 SkScalar border = 2; | |
50 SkScalar corner_radius = 2; | |
51 SkRect rect = SkRect::MakeXYWH(border, border, | |
52 thumb_rect.width() - 2 * border, | |
53 thumb_rect.height() - 2 * border); | |
54 canvas->drawRoundRect(rect, corner_radius, corner_radius, paint); | |
55 } | |
56 | |
57 } // namespace cc | |
OLD | NEW |