3 * Copyright 2006 The Android Open Source Project
5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file.
10 #ifndef SkPathParts_DEFINED
11 #define SkPathParts_DEFINED
13 #include "SkDisplayable.h"
14 #include "SkMemberInfo.h"
20 class SkPathPart : public SkDisplayable {
23 virtual bool add() = 0;
25 virtual SkDisplayable* getParent() const;
26 virtual bool setParent(SkDisplayable* parent);
28 virtual bool isPathPart() const { return true; }
34 class SkMoveTo : public SkPathPart {
35 DECLARE_MEMBER_INFO(MoveTo);
43 class SkRMoveTo : public SkMoveTo {
44 DECLARE_MEMBER_INFO(RMoveTo);
47 typedef SkMoveTo INHERITED;
50 class SkLineTo : public SkPathPart {
51 DECLARE_MEMBER_INFO(LineTo);
59 class SkRLineTo : public SkLineTo {
60 DECLARE_MEMBER_INFO(RLineTo);
63 typedef SkLineTo INHERITED;
66 class SkQuadTo : public SkPathPart {
67 DECLARE_MEMBER_INFO(QuadTo);
77 class SkRQuadTo : public SkQuadTo {
78 DECLARE_MEMBER_INFO(RQuadTo);
81 typedef SkQuadTo INHERITED;
84 class SkCubicTo : public SkPathPart {
85 DECLARE_MEMBER_INFO(CubicTo);
97 class SkRCubicTo : public SkCubicTo {
98 DECLARE_MEMBER_INFO(RCubicTo);
101 typedef SkCubicTo INHERITED;
104 class SkClose : public SkPathPart {
105 DECLARE_EMPTY_MEMBER_INFO(Close);
109 class SkAddGeom : public SkPathPart {
110 DECLARE_PRIVATE_MEMBER_INFO(AddGeom);
113 int /*SkPath::Direction*/ direction;
116 class SkAddRect : public SkAddGeom {
117 DECLARE_MEMBER_INFO(AddRect);
123 typedef SkAddGeom INHERITED;
126 class SkAddOval : public SkAddRect {
127 DECLARE_MEMBER_INFO(AddOval);
130 typedef SkAddRect INHERITED;
133 class SkAddCircle : public SkAddGeom {
134 DECLARE_MEMBER_INFO(AddCircle);
141 typedef SkAddGeom INHERITED;
144 class SkAddRoundRect : public SkAddRect {
145 DECLARE_MEMBER_INFO(AddRoundRect);
151 typedef SkAddRect INHERITED;
154 class SkAddPath : public SkPathPart {
155 DECLARE_MEMBER_INFO(AddPath);
159 typedef SkPathPart INHERITED;
160 SkDrawMatrix* matrix;
164 #endif // SkPathParts_DEFINED