OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include "chrome/browser/ui/gtk/nine_box.h" | 5 #include "chrome/browser/ui/gtk/nine_box.h" |
6 | 6 |
7 #include "app/resource_bundle.h" | |
8 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
9 #include "base/i18n/rtl.h" | 8 #include "base/i18n/rtl.h" |
10 #include "base/logging.h" | 9 #include "base/logging.h" |
11 #include "gfx/gtk_util.h" | 10 #include "gfx/gtk_util.h" |
12 #include "gfx/point.h" | 11 #include "gfx/point.h" |
| 12 #include "ui/base/resource/resource_bundle.h" |
13 | 13 |
14 namespace { | 14 namespace { |
15 | 15 |
16 // Draw pixbuf |src| into |dst| at position (x, y). | 16 // Draw pixbuf |src| into |dst| at position (x, y). |
17 void DrawPixbuf(cairo_t* cr, GdkPixbuf* src, int x, int y, double alpha) { | 17 void DrawPixbuf(cairo_t* cr, GdkPixbuf* src, int x, int y, double alpha) { |
18 gdk_cairo_set_source_pixbuf(cr, src, x, y); | 18 gdk_cairo_set_source_pixbuf(cr, src, x, y); |
19 cairo_paint_with_alpha(cr, alpha); | 19 cairo_paint_with_alpha(cr, alpha); |
20 } | 20 } |
21 | 21 |
22 // Tile pixbuf |src| across |cr| at |x|, |y| for |width| and |height|. | 22 // Tile pixbuf |src| across |cr| at |x|, |y| for |width| and |height|. |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 cairo_paint(flipped_cr); | 243 cairo_paint(flipped_cr); |
244 cairo_destroy(flipped_cr); | 244 cairo_destroy(flipped_cr); |
245 | 245 |
246 // Mask the widget. | 246 // Mask the widget. |
247 gtk_widget_shape_combine_mask(widget, flipped_mask, 0, 0); | 247 gtk_widget_shape_combine_mask(widget, flipped_mask, 0, 0); |
248 g_object_unref(flipped_mask); | 248 g_object_unref(flipped_mask); |
249 } | 249 } |
250 | 250 |
251 g_object_unref(mask); | 251 g_object_unref(mask); |
252 } | 252 } |
OLD | NEW |