| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_GTK_NINE_BOX_H_ | 5 #ifndef CHROME_BROWSER_GTK_NINE_BOX_H_ |
| 6 #define CHROME_BROWSER_GTK_NINE_BOX_H_ | 6 #define CHROME_BROWSER_GTK_NINE_BOX_H_ |
| 7 | 7 |
| 8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
| 9 | 9 |
| 10 // A NineBox manages a set of source images representing a 3x3 grid, where | 10 // A NineBox manages a set of source images representing a 3x3 grid, where |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 // Takes ownership of each image, but not the |images| array. | 24 // Takes ownership of each image, but not the |images| array. |
| 25 NineBox(GdkPixbuf* images[9]); | 25 NineBox(GdkPixbuf* images[9]); |
| 26 ~NineBox(); | 26 ~NineBox(); |
| 27 | 27 |
| 28 // Render the NineBox to |dst|. | 28 // Render the NineBox to |dst|. |
| 29 // The images will be tiled to fit into the widget. | 29 // The images will be tiled to fit into the widget. |
| 30 void RenderToWidget(GtkWidget* dst); | 30 void RenderToWidget(GtkWidget* dst); |
| 31 | 31 |
| 32 // Render the top row of images to |dst| between |x1| and |x2|. | 32 // Render the top row of images to |dst| between |x1| and |x2|. |
| 33 // This is split from RenderToWidget so the toolbar can use it. | 33 // This is split from RenderToWidget so the toolbar can use it. |
| 34 void RenderTopCenterStrip(GtkWidget* dst, int x1, int x2); | 34 void RenderTopCenterStrip(GtkWidget* dst, int x1, int x2, int y1); |
| 35 | 35 |
| 36 private: | 36 private: |
| 37 // Repeatedly stamp src across dst. | 37 // Repeatedly stamp src across dst. |
| 38 void TileImage(GtkWidget* dst, GdkPixbuf* src, | 38 void TileImage(GtkWidget* dst, GdkPixbuf* src, |
| 39 int x1, int y1, int x2, int y2); | 39 int x1, int y1, int x2, int y2); |
| 40 | 40 |
| 41 GdkPixbuf* images_[9]; | 41 GdkPixbuf* images_[9]; |
| 42 }; | 42 }; |
| 43 | 43 |
| 44 #endif // CHROME_BROWSER_GTK_NINE_BOX_H_ | 44 #endif // CHROME_BROWSER_GTK_NINE_BOX_H_ |
| OLD | NEW |