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

Unified Diff: sky/engine/core/painting/Canvas.cpp

Issue 1161813005: Implement a simple checkbox in Sky’s fn2 components library (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: rebase Created 5 years, 6 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
« no previous file with comments | « sky/engine/core/painting/Canvas.h ('k') | sky/engine/core/painting/Canvas.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/painting/Canvas.cpp
diff --git a/sky/engine/core/painting/Canvas.cpp b/sky/engine/core/painting/Canvas.cpp
index ccd4fafaaab251d0ded2f7588551e66505796281..00552d94a452a6af88a4fbcf7b756f80d0f9dcfb 100644
--- a/sky/engine/core/painting/Canvas.cpp
+++ b/sky/engine/core/painting/Canvas.cpp
@@ -115,6 +115,15 @@ void Canvas::clipRect(const Rect& rect)
m_canvas->clipRect(rect.sk_rect);
}
+void Canvas::drawLine(float x0, float y0, float x1, float y1, const Paint* paint)
+{
+ if (!m_canvas)
+ return;
+ ASSERT(paint);
+ ASSERT(m_displayList->isRecording());
+ m_canvas->drawLine(x0, y0, x1, y1, paint->paint());
+}
+
void Canvas::drawPicture(Picture* picture)
{
if (!m_canvas)
@@ -142,6 +151,16 @@ void Canvas::drawRect(const Rect& rect, const Paint* paint)
m_canvas->drawRect(rect.sk_rect, paint->paint());
}
+void Canvas::drawRRect(const RRect* rrect, const Paint* paint)
+{
+ if (!m_canvas)
+ return;
+ ASSERT(rrect);
+ ASSERT(paint);
+ ASSERT(m_displayList->isRecording());
+ m_canvas->drawRRect(rrect->rrect(), paint->paint());
+}
+
void Canvas::drawOval(const Rect& rect, const Paint* paint)
{
if (!m_canvas)
« no previous file with comments | « sky/engine/core/painting/Canvas.h ('k') | sky/engine/core/painting/Canvas.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698