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

Side by Side Diff: gfx/canvas_skia_linux.cc

Issue 5522007: ChromeOS status text halo polish. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address davemoore's comment Created 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/chromeos/status/status_area_button.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/status/status_area_button.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698