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

Unified Diff: third_party/WebKit/Source/platform/graphics/StrokeData.h

Issue 2711983002: Paint dotted borders using circular dots (Closed)
Patch Set: Refactor isDashedStroke Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/graphics/StrokeData.h
diff --git a/third_party/WebKit/Source/platform/graphics/StrokeData.h b/third_party/WebKit/Source/platform/graphics/StrokeData.h
index 6bad59cad2723bac1a90520db92ea05068f56fd0..f39dffc800ad3aa7bc142282faa75283ec971a6d 100644
--- a/third_party/WebKit/Source/platform/graphics/StrokeData.h
+++ b/third_party/WebKit/Source/platform/graphics/StrokeData.h
@@ -82,6 +82,11 @@ class PLATFORM_EXPORT StrokeData final {
// line will be adjusted to start and end that length with a dash/dot.
void setupPaintDashPathEffect(PaintFlags*, int) const;
+ // Determine whether a stroked line should be drawn using dashes. In practice,
+ // we draw dashes when a dashed stroke is specified or when a dotted stroke
+ // is specified but the line width is too small to draw circles.
+ static bool strokeIsDashed(float width, StrokeStyle);
+
private:
StrokeStyle m_style;
float m_thickness;

Powered by Google App Engine
This is Rietveld 408576698