diff options
author | deanm@chromium.org <deanm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-11 16:36:43 +0000 |
---|---|---|
committer | deanm@chromium.org <deanm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-11 16:36:43 +0000 |
commit | eb1d2a1e52a5832e3c2361eafd4a737e1cf0640d (patch) | |
tree | dff0c5280b056edb4ad78a798d685534b054945d /chrome/browser/gtk/nine_box.h | |
parent | 4e086463cb7de8e6c1538e7282d2ed260ae8099f (diff) | |
download | chromium_src-eb1d2a1e52a5832e3c2361eafd4a737e1cf0640d.zip chromium_src-eb1d2a1e52a5832e3c2361eafd4a737e1cf0640d.tar.gz chromium_src-eb1d2a1e52a5832e3c2361eafd4a737e1cf0640d.tar.bz2 |
Reimplement NineBox using Cairo.
- Fixes a bug we've had for a long time drawing the wrench button. We would
over-tile the center portion, and draw the right images on top of it.
- Move away from x1 .. x2 parameters to more clear width and height.
- Makes the code significantly more straightforward and efficient.
Review URL: http://codereview.chromium.org/115181
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15755 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk/nine_box.h')
-rw-r--r-- | chrome/browser/gtk/nine_box.h | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/chrome/browser/gtk/nine_box.h b/chrome/browser/gtk/nine_box.h index 950a359..4a23bb0 100644 --- a/chrome/browser/gtk/nine_box.h +++ b/chrome/browser/gtk/nine_box.h @@ -30,9 +30,9 @@ class NineBox { // The images will be tiled to fit into the widget. void RenderToWidget(GtkWidget* dst) const; - // Render the top row of images to |dst| between |x1| and |x2|. + // Render the top row of images to |dst| between |x1| and |x1| + |width|. // This is split from RenderToWidget so the toolbar can use it. - void RenderTopCenterStrip(GtkWidget* dst, int x1, int x2, int y1) const; + void RenderTopCenterStrip(cairo_t* cr, int x, int y, int width) const; // Change all pixels that are white in |images_| to have 0 opacity. void ChangeWhiteToTransparent(); @@ -45,9 +45,6 @@ class NineBox { void ContourWidget(GtkWidget* widget) const; private: - // Repeatedly stamp src across dst. - void TileImage(GtkWidget* dst, GdkPixbuf* src, - int x1, int y1, int x2, int y2) const; GdkPixbuf* images_[9]; }; |