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

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') | ui/gfx/nine_image_painter.cc » ('J')
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..d09f95c8428bd4192715e06c954f72c8ed04c55c 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;
« no previous file with comments | « no previous file | ui/gfx/nine_image_painter.cc » ('j') | ui/gfx/nine_image_painter.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698