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

Side by Side Diff: ui/gfx/canvas.h

Issue 1634103003: Fix gfx::Canvas::DrawStringRectWithHalo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: small fixes Created 4 years, 5 months 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
« no previous file with comments | « ui/compositor/layer_unittest.cc ('k') | ui/gfx/canvas_skia.cc » ('j') | 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 UI_GFX_CANVAS_H_ 5 #ifndef UI_GFX_CANVAS_H_
6 #define UI_GFX_CANVAS_H_ 6 #define UI_GFX_CANVAS_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 NO_ELLIPSIS = 1 << 7, 66 NO_ELLIPSIS = 1 << 7,
67 67
68 // Specifies if words can be split by new lines. 68 // Specifies if words can be split by new lines.
69 // This only works with MULTI_LINE. 69 // This only works with MULTI_LINE.
70 CHARACTER_BREAK = 1 << 8, 70 CHARACTER_BREAK = 1 << 8,
71 71
72 // Instructs DrawStringRect() to not use subpixel rendering. This is useful 72 // Instructs DrawStringRect() to not use subpixel rendering. This is useful
73 // when rendering text onto a fully- or partially-transparent background 73 // when rendering text onto a fully- or partially-transparent background
74 // that will later be blended with another image. 74 // that will later be blended with another image.
75 NO_SUBPIXEL_RENDERING = 1 << 9, 75 NO_SUBPIXEL_RENDERING = 1 << 9,
76
77 // Draw text with 1px border.
78 HALO_EFFECT = 1 << 10,
76 }; 79 };
77 80
78 // Creates an empty canvas with image_scale of 1x. 81 // Creates an empty canvas with image_scale of 1x.
79 Canvas(); 82 Canvas();
80 83
81 // Creates canvas with provided DIP |size| and |image_scale|. 84 // Creates canvas with provided DIP |size| and |image_scale|.
82 // If this canvas is not opaque, it's explicitly cleared to transparent before 85 // If this canvas is not opaque, it's explicitly cleared to transparent before
83 // being returned. 86 // being returned.
84 Canvas(const Size& size, float image_scale, bool is_opaque); 87 Canvas(const Size& size, float image_scale, bool is_opaque);
85 88
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 float image_scale_; 457 float image_scale_;
455 458
456 sk_sp<SkCanvas> canvas_; 459 sk_sp<SkCanvas> canvas_;
457 460
458 DISALLOW_COPY_AND_ASSIGN(Canvas); 461 DISALLOW_COPY_AND_ASSIGN(Canvas);
459 }; 462 };
460 463
461 } // namespace gfx 464 } // namespace gfx
462 465
463 #endif // UI_GFX_CANVAS_H_ 466 #endif // UI_GFX_CANVAS_H_
OLDNEW
« no previous file with comments | « ui/compositor/layer_unittest.cc ('k') | ui/gfx/canvas_skia.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698