Ejemplo n.º 1
0
 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);
 }
 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);
 }
 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);
 }
Ejemplo n.º 4
0
 virtual void onDrawRect(const SkRect& rect, const SkPaint& paint) override
 {
     ASSERT_TRUE(paint.getAnnotation());
     Operation operation = { DrawRect, rect };
     m_recordedOperations.append(operation);
 }