コード例 #1
0
ファイル: PrintContextTest.cpp プロジェクト: kjthegod/WebKit
 virtual void onDrawPoints(PointMode mode, size_t count, const SkPoint pts[], const SkPaint& paint) override
 {
     ASSERT_EQ(1u, count); // Only called from drawPoint().
     ASSERT_TRUE(paint.getAnnotation());
     Operation operation = { DrawPoint, SkRect::MakeXYWH(pts[0].x(), pts[0].y(), 0, 0) };
     m_recordedOperations.append(operation);
 }
コード例 #2
0
 void onDrawRect(const SkRect& rect, const SkPaint& paint) override
 {
     if (!paint.getAnnotation())
         return;
     Operation operation = { DrawRect, rect };
     getTotalMatrix().mapRect(&operation.rect);
     m_recordedOperations.append(operation);
 }
コード例 #3
0
 void onDrawPoints(PointMode mode, size_t count, const SkPoint pts[], const SkPaint& paint) override
 {
     if (!paint.getAnnotation())
         return;
     ASSERT_EQ(1u, count); // Only called from drawPoint().
     SkPoint point = getTotalMatrix().mapXY(pts[0].x(), pts[0].y());
     Operation operation = { DrawPoint, SkRect::MakeXYWH(point.x(), point.y(), 0, 0) };
     m_recordedOperations.append(operation);
 }
コード例 #4
0
ファイル: PrintContextTest.cpp プロジェクト: kjthegod/WebKit
 virtual void onDrawRect(const SkRect& rect, const SkPaint& paint) override
 {
     ASSERT_TRUE(paint.getAnnotation());
     Operation operation = { DrawRect, rect };
     m_recordedOperations.append(operation);
 }