Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(633)

Side by Side Diff: ui/gfx/nine_image_painter.h

Issue 143953007: Changes look for scrollbars on windows (2) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/gfx/gfx.gyp ('k') | ui/gfx/nine_image_painter.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2014 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 #ifndef UI_GFX_NINE_IMAGE_PAINTER_H_
6 #define UI_GFX_NINE_IMAGE_PAINTER_H_
7
8 #include "base/logging.h"
9 #include "ui/gfx/gfx_export.h"
10 #include "ui/gfx/image/image_skia.h"
11
12 namespace gfx {
13
14 class Canvas;
15 class Insets;
16 class Rect;
17
18 class GFX_EXPORT NineImagePainter {
19 public:
20 explicit NineImagePainter(const std::vector<ImageSkia>& images);
21 NineImagePainter(const ImageSkia& image, const Insets& insets);
22 ~NineImagePainter();
23
24 bool IsEmpty() const;
25 Size GetMinimumSize() const;
26 void Paint(Canvas* canvas, const Rect& bounds);
27
28 private:
29 // Stretches the given image over the specified canvas area.
30 static void Fill(Canvas* c,
31 const ImageSkia& i,
32 int x,
33 int y,
34 int w,
35 int h);
36
37 // Images are numbered as depicted below.
38 // ____________________
39 // |__i0__|__i1__|__i2__|
40 // |__i3__|__i4__|__i5__|
41 // |__i6__|__i7__|__i8__|
42 ImageSkia images_[9];
43
44 DISALLOW_COPY_AND_ASSIGN(NineImagePainter);
45 };
46
47 } // namespace gfx
48
49 #endif // UI_GFX_NINE_IMAGE_PAINTER_H_
OLDNEW
« no previous file with comments | « ui/gfx/gfx.gyp ('k') | ui/gfx/nine_image_painter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698