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

Unified Diff: ui/gfx/canvas.h

Issue 1428623005: views::Border: Added CreateRoundedRectBorder. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@boxlayout-collapse_when_hidden
Patch Set: Explain why the float version is preferred. Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/gfx/canvas.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/canvas.h
diff --git a/ui/gfx/canvas.h b/ui/gfx/canvas.h
index 0c409447a8ac7e43e58842178ba425e20a9d14bd..cdaee8e1bd0285a3019cbc480b314c07b94165cf 100644
--- a/ui/gfx/canvas.h
+++ b/ui/gfx/canvas.h
@@ -20,6 +20,7 @@
namespace gfx {
class Rect;
+class RectF;
class FontList;
class Point;
class Size;
@@ -248,9 +249,15 @@ class GFX_EXPORT Canvas {
const SkPaint& paint);
// Draws the given rectangle with rounded corners of |radius| using the
- // given |paint| parameters.
+ // given |paint| parameters. NOTE: The RectF version is preferred because the
+ // rectangle should be painted at a half-pixel offset when painting with
+ // odd-numbered thickness.
Evan Stade 2015/11/10 00:34:32 I don't even think you need to write this much. I'
Matt Giuca 2015/11/10 00:53:15 Done.
void DrawRoundRect(const Rect& rect, int radius, const SkPaint& paint);
+ // Draws the given rectangle with rounded corners of |radius| using the
+ // given |paint| parameters.
+ void DrawRoundRect(const RectF& rect, float radius, const SkPaint& paint);
+
// Draws the given path using the given |paint| parameters.
void DrawPath(const SkPath& path, const SkPaint& paint);
« no previous file with comments | « no previous file | ui/gfx/canvas.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698