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

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: Created 4 years, 10 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
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 <vector> 10 #include <vector>
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 NO_ELLIPSIS = 1 << 7, 65 NO_ELLIPSIS = 1 << 7,
66 66
67 // Specifies if words can be split by new lines. 67 // Specifies if words can be split by new lines.
68 // This only works with MULTI_LINE. 68 // This only works with MULTI_LINE.
69 CHARACTER_BREAK = 1 << 8, 69 CHARACTER_BREAK = 1 << 8,
70 70
71 // Instructs DrawStringRect() to not use subpixel rendering. This is useful 71 // Instructs DrawStringRect() to not use subpixel rendering. This is useful
72 // when rendering text onto a fully- or partially-transparent background 72 // when rendering text onto a fully- or partially-transparent background
73 // that will later be blended with another image. 73 // that will later be blended with another image.
74 NO_SUBPIXEL_RENDERING = 1 << 9, 74 NO_SUBPIXEL_RENDERING = 1 << 9,
75
76 // Draw text with 1px border.
77 HALO_EFFECT = 1 << 10,
75 }; 78 };
76 79
77 // Creates an empty canvas with image_scale of 1x. 80 // Creates an empty canvas with image_scale of 1x.
78 Canvas(); 81 Canvas();
79 82
80 // Creates canvas with provided DIP |size| and |image_scale|. 83 // Creates canvas with provided DIP |size| and |image_scale|.
81 // If this canvas is not opaque, it's explicitly cleared to transparent before 84 // If this canvas is not opaque, it's explicitly cleared to transparent before
82 // being returned. 85 // being returned.
83 Canvas(const Size& size, float image_scale, bool is_opaque); 86 Canvas(const Size& size, float image_scale, bool is_opaque);
84 87
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 444
442 skia::RefPtr<skia::PlatformCanvas> owned_canvas_; 445 skia::RefPtr<skia::PlatformCanvas> owned_canvas_;
443 SkCanvas* canvas_; 446 SkCanvas* canvas_;
444 447
445 DISALLOW_COPY_AND_ASSIGN(Canvas); 448 DISALLOW_COPY_AND_ASSIGN(Canvas);
446 }; 449 };
447 450
448 } // namespace gfx 451 } // namespace gfx
449 452
450 #endif // UI_GFX_CANVAS_H_ 453 #endif // UI_GFX_CANVAS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698