summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsubhransu mohanty <sub.mohanty@samsung.com>2018-07-11 12:17:17 +0900
committersubhransu mohanty <sub.mohanty@samsung.com>2018-07-11 12:17:17 +0900
commit2d88f7aaa1947b4eab68f3ec4520d0c70567ba39 (patch)
treee35400286e2d4d98cf67b8d6ac33bf14c9201e42
parent742bc0222e822faed5ae995d616da563c242bc93 (diff)
lottie: renamed sgpath to vpath
-rw-r--r--example/pathtest.cpp22
-rw-r--r--src/ftraster/ftraster.cpp12
-rw-r--r--src/ftraster/ftraster_p.h4
-rw-r--r--src/lottie/lottieitem.cpp36
-rw-r--r--src/lottie/lottieitem.h24
-rw-r--r--src/lottie/lottiemodel.h6
-rw-r--r--src/vector/vdasher.cpp18
-rw-r--r--src/vector/vdasher.h4
-rw-r--r--src/vector/vpath.cpp110
-rw-r--r--src/vector/vpath.h48
-rw-r--r--src/vector/vpathmesure.cpp4
-rw-r--r--src/vector/vpathmesure.h12
-rw-r--r--test/testftraster.cpp2
13 files changed, 151 insertions, 151 deletions
diff --git a/example/pathtest.cpp b/example/pathtest.cpp
index 1ea6361..5005a1f 100644
--- a/example/pathtest.cpp
+++ b/example/pathtest.cpp
@@ -32,27 +32,27 @@ public:
32 evas_vg_shape_stroke_width_set(mShape, w); 32 evas_vg_shape_stroke_width_set(mShape, w);
33 } 33 }
34 34
35 void setPath(const SGPath &path) { 35 void setPath(const VPath &path) {
36 Efl_VG *shape = mShape; 36 Efl_VG *shape = mShape;
37 evas_vg_shape_reset(shape); 37 evas_vg_shape_reset(shape);
38 const std::vector<SGPath::Element> &elm = path.elements(); 38 const std::vector<VPath::Element> &elm = path.elements();
39 const std::vector<SGPointF> &pts = path.points(); 39 const std::vector<SGPointF> &pts = path.points();
40 int i=0; 40 int i=0;
41 for (auto e : elm) { 41 for (auto e : elm) {
42 switch(e) { 42 switch(e) {
43 case SGPath::Element::MoveTo: 43 case VPath::Element::MoveTo:
44 { 44 {
45 SGPointF p = pts[i++]; 45 SGPointF p = pts[i++];
46 evas_vg_shape_append_move_to(shape, p.x(), p.y()); 46 evas_vg_shape_append_move_to(shape, p.x(), p.y());
47 break; 47 break;
48 } 48 }
49 case SGPath::Element::LineTo: 49 case VPath::Element::LineTo:
50 { 50 {
51 SGPointF p = pts[i++]; 51 SGPointF p = pts[i++];
52 evas_vg_shape_append_line_to(shape, p.x(), p.y()); 52 evas_vg_shape_append_line_to(shape, p.x(), p.y());
53 break; 53 break;
54 } 54 }
55 case SGPath::Element::CubicTo: 55 case VPath::Element::CubicTo:
56 { 56 {
57 SGPointF p = pts[i++]; 57 SGPointF p = pts[i++];
58 SGPointF p1 = pts[i++]; 58 SGPointF p1 = pts[i++];
@@ -60,7 +60,7 @@ public:
60 evas_vg_shape_append_cubic_to(shape, p.x(), p.y(), p1.x(), p1.y(), p2.x(), p2.y()); 60 evas_vg_shape_append_cubic_to(shape, p.x(), p.y(), p1.x(), p1.y(), p2.x(), p2.y());
61 break; 61 break;
62 } 62 }
63 case SGPath::Element::Close: 63 case VPath::Element::Close:
64 { 64 {
65 evas_vg_shape_append_close(shape); 65 evas_vg_shape_append_close(shape);
66 break; 66 break;
@@ -81,15 +81,15 @@ main(void)
81 ecore_evas_callback_resize_set(APP->mEcoreEvas, _on_resize); 81 ecore_evas_callback_resize_set(APP->mEcoreEvas, _on_resize);
82 APP->setup(); 82 APP->setup();
83 83
84 SGPath path; 84 VPath path;
85 path.addRoundRect(SGRectF(100, 100, 200, 200), 20, 20, SGPath::Direction::CCW); 85 path.addRoundRect(SGRectF(100, 100, 200, 200), 20, 20, VPath::Direction::CCW);
86 path.addCircle(50, 50, 20, SGPath::Direction::CCW); 86 path.addCircle(50, 50, 20, VPath::Direction::CCW);
87 87
88 path.addOval(SGRectF(300, 100, 100, 50), SGPath::Direction::CCW); 88 path.addOval(SGRectF(300, 100, 100, 50), VPath::Direction::CCW);
89 89
90 path.addPolystarStar(0.0, 150, 150, 15.0, 90 path.addPolystarStar(0.0, 150, 150, 15.0,
91 106.0, 34.0, 91 106.0, 34.0,
92 231.0, 88.0, SGPath::Direction::CW); 92 231.0, 88.0, VPath::Direction::CW);
93 93
94 94
95 PathTest test(APP); 95 PathTest test(APP);
diff --git a/src/ftraster/ftraster.cpp b/src/ftraster/ftraster.cpp
index 8b09d4c..82650de 100644
--- a/src/ftraster/ftraster.cpp
+++ b/src/ftraster/ftraster.cpp
@@ -212,12 +212,12 @@ void FTRaster::deleteFTOutline(FTOutline *outline)
212 delete outline; 212 delete outline;
213} 213}
214 214
215FTOutline *FTRaster::toFTOutline(const SGPath &path) 215FTOutline *FTRaster::toFTOutline(const VPath &path)
216{ 216{
217 if (path.isEmpty()) 217 if (path.isEmpty())
218 return nullptr; 218 return nullptr;
219 219
220 const std::vector<SGPath::Element> &elements = path.elements(); 220 const std::vector<VPath::Element> &elements = path.elements();
221 const std::vector<SGPointF> &points = path.points(); 221 const std::vector<SGPointF> &points = path.points();
222 222
223 FTOutline *outline = new FTOutline(points.size(), path.segments()); 223 FTOutline *outline = new FTOutline(points.size(), path.segments());
@@ -225,19 +225,19 @@ FTOutline *FTRaster::toFTOutline(const SGPath &path)
225 int index = 0; 225 int index = 0;
226 for(auto element : elements) { 226 for(auto element : elements) {
227 switch (element){ 227 switch (element){
228 case SGPath::Element::MoveTo: 228 case VPath::Element::MoveTo:
229 outline->moveTo(points[index]); 229 outline->moveTo(points[index]);
230 index++; 230 index++;
231 break; 231 break;
232 case SGPath::Element::LineTo: 232 case VPath::Element::LineTo:
233 outline->lineTo(points[index]); 233 outline->lineTo(points[index]);
234 index++; 234 index++;
235 break; 235 break;
236 case SGPath::Element::CubicTo: 236 case VPath::Element::CubicTo:
237 outline->cubicTo(points[index], points[index+1], points[index+2]); 237 outline->cubicTo(points[index], points[index+1], points[index+2]);
238 index = index+3; 238 index = index+3;
239 break; 239 break;
240 case SGPath::Element::Close: 240 case VPath::Element::Close:
241 outline->close(); 241 outline->close();
242 break; 242 break;
243 default: 243 default:
diff --git a/src/ftraster/ftraster_p.h b/src/ftraster/ftraster_p.h
index 0934f47..0cc112a 100644
--- a/src/ftraster/ftraster_p.h
+++ b/src/ftraster/ftraster_p.h
@@ -4,7 +4,7 @@
4#include<future> 4#include<future>
5 5
6struct FTOutline; 6struct FTOutline;
7class SGPath; 7class VPath;
8 8
9struct FTRasterPrivate; 9struct FTRasterPrivate;
10class FTRaster 10class FTRaster
@@ -21,7 +21,7 @@ public:
21 FTRaster& operator=(FTRaster const&) = delete; 21 FTRaster& operator=(FTRaster const&) = delete;
22 FTRaster& operator=(FTRaster &&) = delete; 22 FTRaster& operator=(FTRaster &&) = delete;
23 23
24 static FTOutline *toFTOutline(const SGPath &path); 24 static FTOutline *toFTOutline(const VPath &path);
25 static void deleteFTOutline(FTOutline *); 25 static void deleteFTOutline(FTOutline *);
26 SGRle generateFillInfo(const FTOutline *); 26 SGRle generateFillInfo(const FTOutline *);
27 SGRle generateStrokeInfo(const FTOutline *, CapStyle cap, JoinStyle join, double width); 27 SGRle generateStrokeInfo(const FTOutline *, CapStyle cap, JoinStyle join, double width);
diff --git a/src/lottie/lottieitem.cpp b/src/lottie/lottieitem.cpp
index 100faec..df77c5d 100644
--- a/src/lottie/lottieitem.cpp
+++ b/src/lottie/lottieitem.cpp
@@ -21,7 +21,7 @@ void VDrawable::preprocess()
21{ 21{
22 if (mFlag & (DirtyState::Path)) { 22 if (mFlag & (DirtyState::Path)) {
23 if (mStroke.enable) { 23 if (mStroke.enable) {
24 SGPath newPath = mPath; 24 VPath newPath = mPath;
25 if (mStroke.dashArraySize) { 25 if (mStroke.dashArraySize) {
26 VDasher dasher(mStroke.dashArray, mStroke.dashArraySize); 26 VDasher dasher(mStroke.dashArray, mStroke.dashArraySize);
27 newPath = dasher.dashed(mPath); 27 newPath = dasher.dashed(mPath);
@@ -60,7 +60,7 @@ void VDrawable::sync()
60 if (mFlag & DirtyState::None) return; 60 if (mFlag & DirtyState::None) return;
61 61
62 if (mFlag & DirtyState::Path) { 62 if (mFlag & DirtyState::Path) {
63 const std::vector<SGPath::Element> &elm = mPath.elements(); 63 const std::vector<VPath::Element> &elm = mPath.elements();
64 const std::vector<SGPointF> &pts = mPath.points(); 64 const std::vector<SGPointF> &pts = mPath.points();
65 const float *ptPtr = reinterpret_cast<const float *>(pts.data()); 65 const float *ptPtr = reinterpret_cast<const float *>(pts.data());
66 const char *elmPtr = reinterpret_cast<const char *>(elm.data()); 66 const char *elmPtr = reinterpret_cast<const char *>(elm.data());
@@ -311,7 +311,7 @@ bool LOTCompItem::render(const LOTBuffer &buffer)
311// } 311// }
312// } else if(i->mType == LOTNode::TypeStroke) { 312// } else if(i->mType == LOTNode::TypeStroke) {
313// if (i->mFlag & ChangeFlagPath) { 313// if (i->mFlag & ChangeFlagPath) {
314// SGPath final = i->mFinalPath; 314// VPath final = i->mFinalPath;
315// if (i->mStroke.dashArraySize) { 315// if (i->mStroke.dashArraySize) {
316// VDasher dasher(i->mStroke.dashArray, i->mStroke.dashArraySize); 316// VDasher dasher(i->mStroke.dashArray, i->mStroke.dashArraySize);
317// final = dasher.dashed(i->mFinalPath); 317// final = dasher.dashed(i->mFinalPath);
@@ -352,7 +352,7 @@ void LOTMaskItem::update(int frameNo, const SGMatrix &parentMatrix,
352 float opacity = mData->opacity(frameNo); 352 float opacity = mData->opacity(frameNo);
353 opacity = opacity * parentAlpha; 353 opacity = opacity * parentAlpha;
354 354
355 SGPath path = mLocalPath; 355 VPath path = mLocalPath;
356 path.transform(parentMatrix); 356 path.transform(parentMatrix);
357 357
358 FTOutline *outline = FTRaster::toFTOutline(path); 358 FTOutline *outline = FTRaster::toFTOutline(path);
@@ -565,7 +565,7 @@ void LOTSolidLayerItem::updateContent()
565 } 565 }
566 566
567 if (flag() & DirtyFlagBit::Matrix) { 567 if (flag() & DirtyFlagBit::Matrix) {
568 SGPath path; 568 VPath path;
569 path.addRect(SGRectF(0, 0, mLayerData->solidWidth(), mLayerData->solidHeight())); 569 path.addRect(SGRectF(0, 0, mLayerData->solidWidth(), mLayerData->solidHeight()));
570 path.transform(combinedMatrix()); 570 path.transform(combinedMatrix());
571 mRenderNode->mFlag |= VDrawable::DirtyState::Path; 571 mRenderNode->mFlag |= VDrawable::DirtyState::Path;
@@ -668,12 +668,12 @@ void LOTShapeLayerItem::renderList(std::vector<VDrawable *> &list)
668 mRoot->renderList(list); 668 mRoot->renderList(list);
669} 669}
670 670
671SGPath::Direction LOTContentItem::direction(bool isCW) 671VPath::Direction LOTContentItem::direction(bool isCW)
672{ 672{
673 if (isCW) 673 if (isCW)
674 return SGPath::Direction::CW; 674 return VPath::Direction::CW;
675 else 675 else
676 return SGPath::Direction::CCW; 676 return VPath::Direction::CCW;
677} 677}
678 678
679 679
@@ -808,7 +808,7 @@ void LOTPathDataItem::renderList(std::vector<VDrawable *> &list)
808 } 808 }
809} 809}
810 810
811SGPath LOTPathDataItem::path() const 811VPath LOTPathDataItem::path() const
812{ 812{
813 return mFinalPath; 813 return mFinalPath;
814} 814}
@@ -818,14 +818,14 @@ LOTRectItem::LOTRectItem(LOTRectData *data):LOTPathDataItem(data->isStatic()),mD
818{ 818{
819} 819}
820 820
821SGPath LOTRectItem::getPath(int frameNo) 821VPath LOTRectItem::getPath(int frameNo)
822{ 822{
823 SGPointF pos = mData->mPos.value(frameNo); 823 SGPointF pos = mData->mPos.value(frameNo);
824 SGPointF size = mData->mSize.value(frameNo); 824 SGPointF size = mData->mSize.value(frameNo);
825 float radius = mData->mRound.value(frameNo); 825 float radius = mData->mRound.value(frameNo);
826 SGRectF r(pos.x() - size.x()/2, pos.y() - size.y()/2, size.x(), size.y()); 826 SGRectF r(pos.x() - size.x()/2, pos.y() - size.y()/2, size.x(), size.y());
827 827
828 SGPath path; 828 VPath path;
829 path.addRoundRect(r, radius, radius, direction(mData->isDirectionCW())); 829 path.addRoundRect(r, radius, radius, direction(mData->isDirectionCW()));
830 830
831 return path; 831 return path;
@@ -836,13 +836,13 @@ LOTEllipseItem::LOTEllipseItem(LOTEllipseData *data):LOTPathDataItem(data->isSta
836 836
837} 837}
838 838
839SGPath LOTEllipseItem::getPath(int frameNo) 839VPath LOTEllipseItem::getPath(int frameNo)
840{ 840{
841 SGPointF pos = mData->mPos.value(frameNo); 841 SGPointF pos = mData->mPos.value(frameNo);
842 SGPointF size = mData->mSize.value(frameNo); 842 SGPointF size = mData->mSize.value(frameNo);
843 SGRectF r(pos.x() - size.x()/2, pos.y() - size.y()/2, size.x(), size.y()); 843 SGRectF r(pos.x() - size.x()/2, pos.y() - size.y()/2, size.x(), size.y());
844 844
845 SGPath path; 845 VPath path;
846 path.addOval(r, direction(mData->isDirectionCW())); 846 path.addOval(r, direction(mData->isDirectionCW()));
847 847
848 return path; 848 return path;
@@ -853,14 +853,14 @@ LOTShapeItem::LOTShapeItem(LOTShapeData *data):LOTPathDataItem(data->isStatic())
853 853
854} 854}
855 855
856SGPath LOTShapeItem::getPath(int frameNo) 856VPath LOTShapeItem::getPath(int frameNo)
857{ 857{
858 LottieShapeData shapeData = mData->mShape.value(frameNo); 858 LottieShapeData shapeData = mData->mShape.value(frameNo);
859 859
860 if (shapeData.mPoints.empty()) 860 if (shapeData.mPoints.empty())
861 return SGPath(); 861 return VPath();
862 862
863 SGPath path; 863 VPath path;
864 864
865 int size = shapeData.mPoints.size(); 865 int size = shapeData.mPoints.size();
866 const SGPointF *points = shapeData.mPoints.data(); 866 const SGPointF *points = shapeData.mPoints.data();
@@ -880,7 +880,7 @@ LOTPolystarItem::LOTPolystarItem(LOTPolystarData *data):LOTPathDataItem(data->is
880 880
881} 881}
882 882
883SGPath LOTPolystarItem::getPath(int frameNo) 883VPath LOTPolystarItem::getPath(int frameNo)
884{ 884{
885 SGPointF pos = mData->mPos.value(frameNo); 885 SGPointF pos = mData->mPos.value(frameNo);
886 float points = mData->mPointCount.value(frameNo); 886 float points = mData->mPointCount.value(frameNo);
@@ -890,7 +890,7 @@ SGPath LOTPolystarItem::getPath(int frameNo)
890 float outerRoundness = mData->mOuterRoundness.value(frameNo); 890 float outerRoundness = mData->mOuterRoundness.value(frameNo);
891 float rotation = mData->mRotation.value(frameNo); 891 float rotation = mData->mRotation.value(frameNo);
892 892
893 SGPath path; 893 VPath path;
894 SGMatrix m; 894 SGMatrix m;
895 895
896 if (mData->mType == LOTPolystarData::PolyType::Star) { 896 if (mData->mType == LOTPolystarData::PolyType::Star) {
diff --git a/src/lottie/lottieitem.h b/src/lottie/lottieitem.h
index 748bdef..7f299d4 100644
--- a/src/lottie/lottieitem.h
+++ b/src/lottie/lottieitem.h
@@ -142,7 +142,7 @@ public:
142 LOTMaskData *mData; 142 LOTMaskData *mData;
143 float mCombinedAlpha; 143 float mCombinedAlpha;
144 SGMatrix mCombinedMatrix; 144 SGMatrix mCombinedMatrix;
145 SGPath mLocalPath; 145 VPath mLocalPath;
146 SGRle mRle; 146 SGRle mRle;
147}; 147};
148 148
@@ -163,7 +163,7 @@ public:
163 typedef sgFlag<DirtyState> DirtyFlag; 163 typedef sgFlag<DirtyState> DirtyFlag;
164 VDrawable(); 164 VDrawable();
165 void sync(); 165 void sync();
166 void setPath(const SGPath &path); 166 void setPath(const VPath &path);
167 void setBrush(const VBrush &brush){mBrush = brush;} 167 void setBrush(const VBrush &brush){mBrush = brush;}
168 void setStrokeInfo(CapStyle cap, JoinStyle join, float meterLimit, float strokeWidth); 168 void setStrokeInfo(CapStyle cap, JoinStyle join, float meterLimit, float strokeWidth);
169 void setDashInfo(float *array, int size); 169 void setDashInfo(float *array, int size);
@@ -172,7 +172,7 @@ public:
172 DirtyFlag mFlag; 172 DirtyFlag mFlag;
173 VDrawable::Type mType; 173 VDrawable::Type mType;
174 VBrush mBrush; 174 VBrush mBrush;
175 SGPath mPath; 175 VPath mPath;
176 FillRule mFillRule; 176 FillRule mFillRule;
177 SGRle mRle; 177 SGRle mRle;
178 struct { 178 struct {
@@ -207,7 +207,7 @@ public:
207 virtual ~LOTContentItem(){} 207 virtual ~LOTContentItem(){}
208 virtual void update(int frameNo, const SGMatrix &parentMatrix, float parentAlpha, const DirtyFlag &flag) = 0; 208 virtual void update(int frameNo, const SGMatrix &parentMatrix, float parentAlpha, const DirtyFlag &flag) = 0;
209 virtual void renderList(std::vector<VDrawable *> &list){} 209 virtual void renderList(std::vector<VDrawable *> &list){}
210 SGPath::Direction direction(bool isCW); 210 VPath::Direction direction(bool isCW);
211}; 211};
212 212
213class LOTContentGroupItem: public LOTContentItem 213class LOTContentGroupItem: public LOTContentItem
@@ -231,7 +231,7 @@ public:
231 LOTPathDataItem(bool staticPath):mInit(false), mStaticPath(staticPath){} 231 LOTPathDataItem(bool staticPath):mInit(false), mStaticPath(staticPath){}
232 void addPaintOperation(std::vector<LOTPaintDataItem *> &list, int externalCount); 232 void addPaintOperation(std::vector<LOTPaintDataItem *> &list, int externalCount);
233 void update(int frameNo, const SGMatrix &parentMatrix, float parentAlpha, const DirtyFlag &flag) final; 233 void update(int frameNo, const SGMatrix &parentMatrix, float parentAlpha, const DirtyFlag &flag) final;
234 SGPath path() const; 234 VPath path() const;
235 inline float combinedAlpha() const{ return mCombinedAlpha;} 235 inline float combinedAlpha() const{ return mCombinedAlpha;}
236 void renderList(std::vector<VDrawable *> &list) final; 236 void renderList(std::vector<VDrawable *> &list) final;
237private: 237private:
@@ -239,12 +239,12 @@ private:
239 std::vector<std::unique_ptr<VDrawable>> mNodeList; 239 std::vector<std::unique_ptr<VDrawable>> mNodeList;
240 bool mInit; 240 bool mInit;
241 bool mStaticPath; 241 bool mStaticPath;
242 SGPath mLocalPath; 242 VPath mLocalPath;
243 SGPath mFinalPath; 243 VPath mFinalPath;
244 bool mPathChanged; 244 bool mPathChanged;
245 float mCombinedAlpha; 245 float mCombinedAlpha;
246protected: 246protected:
247 virtual SGPath getPath(int frameNo) = 0; 247 virtual VPath getPath(int frameNo) = 0;
248}; 248};
249 249
250class LOTRectItem: public LOTPathDataItem 250class LOTRectItem: public LOTPathDataItem
@@ -252,7 +252,7 @@ class LOTRectItem: public LOTPathDataItem
252public: 252public:
253 LOTRectItem(LOTRectData *data); 253 LOTRectItem(LOTRectData *data);
254protected: 254protected:
255 SGPath getPath(int frameNo) final; 255 VPath getPath(int frameNo) final;
256 LOTRectData *mData; 256 LOTRectData *mData;
257}; 257};
258 258
@@ -261,7 +261,7 @@ class LOTEllipseItem: public LOTPathDataItem
261public: 261public:
262 LOTEllipseItem(LOTEllipseData *data); 262 LOTEllipseItem(LOTEllipseData *data);
263private: 263private:
264 SGPath getPath(int frameNo) final; 264 VPath getPath(int frameNo) final;
265 LOTEllipseData *mData; 265 LOTEllipseData *mData;
266}; 266};
267 267
@@ -270,7 +270,7 @@ class LOTShapeItem: public LOTPathDataItem
270public: 270public:
271 LOTShapeItem(LOTShapeData *data); 271 LOTShapeItem(LOTShapeData *data);
272private: 272private:
273 SGPath getPath(int frameNo) final; 273 VPath getPath(int frameNo) final;
274 LOTShapeData *mData; 274 LOTShapeData *mData;
275}; 275};
276 276
@@ -279,7 +279,7 @@ class LOTPolystarItem: public LOTPathDataItem
279public: 279public:
280 LOTPolystarItem(LOTPolystarData *data); 280 LOTPolystarItem(LOTPolystarData *data);
281private: 281private:
282 SGPath getPath(int frameNo) final; 282 VPath getPath(int frameNo) final;
283 LOTPolystarData *mData; 283 LOTPolystarData *mData;
284}; 284};
285 285
diff --git a/src/lottie/lottiemodel.h b/src/lottie/lottiemodel.h
index d60d408..968f049 100644
--- a/src/lottie/lottiemodel.h
+++ b/src/lottie/lottiemodel.h
@@ -102,10 +102,10 @@ inline const LottieColor operator*(float m, const LottieColor &c)
102class LottieShapeData 102class LottieShapeData
103{ 103{
104public: 104public:
105 SGPath toPath() const{ 105 VPath toPath() const{
106 if (mPoints.empty()) return SGPath(); 106 if (mPoints.empty()) return VPath();
107 107
108 SGPath path; 108 VPath path;
109 int size = mPoints.size(); 109 int size = mPoints.size();
110 const SGPointF *points = mPoints.data(); 110 const SGPointF *points = mPoints.data();
111 path.moveTo(points[0]); 111 path.moveTo(points[0]);
diff --git a/src/vector/vdasher.cpp b/src/vector/vdasher.cpp
index ed98edc..c43cda2 100644
--- a/src/vector/vdasher.cpp
+++ b/src/vector/vdasher.cpp
@@ -202,32 +202,32 @@ void VDasher::cubicTo(const SGPointF &cp1, const SGPointF &cp2, const SGPointF &
202} 202}
203 203
204 204
205SGPath VDasher::dashed(const SGPath &path) 205VPath VDasher::dashed(const VPath &path)
206{ 206{
207 if (path.isEmpty()) return SGPath(); 207 if (path.isEmpty()) return VPath();
208 208
209 mDashedPath = SGPath(); 209 mDashedPath = VPath();
210 const std::vector<SGPath::Element> &elms = path.elements(); 210 const std::vector<VPath::Element> &elms = path.elements();
211 const std::vector<SGPointF> &pts = path.points(); 211 const std::vector<SGPointF> &pts = path.points();
212 const SGPointF *ptPtr = pts.data(); 212 const SGPointF *ptPtr = pts.data();
213 213
214 for (auto i : elms) { 214 for (auto i : elms) {
215 switch (i) { 215 switch (i) {
216 case SGPath::Element::MoveTo: { 216 case VPath::Element::MoveTo: {
217 moveTo(*ptPtr++); 217 moveTo(*ptPtr++);
218 break; 218 break;
219 } 219 }
220 case SGPath::Element::LineTo: { 220 case VPath::Element::LineTo: {
221 lineTo(*ptPtr++); 221 lineTo(*ptPtr++);
222 break; 222 break;
223 } 223 }
224 case SGPath::Element::CubicTo: { 224 case VPath::Element::CubicTo: {
225 cubicTo(*ptPtr, *(ptPtr + 1), *(ptPtr + 2)); 225 cubicTo(*ptPtr, *(ptPtr + 1), *(ptPtr + 2));
226 ptPtr += 3; 226 ptPtr += 3;
227 break; 227 break;
228 } 228 }
229 case SGPath::Element::Close: { 229 case VPath::Element::Close: {
230 // The point is already joined to start point in SGPath 230 // The point is already joined to start point in VPath
231 // no need to do anything here. 231 // no need to do anything here.
232 break; 232 break;
233 } 233 }
diff --git a/src/vector/vdasher.h b/src/vector/vdasher.h
index 957b444..c390063 100644
--- a/src/vector/vdasher.h
+++ b/src/vector/vdasher.h
@@ -5,7 +5,7 @@ class VDasher
5{ 5{
6 public: 6 public:
7 VDasher(const float *dashArray, int size); 7 VDasher(const float *dashArray, int size);
8 SGPath dashed(const SGPath &path); 8 VPath dashed(const VPath &path);
9 private: 9 private:
10 void moveTo(const SGPointF &p); 10 void moveTo(const SGPointF &p);
11 void lineTo(const SGPointF &p); 11 void lineTo(const SGPointF &p);
@@ -24,6 +24,6 @@ private:
24 int mCurrentDashLength; 24 int mCurrentDashLength;
25 bool mIsCurrentOperationGap; 25 bool mIsCurrentOperationGap;
26 float mDashOffset; 26 float mDashOffset;
27 SGPath mDashedPath; 27 VPath mDashedPath;
28}; 28};
29#endif // VDASHER_H 29#endif // VDASHER_H
diff --git a/src/vector/vpath.cpp b/src/vector/vpath.cpp
index e44c496..37478fc 100644
--- a/src/vector/vpath.cpp
+++ b/src/vector/vpath.cpp
@@ -5,9 +5,9 @@
5#include"vbezier.h" 5#include"vbezier.h"
6#include "vrect.h" 6#include "vrect.h"
7 7
8struct SGPathData 8struct VPathData
9{ 9{
10 void copy(SGPathData *o); 10 void copy(VPathData *o);
11 void moveTo(const SGPointF &pt); 11 void moveTo(const SGPointF &pt);
12 void lineTo(const SGPointF &pt); 12 void lineTo(const SGPointF &pt);
13 void cubicTo(const SGPointF &c1, const SGPointF &c2, const SGPointF &e); 13 void cubicTo(const SGPointF &c1, const SGPointF &c2, const SGPointF &e);
@@ -18,28 +18,28 @@ struct SGPathData
18 void transform(const SGMatrix &m); 18 void transform(const SGMatrix &m);
19 RefCount ref; 19 RefCount ref;
20 std::vector<SGPointF> m_points; 20 std::vector<SGPointF> m_points;
21 std::vector<SGPath::Element> m_elements; 21 std::vector<VPath::Element> m_elements;
22 int m_segments; 22 int m_segments;
23 SGPointF mStartPoint; 23 SGPointF mStartPoint;
24 bool mNewSegment; 24 bool mNewSegment;
25}; 25};
26 26
27 27
28void SGPathData::transform(const SGMatrix &m) 28void VPathData::transform(const SGMatrix &m)
29{ 29{
30 for(auto &i : m_points) { 30 for(auto &i : m_points) {
31 i = m.map(i); 31 i = m.map(i);
32 } 32 }
33} 33}
34 34
35void SGPathData::checkNewSegment() 35void VPathData::checkNewSegment()
36{ 36{
37 if (mNewSegment) { 37 if (mNewSegment) {
38 moveTo(SGPointF(0,0)); 38 moveTo(SGPointF(0,0));
39 mNewSegment = false; 39 mNewSegment = false;
40 } 40 }
41} 41}
42void SGPathData::copy(SGPathData *o) 42void VPathData::copy(VPathData *o)
43{ 43{
44 m_points = o->m_points; 44 m_points = o->m_points;
45 m_elements = o->m_elements; 45 m_elements = o->m_elements;
@@ -47,75 +47,75 @@ void SGPathData::copy(SGPathData *o)
47 mStartPoint = o->mStartPoint; 47 mStartPoint = o->mStartPoint;
48} 48}
49 49
50void SGPathData::moveTo(const SGPointF &p) 50void VPathData::moveTo(const SGPointF &p)
51{ 51{
52 mStartPoint = p; 52 mStartPoint = p;
53 mNewSegment = false; 53 mNewSegment = false;
54 m_elements.push_back(SGPath::Element::MoveTo); 54 m_elements.push_back(VPath::Element::MoveTo);
55 m_points.push_back(p); 55 m_points.push_back(p);
56 m_segments++; 56 m_segments++;
57} 57}
58void SGPathData::lineTo(const SGPointF &p) 58void VPathData::lineTo(const SGPointF &p)
59{ 59{
60 checkNewSegment(); 60 checkNewSegment();
61 m_elements.push_back(SGPath::Element::LineTo); 61 m_elements.push_back(VPath::Element::LineTo);
62 m_points.push_back(p); 62 m_points.push_back(p);
63} 63}
64void SGPathData::cubicTo(const SGPointF &c1, const SGPointF &c2, const SGPointF &e) 64void VPathData::cubicTo(const SGPointF &c1, const SGPointF &c2, const SGPointF &e)
65{ 65{
66 checkNewSegment(); 66 checkNewSegment();
67 m_elements.push_back(SGPath::Element::CubicTo); 67 m_elements.push_back(VPath::Element::CubicTo);
68 m_points.push_back(c1); 68 m_points.push_back(c1);
69 m_points.push_back(c2); 69 m_points.push_back(c2);
70 m_points.push_back(e); 70 m_points.push_back(e);
71} 71}
72 72
73void SGPathData::close() 73void VPathData::close()
74{ 74{
75 const SGPointF &lastPt = m_points.back(); 75 const SGPointF &lastPt = m_points.back();
76 if (!fuzzyCompare(mStartPoint, lastPt)) { 76 if (!fuzzyCompare(mStartPoint, lastPt)) {
77 lineTo(mStartPoint); 77 lineTo(mStartPoint);
78 } 78 }
79 m_elements.push_back(SGPath::Element::Close); 79 m_elements.push_back(VPath::Element::Close);
80 mNewSegment = true; 80 mNewSegment = true;
81} 81}
82 82
83void SGPathData::reset() 83void VPathData::reset()
84{ 84{
85 m_elements.clear(); 85 m_elements.clear();
86 m_points.clear(); 86 m_points.clear();
87 m_segments = 0; 87 m_segments = 0;
88} 88}
89 89
90int SGPathData::segments() const 90int VPathData::segments() const
91{ 91{
92 return m_segments; 92 return m_segments;
93} 93}
94 94
95 95
96static const struct SGPathData shared_empty = {RefCount(-1), 96static const struct VPathData shared_empty = {RefCount(-1),
97 std::vector<SGPointF>(), 97 std::vector<SGPointF>(),
98 std::vector<SGPath::Element>(), 98 std::vector<VPath::Element>(),
99 0, 99 0,
100 SGPointF(), 100 SGPointF(),
101 true}; 101 true};
102 102
103inline void SGPath::cleanUp(SGPathData *d) 103inline void VPath::cleanUp(VPathData *d)
104{ 104{
105 delete d; 105 delete d;
106} 106}
107 107
108void SGPath::detach() 108void VPath::detach()
109{ 109{
110 if (d->ref.isShared()) 110 if (d->ref.isShared())
111 *this = copy(); 111 *this = copy();
112} 112}
113 113
114SGPath SGPath::copy() const 114VPath VPath::copy() const
115{ 115{
116 SGPath other; 116 VPath other;
117 117
118 other.d = new SGPathData(shared_empty); 118 other.d = new VPathData(shared_empty);
119 other.d->m_points = d->m_points; 119 other.d->m_points = d->m_points;
120 other.d->m_elements = d->m_elements; 120 other.d->m_elements = d->m_elements;
121 other.d->m_segments = d->m_segments; 121 other.d->m_segments = d->m_segments;
@@ -123,29 +123,29 @@ SGPath SGPath::copy() const
123 return other; 123 return other;
124} 124}
125 125
126SGPath::~SGPath() 126VPath::~VPath()
127{ 127{
128 if (!d->ref.deref()) 128 if (!d->ref.deref())
129 cleanUp(d); 129 cleanUp(d);
130} 130}
131 131
132SGPath::SGPath() 132VPath::VPath()
133 : d(const_cast<SGPathData*>(&shared_empty)) 133 : d(const_cast<VPathData*>(&shared_empty))
134{ 134{
135} 135}
136 136
137SGPath::SGPath(const SGPath &other) 137VPath::VPath(const VPath &other)
138{ 138{
139 d = other.d; 139 d = other.d;
140 d->ref.ref(); 140 d->ref.ref();
141} 141}
142 142
143SGPath::SGPath(SGPath &&other): d(other.d) 143VPath::VPath(VPath &&other): d(other.d)
144{ 144{
145 other.d = const_cast<SGPathData*>(&shared_empty); 145 other.d = const_cast<VPathData*>(&shared_empty);
146} 146}
147 147
148SGPath &SGPath::operator=(const SGPath &other) 148VPath &VPath::operator=(const VPath &other)
149{ 149{
150 other.d->ref.ref(); 150 other.d->ref.ref();
151 if (!d->ref.deref()) 151 if (!d->ref.deref())
@@ -155,68 +155,68 @@ SGPath &SGPath::operator=(const SGPath &other)
155 return *this; 155 return *this;
156} 156}
157 157
158inline SGPath &SGPath::operator=(SGPath &&other) 158inline VPath &VPath::operator=(VPath &&other)
159{ 159{
160 if (!d->ref.deref()) 160 if (!d->ref.deref())
161 cleanUp(d); 161 cleanUp(d);
162 d = other.d; 162 d = other.d;
163 other.d = const_cast<SGPathData*>(&shared_empty); 163 other.d = const_cast<VPathData*>(&shared_empty);
164 return *this; 164 return *this;
165} 165}
166 166
167bool SGPath::isEmpty()const 167bool VPath::isEmpty()const
168{ 168{
169 return d->m_elements.empty(); 169 return d->m_elements.empty();
170} 170}
171 171
172void SGPath::close() 172void VPath::close()
173{ 173{
174 if (isEmpty()) return; 174 if (isEmpty()) return;
175 detach(); 175 detach();
176 d->close(); 176 d->close();
177} 177}
178 178
179void SGPath::reset() 179void VPath::reset()
180{ 180{
181 if (isEmpty()) return; 181 if (isEmpty()) return;
182 detach(); 182 detach();
183 d->reset(); 183 d->reset();
184} 184}
185 185
186void SGPath::moveTo(const SGPointF &p) 186void VPath::moveTo(const SGPointF &p)
187{ 187{
188 detach(); 188 detach();
189 d->moveTo(p); 189 d->moveTo(p);
190} 190}
191 191
192void SGPath::lineTo(const SGPointF &p) 192void VPath::lineTo(const SGPointF &p)
193{ 193{
194 detach(); 194 detach();
195 d->lineTo(p); 195 d->lineTo(p);
196} 196}
197 197
198void SGPath::cubicTo(const SGPointF &c1, const SGPointF &c2, const SGPointF &e) 198void VPath::cubicTo(const SGPointF &c1, const SGPointF &c2, const SGPointF &e)
199{ 199{
200 detach(); 200 detach();
201 d->cubicTo(c1, c2, e); 201 d->cubicTo(c1, c2, e);
202} 202}
203 203
204void SGPath::reserve(int num_elm) 204void VPath::reserve(int num_elm)
205{ 205{
206 detach(); 206 detach();
207 d->m_elements.reserve(num_elm); 207 d->m_elements.reserve(num_elm);
208 d->m_points.reserve(num_elm); 208 d->m_points.reserve(num_elm);
209} 209}
210 210
211const std::vector<SGPath::Element> &SGPath::elements() const 211const std::vector<VPath::Element> &VPath::elements() const
212{ 212{
213 return d->m_elements; 213 return d->m_elements;
214} 214}
215const std::vector<SGPointF> &SGPath::points() const 215const std::vector<SGPointF> &VPath::points() const
216{ 216{
217 return d->m_points; 217 return d->m_points;
218} 218}
219int SGPath::segments() const 219int VPath::segments() const
220{ 220{
221 return d->m_segments + 1; 221 return d->m_segments + 1;
222} 222}
@@ -450,7 +450,7 @@ curvesForArc(const SGRectF &rect, float startAngle, float sweepLength,
450 return startPoint; 450 return startPoint;
451} 451}
452 452
453void SGPath::arcTo(const SGRectF &rect, float startAngle, float sweepLength, bool forceMoveTo) 453void VPath::arcTo(const SGRectF &rect, float startAngle, float sweepLength, bool forceMoveTo)
454{ 454{
455 detach(); 455 detach();
456 456
@@ -468,12 +468,12 @@ void SGPath::arcTo(const SGRectF &rect, float startAngle, float sweepLength, boo
468 } 468 }
469} 469}
470 470
471void SGPath::addCircle(float cx, float cy, float radius, SGPath::Direction dir) 471void VPath::addCircle(float cx, float cy, float radius, VPath::Direction dir)
472{ 472{
473 addOval(SGRectF(cx-radius, cy-radius, 2*radius, 2*radius) , dir); 473 addOval(SGRectF(cx-radius, cy-radius, 2*radius, 2*radius) , dir);
474} 474}
475 475
476void SGPath::addOval(const SGRectF &rect, SGPath::Direction dir) 476void VPath::addOval(const SGRectF &rect, VPath::Direction dir)
477{ 477{
478 if (rect.isNull()) return; 478 if (rect.isNull()) return;
479 479
@@ -491,7 +491,7 @@ void SGPath::addOval(const SGRectF &rect, SGPath::Direction dir)
491 float h2k = h2 * PATH_KAPPA; 491 float h2k = h2 * PATH_KAPPA;
492 492
493 493
494 if (dir == SGPath::Direction::CW) { 494 if (dir == VPath::Direction::CW) {
495 // moveto 12 o'clock. 495 // moveto 12 o'clock.
496 d->moveTo(SGPointF(x+w2, y)); 496 d->moveTo(SGPointF(x+w2, y));
497 // 12 -> 3 o'clock 497 // 12 -> 3 o'clock
@@ -516,7 +516,7 @@ void SGPath::addOval(const SGRectF &rect, SGPath::Direction dir)
516 } 516 }
517} 517}
518 518
519void SGPath::addRect(const SGRectF &rect, SGPath::Direction dir) 519void VPath::addRect(const SGRectF &rect, VPath::Direction dir)
520{ 520{
521 if (rect.isNull()) return; 521 if (rect.isNull()) return;
522 522
@@ -527,7 +527,7 @@ void SGPath::addRect(const SGRectF &rect, SGPath::Direction dir)
527 float w = rect.width(); 527 float w = rect.width();
528 float h = rect.height(); 528 float h = rect.height();
529 529
530 if (dir == SGPath::Direction::CW) { 530 if (dir == VPath::Direction::CW) {
531 moveTo(SGPointF(x + w, y)); 531 moveTo(SGPointF(x + w, y));
532 lineTo(SGPointF(x + w, y + h)); 532 lineTo(SGPointF(x + w, y + h));
533 lineTo(SGPointF(x , y + h)); 533 lineTo(SGPointF(x , y + h));
@@ -542,7 +542,7 @@ void SGPath::addRect(const SGRectF &rect, SGPath::Direction dir)
542 } 542 }
543} 543}
544 544
545void SGPath::addRoundRect(const SGRectF &rect, float rx, float ry, SGPath::Direction dir) 545void VPath::addRoundRect(const SGRectF &rect, float rx, float ry, VPath::Direction dir)
546{ 546{
547 if (floatCmp(rx, 0.f) || floatCmp(ry, 0.f)) { 547 if (floatCmp(rx, 0.f) || floatCmp(ry, 0.f)) {
548 addRect(rect, dir); 548 addRect(rect, dir);
@@ -559,7 +559,7 @@ void SGPath::addRoundRect(const SGRectF &rect, float rx, float ry, SGPath::Direc
559 if (rx > w) rx = w; 559 if (rx > w) rx = w;
560 if (ry > h) ry = h; 560 if (ry > h) ry = h;
561 561
562 if (dir == SGPath::Direction::CW) { 562 if (dir == VPath::Direction::CW) {
563 moveTo(SGPointF(x + w, y + ry/2.f)); 563 moveTo(SGPointF(x + w, y + ry/2.f));
564 arcTo(SGRectF(x + w - rx, y + h - ry, rx, ry), 0 , -90, false); 564 arcTo(SGRectF(x + w - rx, y + h - ry, rx, ry), 0 , -90, false);
565 arcTo(SGRectF(x, y + h - ry, rx, ry), -90 , -90, false); 565 arcTo(SGRectF(x, y + h - ry, rx, ry), -90 , -90, false);
@@ -576,10 +576,10 @@ void SGPath::addRoundRect(const SGRectF &rect, float rx, float ry, SGPath::Direc
576 } 576 }
577} 577}
578 578
579void SGPath::addPolystarStar(float startAngle, float cx, float cy, float points, 579void VPath::addPolystarStar(float startAngle, float cx, float cy, float points,
580 float innerRadius, float outerRadius, 580 float innerRadius, float outerRadius,
581 float innerRoundness, float outerRoundness, 581 float innerRoundness, float outerRoundness,
582 SGPath::Direction dir) 582 VPath::Direction dir)
583{ 583{
584 // TODO: Direction feature is missing 584 // TODO: Direction feature is missing
585 const static float POLYSTAR_MAGIC_NUMBER = 0.47829 / 0.28; 585 const static float POLYSTAR_MAGIC_NUMBER = 0.47829 / 0.28;
@@ -670,9 +670,9 @@ void SGPath::addPolystarStar(float startAngle, float cx, float cy, float points,
670 close(); 670 close();
671} 671}
672 672
673void SGPath::addPolystarPolygon(float startAngle, float cx, float cy, float points, 673void VPath::addPolystarPolygon(float startAngle, float cx, float cy, float points,
674 float radius, float roundness, 674 float radius, float roundness,
675 SGPath::Direction dir) 675 VPath::Direction dir)
676{ 676{
677 // TODO: Direction feature is missing 677 // TODO: Direction feature is missing
678 // TODO: Need to support floating point number for number of points 678 // TODO: Need to support floating point number for number of points
@@ -727,7 +727,7 @@ void SGPath::addPolystarPolygon(float startAngle, float cx, float cy, float poin
727 close(); 727 close();
728} 728}
729 729
730void SGPath::transform(const SGMatrix &m) 730void VPath::transform(const SGMatrix &m)
731{ 731{
732 if (isEmpty()) return; 732 if (isEmpty()) return;
733 detach(); 733 detach();
diff --git a/src/vector/vpath.h b/src/vector/vpath.h
index 072d918..844e932 100644
--- a/src/vector/vpath.h
+++ b/src/vector/vpath.h
@@ -1,12 +1,12 @@
1#ifndef SGPATH_H 1#ifndef VPATH_H
2#define SGPATH_H 2#define VPATH_H
3#include "vpoint.h" 3#include "vpoint.h"
4#include "vrect.h" 4#include "vrect.h"
5#include "vmatrix.h" 5#include "vmatrix.h"
6#include<vector> 6#include<vector>
7 7
8struct SGPathData; 8struct VPathData;
9class SGPath 9class VPath
10{ 10{
11public: 11public:
12 enum class Direction { 12 enum class Direction {
@@ -20,12 +20,12 @@ public:
20 CubicTo, 20 CubicTo,
21 Close 21 Close
22 }; 22 };
23 ~SGPath(); 23 ~VPath();
24 SGPath(); 24 VPath();
25 SGPath(const SGPath &path); 25 VPath(const VPath &path);
26 SGPath(SGPath &&other); 26 VPath(VPath &&other);
27 SGPath &operator=(const SGPath &); 27 VPath &operator=(const VPath &);
28 SGPath &operator=(SGPath &&other); 28 VPath &operator=(VPath &&other);
29 bool isEmpty()const; 29 bool isEmpty()const;
30 void moveTo(const SGPointF &p); 30 void moveTo(const SGPointF &p);
31 inline void moveTo(float x, float y); 31 inline void moveTo(float x, float y);
@@ -38,43 +38,43 @@ public:
38 void reset(); 38 void reset();
39 void reserve(int num_elm); 39 void reserve(int num_elm);
40 40
41 void addCircle(float cx, float cy, float radius, SGPath::Direction dir = Direction::CW); 41 void addCircle(float cx, float cy, float radius, VPath::Direction dir = Direction::CW);
42 void addOval(const SGRectF &rect, SGPath::Direction dir = Direction::CW); 42 void addOval(const SGRectF &rect, VPath::Direction dir = Direction::CW);
43 void addRoundRect(const SGRectF &rect, float rx, float ry, SGPath::Direction dir = Direction::CW); 43 void addRoundRect(const SGRectF &rect, float rx, float ry, VPath::Direction dir = Direction::CW);
44 void addRect(const SGRectF &rect, SGPath::Direction dir = Direction::CW); 44 void addRect(const SGRectF &rect, VPath::Direction dir = Direction::CW);
45 void addPolystarStar(float startAngle, float cx, float cy, float points, 45 void addPolystarStar(float startAngle, float cx, float cy, float points,
46 float innerRadius, float outerRadius, 46 float innerRadius, float outerRadius,
47 float innerRoundness, float outerRoundness, 47 float innerRoundness, float outerRoundness,
48 SGPath::Direction dir = Direction::CW); 48 VPath::Direction dir = Direction::CW);
49 void addPolystarPolygon(float startAngle, float cx, float cy, float points, 49 void addPolystarPolygon(float startAngle, float cx, float cy, float points,
50 float radius, float roundness, 50 float radius, float roundness,
51 SGPath::Direction dir = Direction::CW); 51 VPath::Direction dir = Direction::CW);
52 52
53 void transform(const SGMatrix &m); 53 void transform(const SGMatrix &m);
54 const std::vector<SGPath::Element> &elements() const; 54 const std::vector<VPath::Element> &elements() const;
55 const std::vector<SGPointF> &points() const; 55 const std::vector<SGPointF> &points() const;
56private: 56private:
57 friend class FTRaster; 57 friend class FTRaster;
58 int segments() const; 58 int segments() const;
59 SGPath copy() const; 59 VPath copy() const;
60 void detach(); 60 void detach();
61 void cleanUp(SGPathData *x); 61 void cleanUp(VPathData *x);
62 SGPathData *d; 62 VPathData *d;
63}; 63};
64 64
65inline void SGPath::lineTo(float x, float y) 65inline void VPath::lineTo(float x, float y)
66{ 66{
67 lineTo(SGPointF(x,y)); 67 lineTo(SGPointF(x,y));
68} 68}
69 69
70inline void SGPath::moveTo(float x, float y) 70inline void VPath::moveTo(float x, float y)
71{ 71{
72 moveTo(SGPointF(x,y)); 72 moveTo(SGPointF(x,y));
73} 73}
74 74
75inline void SGPath::cubicTo(float c1x, float c1y, float c2x, float c2y, float ex, float ey) 75inline void VPath::cubicTo(float c1x, float c1y, float c2x, float c2y, float ex, float ey)
76{ 76{
77 cubicTo(SGPointF(c1x, c1y), SGPointF(c2x, c2y), SGPointF(ex, ey)); 77 cubicTo(SGPointF(c1x, c1y), SGPointF(c2x, c2y), SGPointF(ex, ey));
78} 78}
79 79
80#endif // SGPATH_H 80#endif // VPATH_H
diff --git a/src/vector/vpathmesure.cpp b/src/vector/vpathmesure.cpp
index 1a4d47c..358721c 100644
--- a/src/vector/vpathmesure.cpp
+++ b/src/vector/vpathmesure.cpp
@@ -1,6 +1,6 @@
1#include"vpathmesure.h" 1#include"vpathmesure.h"
2 2
3class SGPathMesureData 3class VPathMesureData
4{ 4{
5 SGPath *path; 5 VPath *path;
6}; \ No newline at end of file 6}; \ No newline at end of file
diff --git a/src/vector/vpathmesure.h b/src/vector/vpathmesure.h
index 12498b1..640fbac 100644
--- a/src/vector/vpathmesure.h
+++ b/src/vector/vpathmesure.h
@@ -3,16 +3,16 @@
3 3
4#include "vpath.h" 4#include "vpath.h"
5 5
6class SGPathMesureData; 6class VPathMesureData;
7class SGPathMesure 7class VPathMesure
8{ 8{
9public: 9public:
10 ~SGPathMesure(); 10 ~VPathMesure();
11 SGPathMesure(); 11 VPathMesure();
12 SGPathMesure(const SGPath *path, bool foceClose); 12 VPathMesure(const VPath *path, bool foceClose);
13 int getLength() const; 13 int getLength() const;
14private: 14private:
15 SGPathMesureData *d; 15 VPathMesureData *d;
16}; 16};
17 17
18#endif // SGPATHMESURE_H 18#endif // SGPATHMESURE_H
diff --git a/test/testftraster.cpp b/test/testftraster.cpp
index c7345d5..6e4a1af 100644
--- a/test/testftraster.cpp
+++ b/test/testftraster.cpp
@@ -18,7 +18,7 @@ public:
18 18
19 } 19 }
20public: 20public:
21 SGPath path; 21 VPath path;
22 SGRect pathRect; 22 SGRect pathRect;
23}; 23};
24 24