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 #include "gfx/canvas_skia.h" | 5 #include "gfx/canvas_skia.h" |
6 | 6 |
7 #include <cairo/cairo.h> | 7 #include <cairo/cairo.h> |
8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
9 #include <pango/pango.h> | 9 #include <pango/pango.h> |
10 #include <pango/pangocairo.h> | 10 #include <pango/pangocairo.h> |
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 | 271 |
272 cairo_move_to(text_cr, 1, 1); | 272 cairo_move_to(text_cr, 1, 1); |
273 pango_cairo_layout_path(text_cr, layout_); | 273 pango_cairo_layout_path(text_cr, layout_); |
274 | 274 |
275 cairo_set_source_rgba(text_cr, | 275 cairo_set_source_rgba(text_cr, |
276 SkColorGetR(halo_color) / 255.0, | 276 SkColorGetR(halo_color) / 255.0, |
277 SkColorGetG(halo_color) / 255.0, | 277 SkColorGetG(halo_color) / 255.0, |
278 SkColorGetB(halo_color) / 255.0, | 278 SkColorGetB(halo_color) / 255.0, |
279 SkColorGetA(halo_color) / 255.0); | 279 SkColorGetA(halo_color) / 255.0); |
280 cairo_set_line_width(text_cr, 2.0); | 280 cairo_set_line_width(text_cr, 2.0); |
| 281 cairo_set_line_join(text_cr, CAIRO_LINE_JOIN_ROUND); |
281 cairo_stroke_preserve(text_cr); | 282 cairo_stroke_preserve(text_cr); |
282 | 283 |
283 cairo_set_operator(text_cr, CAIRO_OPERATOR_SOURCE); | 284 cairo_set_operator(text_cr, CAIRO_OPERATOR_SOURCE); |
284 cairo_set_source_rgba(text_cr, | 285 cairo_set_source_rgba(text_cr, |
285 SkColorGetR(text_color) / 255.0, | 286 SkColorGetR(text_color) / 255.0, |
286 SkColorGetG(text_color) / 255.0, | 287 SkColorGetG(text_color) / 255.0, |
287 SkColorGetB(text_color) / 255.0, | 288 SkColorGetB(text_color) / 255.0, |
288 SkColorGetA(text_color) / 255.0); | 289 SkColorGetA(text_color) / 255.0); |
289 cairo_fill(text_cr); | 290 cairo_fill(text_cr); |
290 | 291 |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
378 NOTREACHED(); | 379 NOTREACHED(); |
379 return; | 380 return; |
380 } | 381 } |
381 | 382 |
382 cairo_t* cr = beginPlatformPaint(); | 383 cairo_t* cr = beginPlatformPaint(); |
383 gdk_cairo_set_source_pixbuf(cr, pixbuf, x, y); | 384 gdk_cairo_set_source_pixbuf(cr, pixbuf, x, y); |
384 cairo_paint(cr); | 385 cairo_paint(cr); |
385 } | 386 } |
386 | 387 |
387 } // namespace gfx | 388 } // namespace gfx |
OLD | NEW |