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

Unified Diff: ui/base/nine_image_painter_factory.h

Issue 806433002: Support horizontal/vertical only images in NineImagePainter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/gfx/nine_image_painter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/nine_image_painter_factory.h
diff --git a/ui/base/nine_image_painter_factory.h b/ui/base/nine_image_painter_factory.h
index 8a622839f4f3fd95b3c217fe24485e2bc6753136..9d8f4daede4e6a04c26d06d9f84c6d227ed25d53 100644
--- a/ui/base/nine_image_painter_factory.h
+++ b/ui/base/nine_image_painter_factory.h
@@ -23,6 +23,17 @@
x ## _LEFT, EMPTY_IMAGE, x ## _RIGHT, \
x ## _BOTTOM_LEFT, x ## _BOTTOM, x ## _BOTTOM_RIGHT, }
+// A macro to define arrays of IDR constants used with CreateImageGridPainter
+// where it can only be streched horizontally.
+#define IMAGE_GRID_HORIZONTAL(x) { x ## _LEFT, x ## _CENTER, x ## _RIGHT, \
+ EMPTY_IMAGE, EMPTY_IMAGE, EMPTY_IMAGE, \
+ EMPTY_IMAGE, EMPTY_IMAGE, EMPTY_IMAGE}
+
+// A macro to define arrays of IDR constants used with CreateImageGridPainter
+// where it can only be streched vertically.
+#define IMAGE_GRID_VERTICAL(x) { x ## _TOP, EMPTY_IMAGE, EMPTY_IMAGE, \
+ x ## _CENTER, EMPTY_IMAGE, EMPTY_IMAGE, \
+ x ## _BOTTOM, EMPTY_IMAGE, EMPTY_IMAGE}
namespace gfx {
class NineImagePainter;
@@ -30,6 +41,8 @@ class NineImagePainter;
namespace ui {
+const int kImageGridNum = 9;
oshima 2014/12/15 19:25:25 I added this to be used to define array of the ima
oshima 2014/12/15 21:26:38 you didn't seem to like it, so removed. PTAL
+
// Creates a NineImagePainter from an array of image ids. It's expected the
// array came from the IMAGE_GRID macro.
UI_BASE_EXPORT scoped_ptr<gfx::NineImagePainter> CreateNineImagePainter(
« no previous file with comments | « no previous file | ui/gfx/nine_image_painter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698