summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsubhransu mohanty <sub.mohanty@samsung.com>2018-07-11 11:01:31 +0900
committersubhransu mohanty <sub.mohanty@samsung.com>2018-07-11 11:45:17 +0900
commit35b178d268f14aee2c05e4d60c0611d83b9e7eb4 (patch)
tree309583d8eba772d8a4f2826b58e28fe6b86380f5
parent68eb00182a8a518b01a2d33bd1f05d0920cc885b (diff)
lottie: re organize folder structure.
-rw-r--r--example/evasapp.cpp1
-rw-r--r--example/lottieviewtest.cpp1
-rw-r--r--example/pathtest.cpp2
-rw-r--r--include/lottiemodel.h12
-rw-r--r--include/sgcontext.h2
-rw-r--r--include/sgelapsedtimer.h2
-rw-r--r--include/sgfontdatabase.h2
-rw-r--r--include/sggradient.h2
-rw-r--r--include/sginterpolator.h2
-rw-r--r--include/sgnode.h4
-rw-r--r--include/sgnodeupdater_p.h2
-rw-r--r--include/sgregion.h10
-rw-r--r--include/sgrenderer.h2
-rw-r--r--include/sgrle.h8
-rw-r--r--include/ssg.h4
-rw-r--r--include/vbrush.h6
-rw-r--r--src/animation/sgkeyframe.h2
-rw-r--r--src/ftraster/ftraster.cpp6
-rw-r--r--src/lottie/lottieitem.h6
-rw-r--r--src/lottie/lottieparser.cpp68
-rw-r--r--src/meson.build6
-rw-r--r--src/text/sgfontdatabase.cpp2
-rw-r--r--src/util/meson.build15
-rw-r--r--src/vector/meson.build (renamed from src/painting/meson.build)10
-rw-r--r--src/vector/vbezier.cpp (renamed from src/util/sgbezier.cpp)24
-rw-r--r--src/vector/vbezier.h (renamed from include/sgbezier.h)30
-rw-r--r--src/vector/vbitmap.cpp (renamed from src/painting/vbitmap.cpp)2
-rw-r--r--src/vector/vbitmap.h (renamed from src/painting/vbitmap.h)2
-rw-r--r--src/vector/vbrush.cpp (renamed from src/painting/vbrush.cpp)0
-rw-r--r--src/vector/vcompositionfunctions.cpp (renamed from src/painting/vcompositionfunctions.cpp)0
-rw-r--r--src/vector/vdasher.cpp (renamed from src/painting/vdasher.cpp)8
-rw-r--r--src/vector/vdasher.h (renamed from src/painting/vdasher.h)2
-rw-r--r--src/vector/vdebug.cpp (renamed from src/util/sgdebug.cpp)86
-rw-r--r--src/vector/vdebug.h (renamed from include/sgdebug.h)58
-rw-r--r--src/vector/vdrawhelper.cpp (renamed from src/painting/vdrawhelper.cpp)0
-rw-r--r--src/vector/vdrawhelper.h (renamed from src/painting/vdrawhelper.h)2
-rw-r--r--src/vector/vdrawhelper_neon.cpp (renamed from src/painting/vdrawhelper_neon.cpp)0
-rw-r--r--src/vector/vdrawhelper_sse2.cpp (renamed from src/painting/vdrawhelper_sse2.cpp)0
-rw-r--r--src/vector/velapsedtimer.cpp (renamed from src/util/sgelapsedtimer.cpp)0
-rw-r--r--src/vector/vglobal.h (renamed from include/sgglobal.h)2
-rw-r--r--src/vector/vinterpolator.cpp (renamed from src/util/sginterpolator.cpp)0
-rw-r--r--src/vector/vmatrix.cpp (renamed from src/util/sgmatrix.cpp)4
-rw-r--r--src/vector/vmatrix.h (renamed from include/sgmatrix.h)4
-rw-r--r--src/vector/vpainter.cpp (renamed from src/painting/vpainter.cpp)0
-rw-r--r--src/vector/vpainter.h (renamed from src/painting/vpainter.h)2
-rw-r--r--src/vector/vpath.cpp (renamed from src/util/sgpath.cpp)16
-rw-r--r--src/vector/vpath.h (renamed from include/sgpath.h)7
-rw-r--r--src/vector/vpathmesure.cpp (renamed from src/util/sgpathmesure.cpp)2
-rw-r--r--src/vector/vpathmesure.h (renamed from include/sgpathmesure.h)2
-rw-r--r--src/vector/vpoint.h (renamed from include/sgpoint.h)14
-rw-r--r--src/vector/vrect.cpp (renamed from src/util/sgrect.cpp)0
-rw-r--r--src/vector/vrect.h (renamed from include/sgrect.h)10
-rw-r--r--src/vector/vregion.cpp (renamed from src/util/sgregion.cpp)2
-rw-r--r--src/vector/vrle.cpp (renamed from src/util/sgrle.cpp)12
-rw-r--r--test/ssgtestsuite.cpp2
-rw-r--r--test/testftraster.cpp2
-rw-r--r--test/testsgregion.cpp4
57 files changed, 232 insertions, 244 deletions
diff --git a/example/evasapp.cpp b/example/evasapp.cpp
index 08d0eca..4f4762e 100644
--- a/example/evasapp.cpp
+++ b/example/evasapp.cpp
@@ -1,5 +1,4 @@
1#include "evasapp.h" 1#include "evasapp.h"
2#include "sgdebug.h"
3 2
4static void 3static void
5_on_resize(Ecore_Evas *ee) 4_on_resize(Ecore_Evas *ee)
diff --git a/example/lottieviewtest.cpp b/example/lottieviewtest.cpp
index 36ff7ae..169da1e 100644
--- a/example/lottieviewtest.cpp
+++ b/example/lottieviewtest.cpp
@@ -1,6 +1,5 @@
1#include "evasapp.h" 1#include "evasapp.h"
2#include "lottieview.h" 2#include "lottieview.h"
3#include"sgpath.h"
4#include<iostream> 3#include<iostream>
5#include <dirent.h> 4#include <dirent.h>
6#include <stdio.h> 5#include <stdio.h>
diff --git a/example/pathtest.cpp b/example/pathtest.cpp
index a0d76bc..1ea6361 100644
--- a/example/pathtest.cpp
+++ b/example/pathtest.cpp
@@ -1,5 +1,5 @@
1#include "evasapp.h" 1#include "evasapp.h"
2#include"sgpath.h" 2#include"vpath.h"
3#include<iostream> 3#include<iostream>
4using namespace std; 4using namespace std;
5 5
diff --git a/include/lottiemodel.h b/include/lottiemodel.h
index 19bc5e7..4b3a027 100644
--- a/include/lottiemodel.h
+++ b/include/lottiemodel.h
@@ -4,13 +4,13 @@
4#include<vector> 4#include<vector>
5#include<memory> 5#include<memory>
6#include<unordered_map> 6#include<unordered_map>
7#include"sgpoint.h" 7#include"vpoint.h"
8#include"sgrect.h" 8#include"vrect.h"
9#include"sginterpolator.h" 9#include"sginterpolator.h"
10#include"sgmatrix.h" 10#include"vmatrix.h"
11#include"sgbezier.h" 11#include"vbezier.h"
12#include"vbrush.h" 12#include"vbrush.h"
13#include"sgpath.h" 13#include"vpath.h"
14 14
15 15
16class LOTCompositionData; 16class LOTCompositionData;
@@ -173,7 +173,7 @@ public:
173 SGPointF value(int frameNo) const { 173 SGPointF value(int frameNo) const {
174 float progress = mInterpolator->value(float(frameNo - mStartFrame) / float(mEndFrame - mStartFrame)); 174 float progress = mInterpolator->value(float(frameNo - mStartFrame) / float(mEndFrame - mStartFrame));
175 if (mPathKeyFrame & 1) { 175 if (mPathKeyFrame & 1) {
176 return SGBezier::fromPoints(mStartValue, mStartValue + mOutTangent, mEndValue + mInTangent, mEndValue).pointAt(progress); 176 return VBezier::fromPoints(mStartValue, mStartValue + mOutTangent, mEndValue + mInTangent, mEndValue).pointAt(progress);
177 } else { 177 } else {
178 return mStartValue + progress * (mEndValue - mStartValue); 178 return mStartValue + progress * (mEndValue - mStartValue);
179 } 179 }
diff --git a/include/sgcontext.h b/include/sgcontext.h
index 61fcb74..0e699ea 100644
--- a/include/sgcontext.h
+++ b/include/sgcontext.h
@@ -1,7 +1,7 @@
1#ifndef SGCONTEXT_H 1#ifndef SGCONTEXT_H
2#define SGCONTEXT_H 2#define SGCONTEXT_H
3 3
4#include"sgglobal.h" 4#include"vglobal.h"
5 5
6class SGRectangleNode; 6class SGRectangleNode;
7class SGImageNode; 7class SGImageNode;
diff --git a/include/sgelapsedtimer.h b/include/sgelapsedtimer.h
index 6e78b86..d3449fa 100644
--- a/include/sgelapsedtimer.h
+++ b/include/sgelapsedtimer.h
@@ -1,7 +1,7 @@
1#ifndef SGELAPSEDTIMER_H 1#ifndef SGELAPSEDTIMER_H
2#define SGELAPSEDTIMER_H 2#define SGELAPSEDTIMER_H
3 3
4#include "sgglobal.h" 4#include "vglobal.h"
5#include<chrono> 5#include<chrono>
6 6
7class SG_EXPORT SGElapsedTimer 7class SG_EXPORT SGElapsedTimer
diff --git a/include/sgfontdatabase.h b/include/sgfontdatabase.h
index 83573a6..3a0198b 100644
--- a/include/sgfontdatabase.h
+++ b/include/sgfontdatabase.h
@@ -1,7 +1,7 @@
1#ifndef SGFONTDATABASE_H 1#ifndef SGFONTDATABASE_H
2#define SGFONTDATABASE_H 2#define SGFONTDATABASE_H
3 3
4#include"sgglobal.h" 4#include"vglobal.h"
5 5
6class SGFontDatabasePrivate; 6class SGFontDatabasePrivate;
7class SG_EXPORT SGFontDatabase 7class SG_EXPORT SGFontDatabase
diff --git a/include/sggradient.h b/include/sggradient.h
index baff3af..e62c197 100644
--- a/include/sggradient.h
+++ b/include/sggradient.h
@@ -1,7 +1,7 @@
1#ifndef SGGRADIENT_H 1#ifndef SGGRADIENT_H
2#define SGGRADIENT_H 2#define SGGRADIENT_H
3 3
4#include "sgglobal.h" 4#include "vglobal.h"
5#include<vector> 5#include<vector>
6 6
7class SGGradientStop 7class SGGradientStop
diff --git a/include/sginterpolator.h b/include/sginterpolator.h
index f638682..8293233 100644
--- a/include/sginterpolator.h
+++ b/include/sginterpolator.h
@@ -1,7 +1,7 @@
1#ifndef SGINTERPOLATOR_H 1#ifndef SGINTERPOLATOR_H
2#define SGINTERPOLATOR_H 2#define SGINTERPOLATOR_H
3 3
4#include "sgpoint.h" 4#include "vpoint.h"
5 5
6class SGInterpolator 6class SGInterpolator
7{ 7{
diff --git a/include/sgnode.h b/include/sgnode.h
index dca24d2..d73d404 100644
--- a/include/sgnode.h
+++ b/include/sgnode.h
@@ -1,9 +1,9 @@
1#ifndef SGNODE_H 1#ifndef SGNODE_H
2#define SGNODE_H 2#define SGNODE_H
3 3
4#include<sgglobal.h> 4#include<vglobal.h>
5#include<sgregion.h> 5#include<sgregion.h>
6#include<sgmatrix.h> 6#include<vmatrix.h>
7#include<vector> 7#include<vector>
8 8
9class SGGeometry; 9class SGGeometry;
diff --git a/include/sgnodeupdater_p.h b/include/sgnodeupdater_p.h
index 73a909c..7c1cd18 100644
--- a/include/sgnodeupdater_p.h
+++ b/include/sgnodeupdater_p.h
@@ -1,7 +1,7 @@
1#ifndef SGNODEUPDATER_P_H 1#ifndef SGNODEUPDATER_P_H
2#define SGNODEUPDATER_P_H 2#define SGNODEUPDATER_P_H
3 3
4#include"sgglobal.h" 4#include"vglobal.h"
5#include"sgnode.h" 5#include"sgnode.h"
6#include "sgnodevisitor_p.h" 6#include "sgnodevisitor_p.h"
7 7
diff --git a/include/sgregion.h b/include/sgregion.h
index 095063b..9df4e94 100644
--- a/include/sgregion.h
+++ b/include/sgregion.h
@@ -1,9 +1,9 @@
1#ifndef SGREGION_H 1#ifndef SGREGION_H
2#define SGREGION_H 2#define SGREGION_H
3#include"sgdebug.h" 3#include"vdebug.h"
4#include <sgglobal.h> 4#include <vglobal.h>
5#include<sgrect.h> 5#include<vrect.h>
6#include<sgpoint.h> 6#include<vpoint.h>
7#include<utility> 7#include<utility>
8 8
9typedef struct pixman_region region_type_t; 9typedef struct pixman_region region_type_t;
@@ -46,7 +46,7 @@ public:
46 46
47 bool operator==(const SGRegion &r) const; 47 bool operator==(const SGRegion &r) const;
48 inline bool operator!=(const SGRegion &r) const { return !(operator==(r)); } 48 inline bool operator!=(const SGRegion &r) const { return !(operator==(r)); }
49 friend SGDebug& operator<<(SGDebug& os, const SGRegion& o); 49 friend VDebug& operator<<(VDebug& os, const SGRegion& o);
50private: 50private:
51 bool within(const SGRect &r) const; 51 bool within(const SGRect &r) const;
52 SGRegion copy() const; 52 SGRegion copy() const;
diff --git a/include/sgrenderer.h b/include/sgrenderer.h
index cc5d8e6..3229c57 100644
--- a/include/sgrenderer.h
+++ b/include/sgrenderer.h
@@ -3,7 +3,7 @@
3 3
4#include<unordered_set> 4#include<unordered_set>
5 5
6#include"sgglobal.h" 6#include"vglobal.h"
7#include"sgnode.h" 7#include"sgnode.h"
8 8
9class SGRenderContext; 9class SGRenderContext;
diff --git a/include/sgrle.h b/include/sgrle.h
index c4a5bc3..d538a92 100644
--- a/include/sgrle.h
+++ b/include/sgrle.h
@@ -1,8 +1,8 @@
1#ifndef SGRLE_H 1#ifndef SGRLE_H
2#define SGRLE_H 2#define SGRLE_H
3#include<sgglobal.h> 3#include<vglobal.h>
4#include<sgrect.h> 4#include<vrect.h>
5#include<sgpoint.h> 5#include<vpoint.h>
6 6
7struct SGRleData; 7struct SGRleData;
8class SGRle 8class SGRle
@@ -41,7 +41,7 @@ public:
41 static SGRle toRle(const SGRectF &rect); 41 static SGRle toRle(const SGRectF &rect);
42 friend SGRle operator*(const SGRle &, int alpha); 42 friend SGRle operator*(const SGRle &, int alpha);
43 inline friend SGRle operator*(int alpha, const SGRle &); 43 inline friend SGRle operator*(int alpha, const SGRle &);
44 friend SGDebug& operator<<(SGDebug& os, const SGRle& object); 44 friend VDebug& operator<<(VDebug& os, const SGRle& object);
45private: 45private:
46 SGRle copy() const; 46 SGRle copy() const;
47 void detach(); 47 void detach();
diff --git a/include/ssg.h b/include/ssg.h
index 37167ee..acd3d68 100644
--- a/include/ssg.h
+++ b/include/ssg.h
@@ -1,8 +1,8 @@
1#ifndef SSG_H 1#ifndef SSG_H
2#define SSG_H 2#define SSG_H
3 3
4#include "sgglobal.h" 4#include "vglobal.h"
5#include "sgmatrix.h" 5#include "vmatrix.h"
6#include "sgnode.h" 6#include "sgnode.h"
7#include "sgregion.h" 7#include "sgregion.h"
8 8
diff --git a/include/vbrush.h b/include/vbrush.h
index fc4a73d..1432537 100644
--- a/include/vbrush.h
+++ b/include/vbrush.h
@@ -1,9 +1,9 @@
1#ifndef VBRUSH_H 1#ifndef VBRUSH_H
2#define VBRUSH_H 2#define VBRUSH_H
3 3
4#include"sgglobal.h" 4#include"vglobal.h"
5#include"sgpoint.h" 5#include"vpoint.h"
6#include"sgmatrix.h" 6#include"vmatrix.h"
7#include<vector> 7#include<vector>
8 8
9typedef std::pair<float, SGColor> VGradientStop; 9typedef std::pair<float, SGColor> VGradientStop;
diff --git a/src/animation/sgkeyframe.h b/src/animation/sgkeyframe.h
index b8c0922..cc7cf4e 100644
--- a/src/animation/sgkeyframe.h
+++ b/src/animation/sgkeyframe.h
@@ -1,6 +1,6 @@
1#ifndef SGKEYFRAME_H 1#ifndef SGKEYFRAME_H
2#define SGKEYFRAME_H 2#define SGKEYFRAME_H
3#include"sgglobal.h" 3#include"vglobal.h"
4#include<vector> 4#include<vector>
5 5
6template<typename T> 6template<typename T>
diff --git a/src/ftraster/ftraster.cpp b/src/ftraster/ftraster.cpp
index e540049..8b09d4c 100644
--- a/src/ftraster/ftraster.cpp
+++ b/src/ftraster/ftraster.cpp
@@ -1,10 +1,10 @@
1#include"ftraster_p.h" 1#include"ftraster_p.h"
2#include"sw_ft_raster.h" 2#include"sw_ft_raster.h"
3#include"sw_ft_stroker.h" 3#include"sw_ft_stroker.h"
4#include"sgpath.h" 4#include"vpath.h"
5#include"sgmatrix.h" 5#include"vmatrix.h"
6#include<cstring> 6#include<cstring>
7#include"sgdebug.h" 7#include"vdebug.h"
8 8
9struct FTOutline 9struct FTOutline
10{ 10{
diff --git a/src/lottie/lottieitem.h b/src/lottie/lottieitem.h
index 509083a..748bdef 100644
--- a/src/lottie/lottieitem.h
+++ b/src/lottie/lottieitem.h
@@ -5,9 +5,9 @@
5#include<sstream> 5#include<sstream>
6#include<memory> 6#include<memory>
7 7
8#include"sgmatrix.h" 8#include"vmatrix.h"
9#include"sgpath.h" 9#include"vpath.h"
10#include"sgpoint.h" 10#include"vpoint.h"
11#include"lottieplayer.h" 11#include"lottieplayer.h"
12#include"vbrush.h" 12#include"vbrush.h"
13#include"vpainter.h" 13#include"vpainter.h"
diff --git a/src/lottie/lottieparser.cpp b/src/lottie/lottieparser.cpp
index 8755122..842c02a 100644
--- a/src/lottie/lottieparser.cpp
+++ b/src/lottie/lottieparser.cpp
@@ -197,7 +197,7 @@ void LookaheadParserHandler::ParseNext() {
197 } 197 }
198 198
199 if (!r_.IterativeParseNext<parseFlags>(ss_, *this)) { 199 if (!r_.IterativeParseNext<parseFlags>(ss_, *this)) {
200 sgCritical<<"Lottie file parsing error"; 200 vCritical<<"Lottie file parsing error";
201 RAPIDJSON_ASSERT(0); 201 RAPIDJSON_ASSERT(0);
202 } 202 }
203} 203}
@@ -240,7 +240,7 @@ const char* LottieParserImpl::NextObjectKey() {
240 * */ 240 * */
241 if (st_ == kExitingArray || st_ == kEnteringObject ) { 241 if (st_ == kExitingArray || st_ == kEnteringObject ) {
242// #ifdef DEBUG_PARSER 242// #ifdef DEBUG_PARSER
243// sgDebug<<"Object: Exiting nested loop"; 243// vDebug<<"Object: Exiting nested loop";
244// #endif 244// #endif
245 return 0; 245 return 0;
246 } 246 }
@@ -266,7 +266,7 @@ bool LottieParserImpl::NextArrayValue() {
266 */ 266 */
267 if (st_ == kExitingObject) { 267 if (st_ == kExitingObject) {
268// #ifdef DEBUG_PARSER 268// #ifdef DEBUG_PARSER
269// sgDebug<<"Array: Exiting nested loop"; 269// vDebug<<"Array: Exiting nested loop";
270// #endif 270// #endif
271 return 0; 271 return 0;
272 } 272 }
@@ -496,7 +496,7 @@ LottieParserImpl::parseComposition()
496 parseLayers(comp); 496 parseLayers(comp);
497 } else { 497 } else {
498#ifdef DEBUG_PARSER 498#ifdef DEBUG_PARSER
499 sgWarning<<"Composition Attribute Skipped : "<<key; 499 vWarning<<"Composition Attribute Skipped : "<<key;
500#endif 500#endif
501 Skip(key); 501 Skip(key);
502 } 502 }
@@ -551,7 +551,7 @@ LottieParserImpl::parseAsset()
551 } 551 }
552 } else { 552 } else {
553 #ifdef DEBUG_PARSER 553 #ifdef DEBUG_PARSER
554 sgWarning<<"Asset Attribute Skipped : "<<key; 554 vWarning<<"Asset Attribute Skipped : "<<key;
555 #endif 555 #endif
556 Skip(key); 556 Skip(key);
557 } 557 }
@@ -708,7 +708,7 @@ LottieParserImpl::parseLayer()
708 parseMaskProperty(layer); 708 parseMaskProperty(layer);
709 }else { 709 }else {
710 #ifdef DEBUG_PARSER 710 #ifdef DEBUG_PARSER
711 sgWarning<<"Layer Attribute Skipped : "<<key; 711 vWarning<<"Layer Attribute Skipped : "<<key;
712 #endif 712 #endif
713 Skip(key); 713 Skip(key);
714 } 714 }
@@ -823,7 +823,7 @@ LottieParserImpl::parseObjectTypeAttr()
823 return parseReapeaterObject(); 823 return parseReapeaterObject();
824 } else { 824 } else {
825#ifdef DEBUG_PARSER 825#ifdef DEBUG_PARSER
826 sgDebug<<"The Object Type not yet handled = "<< type; 826 vDebug<<"The Object Type not yet handled = "<< type;
827#endif 827#endif
828 return nullptr; 828 return nullptr;
829 } 829 }
@@ -947,7 +947,7 @@ LottieParserImpl::parseShapeObject()
947 obj->mDirection = GetInt(); 947 obj->mDirection = GetInt();
948 } else { 948 } else {
949#ifdef DEBUG_PARSER 949#ifdef DEBUG_PARSER
950 sgDebug<<"Shape property ignored :"<<key; 950 vDebug<<"Shape property ignored :"<<key;
951#endif 951#endif
952 Skip(key); 952 Skip(key);
953 } 953 }
@@ -991,7 +991,7 @@ LottieParserImpl::parsePolystarObject()
991 obj->mDirection = GetInt(); 991 obj->mDirection = GetInt();
992 } else { 992 } else {
993#ifdef DEBUG_PARSER 993#ifdef DEBUG_PARSER
994 sgDebug<<"Polystar property ignored :"<<key; 994 vDebug<<"Polystar property ignored :"<<key;
995#endif 995#endif
996 Skip(key); 996 Skip(key);
997 } 997 }
@@ -1044,7 +1044,7 @@ LottieParserImpl::parseTrimObject()
1044 obj->mTrimType = getTrimType(); 1044 obj->mTrimType = getTrimType();
1045 } else { 1045 } else {
1046#ifdef DEBUG_PARSER 1046#ifdef DEBUG_PARSER
1047 sgDebug<<"Trim property ignored :"<<key; 1047 vDebug<<"Trim property ignored :"<<key;
1048#endif 1048#endif
1049 Skip(key); 1049 Skip(key);
1050 } 1050 }
@@ -1071,7 +1071,7 @@ LottieParserImpl::parseReapeaterObject()
1071 obj->mTransform = parseTransformObject(); 1071 obj->mTransform = parseTransformObject();
1072 } else { 1072 } else {
1073#ifdef DEBUG_PARSER 1073#ifdef DEBUG_PARSER
1074 sgDebug<<"Repeater property ignored :"<<key; 1074 vDebug<<"Repeater property ignored :"<<key;
1075#endif 1075#endif
1076 Skip(key); 1076 Skip(key);
1077 } 1077 }
@@ -1144,7 +1144,7 @@ LottieParserImpl::parseFillObject()
1144 obj->mEnabled = GetBool(); 1144 obj->mEnabled = GetBool();
1145 } else { 1145 } else {
1146#ifdef DEBUG_PARSER 1146#ifdef DEBUG_PARSER
1147 sgWarning<<"Fill property skipped = "<<key; 1147 vWarning<<"Fill property skipped = "<<key;
1148#endif 1148#endif
1149 Skip(key); 1149 Skip(key);
1150 } 1150 }
@@ -1222,7 +1222,7 @@ LottieParserImpl::parseStrokeObject()
1222 parseDashProperty(obj->mDash); 1222 parseDashProperty(obj->mDash);
1223 } else { 1223 } else {
1224#ifdef DEBUG_PARSER 1224#ifdef DEBUG_PARSER
1225 sgWarning<<"Stroke property skipped = "<<key; 1225 vWarning<<"Stroke property skipped = "<<key;
1226#endif 1226#endif
1227 Skip(key); 1227 Skip(key);
1228 } 1228 }
@@ -1261,7 +1261,7 @@ LottieParserImpl::parseGradientProperty(LOTGradient *obj, const char *key)
1261 } 1261 }
1262 } else { 1262 } else {
1263#ifdef DEBUG_PARSER 1263#ifdef DEBUG_PARSER
1264 sgWarning<<"Gradient property skipped = "<<key; 1264 vWarning<<"Gradient property skipped = "<<key;
1265#endif 1265#endif
1266 Skip(key); 1266 Skip(key);
1267 } 1267 }
@@ -1505,7 +1505,7 @@ void LottieParserImpl::getValue(LottieShapeData &obj)
1505 */ 1505 */
1506 if (inPoint.size() != outPoint.size() || 1506 if (inPoint.size() != outPoint.size() ||
1507 inPoint.size() != vertices.size()) { 1507 inPoint.size() != vertices.size()) {
1508 sgCritical<<"The Shape data are corrupted"; 1508 vCritical<<"The Shape data are corrupted";
1509 points = std::vector<SGPointF>(); 1509 points = std::vector<SGPointF>();
1510 } else { 1510 } else {
1511 int size = vertices.size(); 1511 int size = vertices.size();
@@ -1610,7 +1610,7 @@ void LottieParserImpl::parseKeyFrame(LOTAnimInfo<T> &obj)
1610 continue; 1610 continue;
1611 } else { 1611 } else {
1612#ifdef DEBUG_PARSER 1612#ifdef DEBUG_PARSER
1613 sgDebug<<"key frame property skipped = "<<key; 1613 vDebug<<"key frame property skipped = "<<key;
1614#endif 1614#endif
1615 Skip(key); 1615 Skip(key);
1616 } 1616 }
@@ -1673,7 +1673,7 @@ LottieParserImpl::parseShapeProperty(LOTAnimatable<LottieShapeData> &obj)
1673 } 1673 }
1674 } else { 1674 } else {
1675#ifdef DEBUG_PARSER 1675#ifdef DEBUG_PARSER
1676 sgDebug<<"shape property ignored = "<<key; 1676 vDebug<<"shape property ignored = "<<key;
1677#endif 1677#endif
1678 Skip(nullptr); 1678 Skip(nullptr);
1679 } 1679 }
@@ -1729,45 +1729,45 @@ class LOTDataInspector : public LOTDataVisitor
1729{ 1729{
1730public: 1730public:
1731 void visit(LOTCompositionData *obj) { 1731 void visit(LOTCompositionData *obj) {
1732 sgDebug<<"[COMP_START:: static:"<<obj->isStatic()<<" v:"<<obj->mVersion<<" [{ stFm endFm fmRate } { "<<obj->mStartFrame<<" "<<obj->mEndFrame<<" }]\n"; 1732 vDebug<<"[COMP_START:: static:"<<obj->isStatic()<<" v:"<<obj->mVersion<<" [{ stFm endFm fmRate } { "<<obj->mStartFrame<<" "<<obj->mEndFrame<<" }]\n";
1733 } 1733 }
1734 void visit(LOTLayerData *obj) { 1734 void visit(LOTLayerData *obj) {
1735 sgDebug<<"[LAYER_START:: type:"<<layerType(obj->mLayerType)<<" id:"<<obj->mId<<" Pid:"<<obj->mParentId 1735 vDebug<<"[LAYER_START:: type:"<<layerType(obj->mLayerType)<<" id:"<<obj->mId<<" Pid:"<<obj->mParentId
1736 <<" static:"<<obj->isStatic()<<"[{ stFm endFm stTm tmStrch } { " 1736 <<" static:"<<obj->isStatic()<<"[{ stFm endFm stTm tmStrch } { "
1737 <<obj->mInFrame<<" "<<obj->mOutFrame<<" "<<obj->mStartFrame<<" "<<obj->mTimeStreatch <<" }]"; 1737 <<obj->mInFrame<<" "<<obj->mOutFrame<<" "<<obj->mStartFrame<<" "<<obj->mTimeStreatch <<" }]";
1738 } 1738 }
1739 void visit(LOTTransformData *t) { 1739 void visit(LOTTransformData *t) {
1740 sgDebug<<"[TRANSFORM: static: "<<t->isStatic()<<" ]"; 1740 vDebug<<"[TRANSFORM: static: "<<t->isStatic()<<" ]";
1741 } 1741 }
1742 void visit(LOTShapeGroupData *o) { 1742 void visit(LOTShapeGroupData *o) {
1743 sgDebug<<"[GROUP_START:: static:"<<o->isStatic()<<"]"; 1743 vDebug<<"[GROUP_START:: static:"<<o->isStatic()<<"]";
1744 } 1744 }
1745 void visit(LOTShapeData *s) { 1745 void visit(LOTShapeData *s) {
1746 sgDebug<<"[SHAPE: static:"<<s->isStatic()<<"]"; 1746 vDebug<<"[SHAPE: static:"<<s->isStatic()<<"]";
1747 } 1747 }
1748 void visit(LOTRectData *r) { 1748 void visit(LOTRectData *r) {
1749 sgDebug<<"[RECT: static:"<<r->isStatic()<<"]"; 1749 vDebug<<"[RECT: static:"<<r->isStatic()<<"]";
1750 } 1750 }
1751 void visit(LOTEllipseData *e) { 1751 void visit(LOTEllipseData *e) {
1752 sgDebug<<"[ELLIPSE: static:"<<e->isStatic()<<"]"; 1752 vDebug<<"[ELLIPSE: static:"<<e->isStatic()<<"]";
1753 } 1753 }
1754 void visit(LOTTrimData *t) { 1754 void visit(LOTTrimData *t) {
1755 sgDebug<<"[TRIM: static: "<<t->isStatic()<<" ]"; 1755 vDebug<<"[TRIM: static: "<<t->isStatic()<<" ]";
1756 } 1756 }
1757 void visit(LOTRepeaterData *r) { 1757 void visit(LOTRepeaterData *r) {
1758 sgDebug<<"[REPEATER: static:"<<r->isStatic()<<"]"; 1758 vDebug<<"[REPEATER: static:"<<r->isStatic()<<"]";
1759 } 1759 }
1760 void visit(LOTFillData *f) { 1760 void visit(LOTFillData *f) {
1761 sgDebug<<"[FILL: static:"<<f->isStatic()<<"]"; 1761 vDebug<<"[FILL: static:"<<f->isStatic()<<"]";
1762 } 1762 }
1763 void visit(LOTGFillData *f) { 1763 void visit(LOTGFillData *f) {
1764 sgDebug<<"[GFILL: static:"<<f->isStatic()<<" ty:"<<f->mGradientType<<" s:"<<f->mStartPoint.value(0)<<" e:"<<f->mEndPoint.value(0)<<"]"; 1764 vDebug<<"[GFILL: static:"<<f->isStatic()<<" ty:"<<f->mGradientType<<" s:"<<f->mStartPoint.value(0)<<" e:"<<f->mEndPoint.value(0)<<"]";
1765 } 1765 }
1766 void visit(LOTGStrokeData *f) { 1766 void visit(LOTGStrokeData *f) {
1767 sgDebug<<"[GSTROKE: static:"<<f->isStatic()<<"]"; 1767 vDebug<<"[GSTROKE: static:"<<f->isStatic()<<"]";
1768 } 1768 }
1769 void visit(LOTStrokeData *s) { 1769 void visit(LOTStrokeData *s) {
1770 sgDebug<<"[STROKE: static:"<<s->isStatic()<<"]"; 1770 vDebug<<"[STROKE: static:"<<s->isStatic()<<"]";
1771 } 1771 }
1772 void visitChildren(LOTGroupData *obj) { 1772 void visitChildren(LOTGroupData *obj) {
1773 for(auto child :obj->mChildren) 1773 for(auto child :obj->mChildren)
@@ -1776,17 +1776,17 @@ public:
1776 case LOTData::Type::Layer: 1776 case LOTData::Type::Layer:
1777 { 1777 {
1778 LOTLayerData *layer = static_cast<LOTLayerData *>(obj); 1778 LOTLayerData *layer = static_cast<LOTLayerData *>(obj);
1779 sgDebug<<"[LAYER_END:: type:"<<layerType(layer->mLayerType).c_str()<<" id:"<<layer->mId<<"\n"; 1779 vDebug<<"[LAYER_END:: type:"<<layerType(layer->mLayerType).c_str()<<" id:"<<layer->mId<<"\n";
1780 break; 1780 break;
1781 } 1781 }
1782 case LOTData::Type::ShapeGroup: 1782 case LOTData::Type::ShapeGroup:
1783 sgDebug<<"[GROUP_END]"; 1783 vDebug<<"[GROUP_END]";
1784 break; 1784 break;
1785 case LOTData::Type::Composition: 1785 case LOTData::Type::Composition:
1786 sgDebug<<"[COMP End ]\n"; 1786 vDebug<<"[COMP End ]\n";
1787 break; 1787 break;
1788 case LOTData::Type::Repeater: 1788 case LOTData::Type::Repeater:
1789 sgDebug<<"[REPEATER End ]"; 1789 vDebug<<"[REPEATER End ]";
1790 break; 1790 break;
1791 default: 1791 default:
1792 break; 1792 break;
diff --git a/src/meson.build b/src/meson.build
index 7297aa1..dc219df 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -1,14 +1,10 @@
1subdir('ftraster') 1subdir('ftraster')
2subdir('util') 2subdir('vector')
3subdir('scenegraph')
4subdir('painting')
5subdir('lottie') 3subdir('lottie')
6 4
7 5
8 6
9library_deps = [ftraster_dep] 7library_deps = [ftraster_dep]
10library_deps += scenegraph_dep
11library_deps += utils_dep
12library_deps += painting_dep 8library_deps += painting_dep
13library_deps += lottie_dep 9library_deps += lottie_dep
14 10
diff --git a/src/text/sgfontdatabase.cpp b/src/text/sgfontdatabase.cpp
index cc00628..c94e3b5 100644
--- a/src/text/sgfontdatabase.cpp
+++ b/src/text/sgfontdatabase.cpp
@@ -1,6 +1,6 @@
1#include"sgfontdatabase.h" 1#include"sgfontdatabase.h"
2#include <pango/pangoft2.h> 2#include <pango/pangoft2.h>
3#include"sgdebug.h" 3#include"vdebug.h"
4 4
5class SGFontDatabasePrivate 5class SGFontDatabasePrivate
6{ 6{
diff --git a/src/util/meson.build b/src/util/meson.build
deleted file mode 100644
index d47e493..0000000
--- a/src/util/meson.build
+++ /dev/null
@@ -1,15 +0,0 @@
1source_file = files('sgregion.cpp')
2source_file += files('sgrle.cpp')
3source_file += files('sgpath.cpp')
4source_file += files('sgpathmesure.cpp')
5source_file += files('sgmatrix.cpp')
6source_file += files('sgelapsedtimer.cpp')
7source_file += files('sgdebug.cpp')
8source_file += files('sginterpolator.cpp')
9source_file += files('sgbezier.cpp')
10
11utils_dep = declare_dependency(
12 include_directories : include_directories('.'),
13 sources : source_file)
14
15
diff --git a/src/painting/meson.build b/src/vector/meson.build
index a294b89..3263d2f 100644
--- a/src/painting/meson.build
+++ b/src/vector/meson.build
@@ -6,6 +6,16 @@ source_file += files('vcompositionfunctions.cpp')
6source_file += files('vdrawhelper.cpp') 6source_file += files('vdrawhelper.cpp')
7source_file += files('vdrawhelper_sse2.cpp') 7source_file += files('vdrawhelper_sse2.cpp')
8 8
9source_file += files('vregion.cpp')
10source_file += files('vrle.cpp')
11source_file += files('vpath.cpp')
12source_file += files('vpathmesure.cpp')
13source_file += files('vmatrix.cpp')
14source_file += files('velapsedtimer.cpp')
15source_file += files('vdebug.cpp')
16source_file += files('vinterpolator.cpp')
17source_file += files('vbezier.cpp')
18
9 19
10 20
11painting_dep = declare_dependency( 21painting_dep = declare_dependency(
diff --git a/src/util/sgbezier.cpp b/src/vector/vbezier.cpp
index bf189da..97e926b 100644
--- a/src/util/sgbezier.cpp
+++ b/src/vector/vbezier.cpp
@@ -1,4 +1,4 @@
1#include "sgbezier.h" 1#include "vbezier.h"
2 2
3#include<cmath> 3#include<cmath>
4 4
@@ -17,10 +17,10 @@ lineLength(float x1, float y1, float x2, float y2)
17 return (x > y ? x + 0.375 * y : y + 0.375 * x); 17 return (x > y ? x + 0.375 * y : y + 0.375 * x);
18} 18}
19 19
20SGBezier SGBezier::fromPoints(const SGPointF &p1, const SGPointF &p2, 20VBezier VBezier::fromPoints(const SGPointF &p1, const SGPointF &p2,
21 const SGPointF &p3, const SGPointF &p4) 21 const SGPointF &p3, const SGPointF &p4)
22{ 22{
23 SGBezier b; 23 VBezier b;
24 b.x1 = p1.x(); 24 b.x1 = p1.x();
25 b.y1 = p1.y(); 25 b.y1 = p1.y();
26 b.x2 = p2.x(); 26 b.x2 = p2.x();
@@ -33,9 +33,9 @@ SGBezier SGBezier::fromPoints(const SGPointF &p1, const SGPointF &p2,
33} 33}
34 34
35float 35float
36SGBezier::length()const 36VBezier::length()const
37{ 37{
38 SGBezier left, right; /* bez poly splits */ 38 VBezier left, right; /* bez poly splits */
39 float len = 0.0; /* arc length */ 39 float len = 0.0; /* arc length */
40 float chord; /* chord length */ 40 float chord; /* chord length */
41 float length; 41 float length;
@@ -58,14 +58,14 @@ SGBezier::length()const
58 return len; 58 return len;
59} 59}
60 60
61SGBezier SGBezier::onInterval(float t0, float t1) const 61VBezier VBezier::onInterval(float t0, float t1) const
62{ 62{
63 if (t0 == 0 && t1 == 1) 63 if (t0 == 0 && t1 == 1)
64 return *this; 64 return *this;
65 65
66 SGBezier bezier = *this; 66 VBezier bezier = *this;
67 67
68 SGBezier result; 68 VBezier result;
69 bezier.parameterSplitLeft(t0, &result); 69 bezier.parameterSplitLeft(t0, &result);
70 float trueT = (t1-t0)/(1-t0); 70 float trueT = (t1-t0)/(1-t0);
71 bezier.parameterSplitLeft(trueT, &result); 71 bezier.parameterSplitLeft(trueT, &result);
@@ -73,7 +73,7 @@ SGBezier SGBezier::onInterval(float t0, float t1) const
73 return result; 73 return result;
74} 74}
75 75
76float SGBezier::tAtLength(float l) const 76float VBezier::tAtLength(float l) const
77{ 77{
78 float len = length(); 78 float len = length();
79 float t = 1.0; 79 float t = 1.0;
@@ -85,8 +85,8 @@ float SGBezier::tAtLength(float l) const
85 85
86 float lastBigger = 1.0; 86 float lastBigger = 1.0;
87 while (1) { 87 while (1) {
88 SGBezier right = *this; 88 VBezier right = *this;
89 SGBezier left; 89 VBezier left;
90 right.parameterSplitLeft(t, &left); 90 right.parameterSplitLeft(t, &left);
91 float lLen = left.length(); 91 float lLen = left.length();
92 if (fabs(lLen - l) < error) 92 if (fabs(lLen - l) < error)
@@ -103,7 +103,7 @@ float SGBezier::tAtLength(float l) const
103} 103}
104 104
105void 105void
106SGBezier::splitAtLength(float len, SGBezier *left, SGBezier *right) 106VBezier::splitAtLength(float len, VBezier *left, VBezier *right)
107{ 107{
108 float t; 108 float t;
109 109
diff --git a/include/sgbezier.h b/src/vector/vbezier.h
index 1ad2ac1..29a289d 100644
--- a/include/sgbezier.h
+++ b/src/vector/vbezier.h
@@ -1,21 +1,21 @@
1#ifndef SGBEZIER_H 1#ifndef VBEZIER_H
2#define SGBEZIER_H 2#define VBEZIER_H
3 3
4#include <sgpoint.h> 4#include <vpoint.h>
5 5
6class SG_EXPORT SGBezier 6class SG_EXPORT VBezier
7{ 7{
8public: 8public:
9 SGBezier(){} 9 VBezier(){}
10 SGPointF pointAt(float t)const; 10 SGPointF pointAt(float t)const;
11 SGBezier onInterval(float t0, float t1)const; 11 VBezier onInterval(float t0, float t1)const;
12 float length()const; 12 float length()const;
13 static void coefficients(float t, float &a, float &b, float &c, float &d); 13 static void coefficients(float t, float &a, float &b, float &c, float &d);
14 static SGBezier fromPoints(const SGPointF &start, const SGPointF &cp1, const SGPointF &cp2, const SGPointF &end); 14 static VBezier fromPoints(const SGPointF &start, const SGPointF &cp1, const SGPointF &cp2, const SGPointF &end);
15 inline void parameterSplitLeft(float t, SGBezier *left); 15 inline void parameterSplitLeft(float t, VBezier *left);
16 inline void split(SGBezier *firstHalf, SGBezier *secondHalf) const; 16 inline void split(VBezier *firstHalf, VBezier *secondHalf) const;
17 float tAtLength(float len) const; 17 float tAtLength(float len) const;
18 void splitAtLength(float len, SGBezier *left, SGBezier *right); 18 void splitAtLength(float len, VBezier *left, VBezier *right);
19 SGPointF pt1() const { return SGPointF(x1, y1); } 19 SGPointF pt1() const { return SGPointF(x1, y1); }
20 SGPointF pt2() const { return SGPointF(x2, y2); } 20 SGPointF pt2() const { return SGPointF(x2, y2); }
21 SGPointF pt3() const { return SGPointF(x3, y3); } 21 SGPointF pt3() const { return SGPointF(x3, y3); }
@@ -25,7 +25,7 @@ private:
25 float x1,y1,x2,y2,x3,y3,x4,y4; 25 float x1,y1,x2,y2,x3,y3,x4,y4;
26}; 26};
27 27
28inline void SGBezier::coefficients(float t, float &a, float &b, float &c, float &d) 28inline void VBezier::coefficients(float t, float &a, float &b, float &c, float &d)
29{ 29{
30 float m_t = 1. - t; 30 float m_t = 1. - t;
31 b = m_t * m_t; 31 b = m_t * m_t;
@@ -36,7 +36,7 @@ inline void SGBezier::coefficients(float t, float &a, float &b, float &c, float
36 c *= 3. * m_t; 36 c *= 3. * m_t;
37} 37}
38 38
39inline SGPointF SGBezier::pointAt(float t) const 39inline SGPointF VBezier::pointAt(float t) const
40{ 40{
41 // numerically more stable: 41 // numerically more stable:
42 float x, y; 42 float x, y;
@@ -61,7 +61,7 @@ inline SGPointF SGBezier::pointAt(float t) const
61 return SGPointF(x, y); 61 return SGPointF(x, y);
62} 62}
63 63
64inline void SGBezier::parameterSplitLeft(float t, SGBezier *left) 64inline void VBezier::parameterSplitLeft(float t, VBezier *left)
65{ 65{
66 left->x1 = x1; 66 left->x1 = x1;
67 left->y1 = y1; 67 left->y1 = y1;
@@ -85,7 +85,7 @@ inline void SGBezier::parameterSplitLeft(float t, SGBezier *left)
85 left->y4 = y1 = left->y3 + t * (y2 - left->y3); 85 left->y4 = y1 = left->y3 + t * (y2 - left->y3);
86} 86}
87 87
88inline void SGBezier::split(SGBezier *firstHalf, SGBezier *secondHalf) const 88inline void VBezier::split(VBezier *firstHalf, VBezier *secondHalf) const
89{ 89{
90 float c = (x2 + x3)*.5; 90 float c = (x2 + x3)*.5;
91 firstHalf->x2 = (x1 + x2)*.5; 91 firstHalf->x2 = (x1 + x2)*.5;
@@ -107,4 +107,4 @@ inline void SGBezier::split(SGBezier *firstHalf, SGBezier *secondHalf) const
107} 107}
108 108
109 109
110#endif //SGBEZIER_H 110#endif //VBEZIER_H
diff --git a/src/painting/vbitmap.cpp b/src/vector/vbitmap.cpp
index 39a9b0b..20fae4e 100644
--- a/src/painting/vbitmap.cpp
+++ b/src/vector/vbitmap.cpp
@@ -1,5 +1,5 @@
1#include "vbitmap.h" 1#include "vbitmap.h"
2#include "sgglobal.h" 2#include "vglobal.h"
3#include<string.h> 3#include<string.h>
4 4
5struct VBitmapData 5struct VBitmapData
diff --git a/src/painting/vbitmap.h b/src/vector/vbitmap.h
index 4341d55..39d6d24 100644
--- a/src/painting/vbitmap.h
+++ b/src/vector/vbitmap.h
@@ -1,7 +1,7 @@
1#ifndef VBITMAP_H 1#ifndef VBITMAP_H
2#define VBITMAP_H 2#define VBITMAP_H
3 3
4#include "sgrect.h" 4#include "vrect.h"
5 5
6struct VBitmapData; 6struct VBitmapData;
7typedef void (*VBitmapCleanupFunction)(void *); 7typedef void (*VBitmapCleanupFunction)(void *);
diff --git a/src/painting/vbrush.cpp b/src/vector/vbrush.cpp
index a237f92..a237f92 100644
--- a/src/painting/vbrush.cpp
+++ b/src/vector/vbrush.cpp
diff --git a/src/painting/vcompositionfunctions.cpp b/src/vector/vcompositionfunctions.cpp
index 5122210..5122210 100644
--- a/src/painting/vcompositionfunctions.cpp
+++ b/src/vector/vcompositionfunctions.cpp
diff --git a/src/painting/vdasher.cpp b/src/vector/vdasher.cpp
index 7151c1d..ed98edc 100644
--- a/src/painting/vdasher.cpp
+++ b/src/vector/vdasher.cpp
@@ -1,5 +1,5 @@
1#include"vdasher.h" 1#include"vdasher.h"
2#include"sgbezier.h" 2#include"vbezier.h"
3 3
4class VLine 4class VLine
5{ 5{
@@ -52,7 +52,7 @@ VLine::splitAtLength(float lengthAt, VLine &left, VLine &right) const
52VDasher::VDasher(const float *dashArray, int size) 52VDasher::VDasher(const float *dashArray, int size)
53{ 53{
54 if (!(size % 2)) 54 if (!(size % 2))
55 sgCritical<<"invalid dashArray format"; 55 vCritical<<"invalid dashArray format";
56 56
57 mDashArray = reinterpret_cast<const VDasher::Dash *>(dashArray); 57 mDashArray = reinterpret_cast<const VDasher::Dash *>(dashArray);
58 mArraySize = size/2; 58 mArraySize = size/2;
@@ -151,9 +151,9 @@ void VDasher::lineTo(const SGPointF &p)
151 151
152void VDasher::cubicTo(const SGPointF &cp1, const SGPointF &cp2, const SGPointF &e) 152void VDasher::cubicTo(const SGPointF &cp1, const SGPointF &cp2, const SGPointF &e)
153{ 153{
154 SGBezier left, right; 154 VBezier left, right;
155 float bezLen = 0.0; 155 float bezLen = 0.0;
156 SGBezier b = SGBezier::fromPoints(mCurPt, cp1, cp2, e); 156 VBezier b = VBezier::fromPoints(mCurPt, cp1, cp2, e);
157 bezLen = b.length(); 157 bezLen = b.length();
158 if (bezLen < mCurrentDashLength) { 158 if (bezLen < mCurrentDashLength) {
159 mCurrentDashLength -= bezLen; 159 mCurrentDashLength -= bezLen;
diff --git a/src/painting/vdasher.h b/src/vector/vdasher.h
index 9557117..957b444 100644
--- a/src/painting/vdasher.h
+++ b/src/vector/vdasher.h
@@ -1,6 +1,6 @@
1#ifndef VDASHER_H 1#ifndef VDASHER_H
2#define VDASHER_H 2#define VDASHER_H
3#include "sgpath.h" 3#include "vpath.h"
4class VDasher 4class VDasher
5{ 5{
6 public: 6 public:
diff --git a/src/util/sgdebug.cpp b/src/vector/vdebug.cpp
index 2f6078c..de0fe79 100644
--- a/src/util/sgdebug.cpp
+++ b/src/vector/vdebug.cpp
@@ -1,4 +1,4 @@
1#include "sgdebug.h" 1#include "vdebug.h"
2#include <cstring> 2#include <cstring>
3#include <chrono> 3#include <chrono>
4#include <ctime> 4#include <ctime>
@@ -57,7 +57,7 @@ namespace
57 57
58} // anonymous namespace 58} // anonymous namespace
59 59
60 typedef std::tuple < char, uint32_t, uint64_t, int32_t, int64_t, double, SGDebug::string_literal_t, char * > SupportedTypes; 60 typedef std::tuple < char, uint32_t, uint64_t, int32_t, int64_t, double, VDebug::string_literal_t, char * > SupportedTypes;
61 61
62 char const * to_string(LogLevel loglevel) 62 char const * to_string(LogLevel loglevel)
63 { 63 {
@@ -76,21 +76,21 @@ namespace
76 } 76 }
77 77
78 template < typename Arg > 78 template < typename Arg >
79 void SGDebug::encode(Arg arg) 79 void VDebug::encode(Arg arg)
80 { 80 {
81 *reinterpret_cast<Arg*>(buffer()) = arg; 81 *reinterpret_cast<Arg*>(buffer()) = arg;
82 m_bytes_used += sizeof(Arg); 82 m_bytes_used += sizeof(Arg);
83 } 83 }
84 84
85 template < typename Arg > 85 template < typename Arg >
86 void SGDebug::encode(Arg arg, uint8_t type_id) 86 void VDebug::encode(Arg arg, uint8_t type_id)
87 { 87 {
88 resize_buffer_if_needed(sizeof(Arg) + sizeof(uint8_t)); 88 resize_buffer_if_needed(sizeof(Arg) + sizeof(uint8_t));
89 encode < uint8_t >(type_id); 89 encode < uint8_t >(type_id);
90 encode < Arg >(arg); 90 encode < Arg >(arg);
91 } 91 }
92 92
93 SGDebug::SGDebug(LogLevel level, char const * file, char const * function, uint32_t line) 93 VDebug::VDebug(LogLevel level, char const * file, char const * function, uint32_t line)
94 : m_bytes_used(0) 94 : m_bytes_used(0)
95 , m_buffer_size(sizeof(m_stack_buffer)) 95 , m_buffer_size(sizeof(m_stack_buffer))
96 { 96 {
@@ -107,9 +107,9 @@ namespace
107 } 107 }
108 } 108 }
109 109
110 SGDebug::~SGDebug() = default; 110 VDebug::~VDebug() = default;
111 111
112 void SGDebug::stringify(std::ostream & os) 112 void VDebug::stringify(std::ostream & os)
113 { 113 {
114 char * b = !m_heap_buffer ? m_stack_buffer : m_heap_buffer.get(); 114 char * b = !m_heap_buffer ? m_stack_buffer : m_heap_buffer.get();
115 char const * const end = b + m_bytes_used; 115 char const * const end = b + m_bytes_used;
@@ -144,11 +144,11 @@ namespace
144 } 144 }
145 145
146 template <> 146 template <>
147 char * decode(std::ostream & os, char * b, SGDebug::string_literal_t * dummy) 147 char * decode(std::ostream & os, char * b, VDebug::string_literal_t * dummy)
148 { 148 {
149 SGDebug::string_literal_t s = *reinterpret_cast < SGDebug::string_literal_t * >(b); 149 VDebug::string_literal_t s = *reinterpret_cast < VDebug::string_literal_t * >(b);
150 os << s.m_s; 150 os << s.m_s;
151 return b + sizeof(SGDebug::string_literal_t); 151 return b + sizeof(VDebug::string_literal_t);
152 } 152 }
153 153
154 template <> 154 template <>
@@ -162,7 +162,7 @@ namespace
162 return ++b; 162 return ++b;
163 } 163 }
164 164
165 void SGDebug::stringify(std::ostream & os, char * start, char const * const end) 165 void VDebug::stringify(std::ostream & os, char * start, char const * const end)
166 { 166 {
167 if (start == end) 167 if (start == end)
168 return; 168 return;
@@ -198,12 +198,12 @@ namespace
198 } 198 }
199 } 199 }
200 200
201 char * SGDebug::buffer() 201 char * VDebug::buffer()
202 { 202 {
203 return !m_heap_buffer ? &m_stack_buffer[m_bytes_used] : &(m_heap_buffer.get())[m_bytes_used]; 203 return !m_heap_buffer ? &m_stack_buffer[m_bytes_used] : &(m_heap_buffer.get())[m_bytes_used];
204 } 204 }
205 205
206 void SGDebug::resize_buffer_if_needed(size_t additional_bytes) 206 void VDebug::resize_buffer_if_needed(size_t additional_bytes)
207 { 207 {
208 size_t const required_size = m_bytes_used + additional_bytes; 208 size_t const required_size = m_bytes_used + additional_bytes;
209 209
@@ -226,19 +226,19 @@ namespace
226 } 226 }
227 } 227 }
228 228
229 void SGDebug::encode(char const * arg) 229 void VDebug::encode(char const * arg)
230 { 230 {
231 if (arg != nullptr) 231 if (arg != nullptr)
232 encode_c_string(arg, strlen(arg)); 232 encode_c_string(arg, strlen(arg));
233 } 233 }
234 234
235 void SGDebug::encode(char * arg) 235 void VDebug::encode(char * arg)
236 { 236 {
237 if (arg != nullptr) 237 if (arg != nullptr)
238 encode_c_string(arg, strlen(arg)); 238 encode_c_string(arg, strlen(arg));
239 } 239 }
240 240
241 void SGDebug::encode_c_string(char const * arg, size_t length) 241 void VDebug::encode_c_string(char const * arg, size_t length)
242 { 242 {
243 if (length == 0) 243 if (length == 0)
244 return; 244 return;
@@ -251,59 +251,59 @@ namespace
251 m_bytes_used += 1 + length + 1; 251 m_bytes_used += 1 + length + 1;
252 } 252 }
253 253
254 void SGDebug::encode(string_literal_t arg) 254 void VDebug::encode(string_literal_t arg)
255 { 255 {
256 encode < string_literal_t >(arg, TupleIndex < string_literal_t, SupportedTypes >::value); 256 encode < string_literal_t >(arg, TupleIndex < string_literal_t, SupportedTypes >::value);
257 } 257 }
258 258
259 SGDebug& SGDebug::operator<<(std::string const & arg) 259 VDebug& VDebug::operator<<(std::string const & arg)
260 { 260 {
261 encode_c_string(arg.c_str(), arg.length()); 261 encode_c_string(arg.c_str(), arg.length());
262 return *this; 262 return *this;
263 } 263 }
264 264
265 SGDebug& SGDebug::operator<<(int32_t arg) 265 VDebug& VDebug::operator<<(int32_t arg)
266 { 266 {
267 encode < int32_t >(arg, TupleIndex < int32_t, SupportedTypes >::value); 267 encode < int32_t >(arg, TupleIndex < int32_t, SupportedTypes >::value);
268 return *this; 268 return *this;
269 } 269 }
270 270
271 SGDebug& SGDebug::operator<<(uint32_t arg) 271 VDebug& VDebug::operator<<(uint32_t arg)
272 { 272 {
273 encode < uint32_t >(arg, TupleIndex < uint32_t, SupportedTypes >::value); 273 encode < uint32_t >(arg, TupleIndex < uint32_t, SupportedTypes >::value);
274 return *this; 274 return *this;
275 } 275 }
276 276
277// SGDebug& SGDebug::operator<<(int64_t arg) 277// VDebug& VDebug::operator<<(int64_t arg)
278// { 278// {
279// encode < int64_t >(arg, TupleIndex < int64_t, SupportedTypes >::value); 279// encode < int64_t >(arg, TupleIndex < int64_t, SupportedTypes >::value);
280// return *this; 280// return *this;
281// } 281// }
282 282
283// SGDebug& SGDebug::operator<<(uint64_t arg) 283// VDebug& VDebug::operator<<(uint64_t arg)
284// { 284// {
285// encode < uint64_t >(arg, TupleIndex < uint64_t, SupportedTypes >::value); 285// encode < uint64_t >(arg, TupleIndex < uint64_t, SupportedTypes >::value);
286// return *this; 286// return *this;
287// } 287// }
288 SGDebug& SGDebug::operator<<(unsigned long arg) 288 VDebug& VDebug::operator<<(unsigned long arg)
289 { 289 {
290 encode < uint64_t >(arg, TupleIndex < uint64_t, SupportedTypes >::value); 290 encode < uint64_t >(arg, TupleIndex < uint64_t, SupportedTypes >::value);
291 return *this; 291 return *this;
292 } 292 }
293 293
294 SGDebug& SGDebug::operator<<(long arg) 294 VDebug& VDebug::operator<<(long arg)
295 { 295 {
296 encode < int64_t >(arg, TupleIndex < int64_t, SupportedTypes >::value); 296 encode < int64_t >(arg, TupleIndex < int64_t, SupportedTypes >::value);
297 return *this; 297 return *this;
298 } 298 }
299 299
300 SGDebug& SGDebug::operator<<(double arg) 300 VDebug& VDebug::operator<<(double arg)
301 { 301 {
302 encode < double >(arg, TupleIndex < double, SupportedTypes >::value); 302 encode < double >(arg, TupleIndex < double, SupportedTypes >::value);
303 return *this; 303 return *this;
304 } 304 }
305 305
306 SGDebug& SGDebug::operator<<(char arg) 306 VDebug& VDebug::operator<<(char arg)
307 { 307 {
308 encode < char >(arg, TupleIndex < char, SupportedTypes >::value); 308 encode < char >(arg, TupleIndex < char, SupportedTypes >::value);
309 return *this; 309 return *this;
@@ -312,8 +312,8 @@ namespace
312 struct BufferBase 312 struct BufferBase
313 { 313 {
314 virtual ~BufferBase() = default; 314 virtual ~BufferBase() = default;
315 virtual void push(SGDebug && logline) = 0; 315 virtual void push(VDebug && logline) = 0;
316 virtual bool try_pop(SGDebug & logline) = 0; 316 virtual bool try_pop(VDebug & logline) = 0;
317 }; 317 };
318 318
319 struct SpinLock 319 struct SpinLock
@@ -347,8 +347,8 @@ namespace
347 347
348 std::atomic_flag flag; 348 std::atomic_flag flag;
349 char written; 349 char written;
350 char padding[256 - sizeof(std::atomic_flag) - sizeof(char) - sizeof(SGDebug)]; 350 char padding[256 - sizeof(std::atomic_flag) - sizeof(char) - sizeof(VDebug)];
351 SGDebug logline; 351 VDebug logline;
352 }; 352 };
353 353
354 RingBuffer(size_t const size) 354 RingBuffer(size_t const size)
@@ -373,7 +373,7 @@ namespace
373 std::free(m_ring); 373 std::free(m_ring);
374 } 374 }
375 375
376 void push(SGDebug && logline) override 376 void push(VDebug && logline) override
377 { 377 {
378 unsigned int write_index = m_write_index.fetch_add(1, std::memory_order_relaxed) % m_size; 378 unsigned int write_index = m_write_index.fetch_add(1, std::memory_order_relaxed) % m_size;
379 Item & item = m_ring[write_index]; 379 Item & item = m_ring[write_index];
@@ -382,7 +382,7 @@ namespace
382 item.written = 1; 382 item.written = 1;
383 } 383 }
384 384
385 bool try_pop(SGDebug & logline) override 385 bool try_pop(VDebug & logline) override
386 { 386 {
387 Item & item = m_ring[m_read_index % m_size]; 387 Item & item = m_ring[m_read_index % m_size];
388 SpinLock spinlock(item.flag); 388 SpinLock spinlock(item.flag);
@@ -413,9 +413,9 @@ namespace
413 public: 413 public:
414 struct Item 414 struct Item
415 { 415 {
416 Item(SGDebug && logline) : logline(std::move(logline)) {} 416 Item(VDebug && logline) : logline(std::move(logline)) {}
417 char padding[256 - sizeof(SGDebug)]; 417 char padding[256 - sizeof(VDebug)];
418 SGDebug logline; 418 VDebug logline;
419 }; 419 };
420 420
421 static constexpr const size_t size = 32768; // 8MB. Helps reduce memory fragmentation 421 static constexpr const size_t size = 32768; // 8MB. Helps reduce memory fragmentation
@@ -440,14 +440,14 @@ namespace
440 } 440 }
441 441
442 // Returns true if we need to switch to next buffer 442 // Returns true if we need to switch to next buffer
443 bool push(SGDebug && logline, unsigned int const write_index) 443 bool push(VDebug && logline, unsigned int const write_index)
444 { 444 {
445 new (&m_buffer[write_index]) Item(std::move(logline)); 445 new (&m_buffer[write_index]) Item(std::move(logline));
446 m_write_state[write_index].store(1, std::memory_order_release); 446 m_write_state[write_index].store(1, std::memory_order_release);
447 return m_write_state[size].fetch_add(1, std::memory_order_acquire) + 1 == size; 447 return m_write_state[size].fetch_add(1, std::memory_order_acquire) + 1 == size;
448 } 448 }
449 449
450 bool try_pop(SGDebug & logline, unsigned int const read_index) 450 bool try_pop(VDebug & logline, unsigned int const read_index)
451 { 451 {
452 if (m_write_state[read_index].load(std::memory_order_acquire)) 452 if (m_write_state[read_index].load(std::memory_order_acquire))
453 { 453 {
@@ -480,7 +480,7 @@ namespace
480 setup_next_write_buffer(); 480 setup_next_write_buffer();
481 } 481 }
482 482
483 void push(SGDebug && logline) override 483 void push(VDebug && logline) override
484 { 484 {
485 unsigned int write_index = m_write_index.fetch_add(1, std::memory_order_relaxed); 485 unsigned int write_index = m_write_index.fetch_add(1, std::memory_order_relaxed);
486 if (write_index < Buffer::size) 486 if (write_index < Buffer::size)
@@ -497,7 +497,7 @@ namespace
497 } 497 }
498 } 498 }
499 499
500 bool try_pop(SGDebug & logline) override 500 bool try_pop(VDebug & logline) override
501 { 501 {
502 if (m_current_read_buffer == nullptr) 502 if (m_current_read_buffer == nullptr)
503 m_current_read_buffer = get_next_read_buffer(); 503 m_current_read_buffer = get_next_read_buffer();
@@ -558,7 +558,7 @@ namespace
558 roll_file(); 558 roll_file();
559 } 559 }
560 560
561 void write(SGDebug & logline) 561 void write(VDebug & logline)
562 { 562 {
563 auto pos = m_os->tellp(); 563 auto pos = m_os->tellp();
564 logline.stringify(*m_os); 564 logline.stringify(*m_os);
@@ -623,7 +623,7 @@ namespace
623 m_thread.join(); 623 m_thread.join();
624 } 624 }
625 625
626 void add(SGDebug && logline) 626 void add(VDebug && logline)
627 { 627 {
628 m_buffer_base->push(std::move(logline)); 628 m_buffer_base->push(std::move(logline));
629 } 629 }
@@ -634,7 +634,7 @@ namespace
634 while (m_state.load(std::memory_order_acquire) == State::INIT) 634 while (m_state.load(std::memory_order_acquire) == State::INIT)
635 std::this_thread::sleep_for(std::chrono::microseconds(50)); 635 std::this_thread::sleep_for(std::chrono::microseconds(50));
636 636
637 SGDebug logline(LogLevel::INFO, nullptr, nullptr, 0); 637 VDebug logline(LogLevel::INFO, nullptr, nullptr, 0);
638 638
639 while (m_state.load() == State::READY) 639 while (m_state.load() == State::READY)
640 { 640 {
@@ -668,7 +668,7 @@ namespace
668 std::unique_ptr < NanoLogger > nanologger; 668 std::unique_ptr < NanoLogger > nanologger;
669 std::atomic < NanoLogger * > atomic_nanologger; 669 std::atomic < NanoLogger * > atomic_nanologger;
670 670
671 bool SGDebugServer::operator==(SGDebug & logline) 671 bool VDebugServer::operator==(VDebug & logline)
672 { 672 {
673 atomic_nanologger.load(std::memory_order_acquire)->add(std::move(logline)); 673 atomic_nanologger.load(std::memory_order_acquire)->add(std::move(logline));
674 return true; 674 return true;
diff --git a/include/sgdebug.h b/src/vector/vdebug.h
index 8d863d8..ad2e3d7 100644
--- a/include/sgdebug.h
+++ b/src/vector/vdebug.h
@@ -1,5 +1,5 @@
1#ifndef SGDEBUG_H 1#ifndef VDEBUG_H
2#define SGDEBUG_H 2#define VDEBUG_H
3#include <cstdint> 3#include <cstdint>
4#include <memory> 4#include <memory>
5#include <string> 5#include <string>
@@ -8,48 +8,48 @@
8 8
9 9
10 10
11 enum class LogLevel : uint8_t { INFO, WARN, CRIT, OFF }; 11enum class LogLevel : uint8_t { INFO, WARN, CRIT, OFF };
12 12
13 13
14class SGDebug 14class VDebug
15{ 15{
16public: 16public:
17 SGDebug(); 17 VDebug();
18 SGDebug& debug() {return *this;} 18 VDebug& debug() {return *this;}
19 SGDebug(LogLevel level, char const * file, char const * function, uint32_t line); 19 VDebug(LogLevel level, char const * file, char const * function, uint32_t line);
20 ~SGDebug(); 20 ~VDebug();
21 21
22 SGDebug(SGDebug &&) = default; 22 VDebug(VDebug &&) = default;
23 SGDebug& operator=(SGDebug &&) = default; 23 VDebug& operator=(VDebug &&) = default;
24 24
25 void stringify(std::ostream & os); 25 void stringify(std::ostream & os);
26 26
27 SGDebug& operator<<(char arg); 27 VDebug& operator<<(char arg);
28 SGDebug& operator<<(int32_t arg); 28 VDebug& operator<<(int32_t arg);
29 SGDebug& operator<<(uint32_t arg); 29 VDebug& operator<<(uint32_t arg);
30 //SGDebug& operator<<(int64_t arg); 30 //VDebug& operator<<(int64_t arg);
31 //SGDebug& operator<<(uint64_t arg); 31 //VDebug& operator<<(uint64_t arg);
32 32
33 SGDebug& operator<<(long arg); 33 VDebug& operator<<(long arg);
34 SGDebug& operator<<(unsigned long arg); 34 VDebug& operator<<(unsigned long arg);
35 SGDebug& operator<<(double arg); 35 VDebug& operator<<(double arg);
36 SGDebug& operator<<(std::string const & arg); 36 VDebug& operator<<(std::string const & arg);
37 37
38 template < size_t N > 38 template < size_t N >
39 SGDebug& operator<<(const char (&arg)[N]) { 39 VDebug& operator<<(const char (&arg)[N]) {
40 encode(string_literal_t(arg)); 40 encode(string_literal_t(arg));
41 return *this; 41 return *this;
42 } 42 }
43 43
44 template < typename Arg > 44 template < typename Arg >
45 typename std::enable_if < std::is_same < Arg, char const * >::value, SGDebug& >::type 45 typename std::enable_if < std::is_same < Arg, char const * >::value, VDebug& >::type
46 operator<<(Arg const & arg) { 46 operator<<(Arg const & arg) {
47 encode(arg); 47 encode(arg);
48 return *this; 48 return *this;
49 } 49 }
50 50
51 template < typename Arg > 51 template < typename Arg >
52 typename std::enable_if < std::is_same < Arg, char * >::value, SGDebug& >::type 52 typename std::enable_if < std::is_same < Arg, char * >::value, VDebug& >::type
53 operator<<(Arg const & arg) { 53 operator<<(Arg const & arg) {
54 encode(arg); 54 encode(arg);
55 return *this; 55 return *this;
@@ -84,13 +84,13 @@ private:
84 char m_stack_buffer[256 - sizeof(bool) - 2 * sizeof(size_t) - sizeof(decltype(m_heap_buffer)) - 8 /* Reserved */]; 84 char m_stack_buffer[256 - sizeof(bool) - 2 * sizeof(size_t) - sizeof(decltype(m_heap_buffer)) - 8 /* Reserved */];
85}; 85};
86 86
87struct SGDebugServer 87struct VDebugServer
88{ 88{
89 /* 89 /*
90 * Ideally this should have been operator+= 90 * Ideally this should have been operator+=
91 * Could not get that to compile, so here we are... 91 * Could not get that to compile, so here we are...
92 */ 92 */
93 bool operator==(SGDebug &); 93 bool operator==(VDebug &);
94}; 94};
95 95
96void set_log_level(LogLevel level); 96void set_log_level(LogLevel level);
@@ -135,9 +135,9 @@ void initialize(NonGuaranteedLogger ngl, std::string const & log_directory,
135 std::string const & log_file_name, uint32_t log_file_roll_size_mb); 135 std::string const & log_file_name, uint32_t log_file_roll_size_mb);
136 136
137 137
138#define SGDEBUG_LOG(LEVEL) SGDebugServer() == SGDebug(LEVEL, __FILE__, __func__, __LINE__).debug() 138#define SGDEBUG_LOG(LEVEL) VDebugServer() == VDebug(LEVEL, __FILE__, __func__, __LINE__).debug()
139#define sgDebug is_logged(LogLevel::INFO) && SGDEBUG_LOG(LogLevel::INFO) 139#define vDebug is_logged(LogLevel::INFO) && SGDEBUG_LOG(LogLevel::INFO)
140#define sgWarning is_logged(LogLevel::WARN) && SGDEBUG_LOG(LogLevel::WARN) 140#define vWarning is_logged(LogLevel::WARN) && SGDEBUG_LOG(LogLevel::WARN)
141#define sgCritical is_logged(LogLevel::CRIT) && SGDEBUG_LOG(LogLevel::CRIT) 141#define vCritical is_logged(LogLevel::CRIT) && SGDEBUG_LOG(LogLevel::CRIT)
142 142
143#endif // SGDEBUG_H 143#endif // VDEBUG_H
diff --git a/src/painting/vdrawhelper.cpp b/src/vector/vdrawhelper.cpp
index d853304..d853304 100644
--- a/src/painting/vdrawhelper.cpp
+++ b/src/vector/vdrawhelper.cpp
diff --git a/src/painting/vdrawhelper.h b/src/vector/vdrawhelper.h
index 92c922f..651ac2b 100644
--- a/src/painting/vdrawhelper.h
+++ b/src/vector/vdrawhelper.h
@@ -1,7 +1,7 @@
1#ifndef VDRAWHELPER_H 1#ifndef VDRAWHELPER_H
2#define VDRAWHELPER_H 2#define VDRAWHELPER_H
3 3
4#include"sgrect.h" 4#include"vrect.h"
5#include"vbrush.h" 5#include"vbrush.h"
6#include"sgrle.h" 6#include"sgrle.h"
7#include"vpainter.h" 7#include"vpainter.h"
diff --git a/src/painting/vdrawhelper_neon.cpp b/src/vector/vdrawhelper_neon.cpp
index e69de29..e69de29 100644
--- a/src/painting/vdrawhelper_neon.cpp
+++ b/src/vector/vdrawhelper_neon.cpp
diff --git a/src/painting/vdrawhelper_sse2.cpp b/src/vector/vdrawhelper_sse2.cpp
index 18b4acf..18b4acf 100644
--- a/src/painting/vdrawhelper_sse2.cpp
+++ b/src/vector/vdrawhelper_sse2.cpp
diff --git a/src/util/sgelapsedtimer.cpp b/src/vector/velapsedtimer.cpp
index a063a46..a063a46 100644
--- a/src/util/sgelapsedtimer.cpp
+++ b/src/vector/velapsedtimer.cpp
diff --git a/include/sgglobal.h b/src/vector/vglobal.h
index 439ab10..7fc5e3a 100644
--- a/include/sgglobal.h
+++ b/src/vector/vglobal.h
@@ -19,7 +19,7 @@ typedef uint8_t uchar;
19#define SG_CONSTEXPR constexpr 19#define SG_CONSTEXPR constexpr
20#define SG_NOTHROW noexcept 20#define SG_NOTHROW noexcept
21 21
22#include"sgdebug.h" 22#include"vdebug.h"
23 23
24#define VECTOR_FALLTHROUGH 24#define VECTOR_FALLTHROUGH
25 25
diff --git a/src/util/sginterpolator.cpp b/src/vector/vinterpolator.cpp
index c301aaf..c301aaf 100644
--- a/src/util/sginterpolator.cpp
+++ b/src/vector/vinterpolator.cpp
diff --git a/src/util/sgmatrix.cpp b/src/vector/vmatrix.cpp
index ac4ee23..bbd1631 100644
--- a/src/util/sgmatrix.cpp
+++ b/src/vector/vmatrix.cpp
@@ -1,8 +1,8 @@
1#include"sgmatrix.h" 1#include"vmatrix.h"
2#include<cmath> 2#include<cmath>
3#include<cstring> 3#include<cstring>
4#include<cassert> 4#include<cassert>
5#include<sgglobal.h> 5#include<vglobal.h>
6 6
7/* m11 m21 mtx 7/* m11 m21 mtx
8 * m12 m22 mty 8 * m12 m22 mty
diff --git a/include/sgmatrix.h b/src/vector/vmatrix.h
index 3ae33d2..9eefc61 100644
--- a/include/sgmatrix.h
+++ b/src/vector/vmatrix.h
@@ -1,8 +1,8 @@
1#ifndef SGMATRIX_H 1#ifndef SGMATRIX_H
2#define SGMATRIX_H 2#define SGMATRIX_H
3#include"sgpoint.h" 3#include"vpoint.h"
4#include "sgregion.h" 4#include "sgregion.h"
5#include "sgglobal.h" 5#include "vglobal.h"
6 6
7struct SGMatrixData; 7struct SGMatrixData;
8class SG_EXPORT SGMatrix 8class SG_EXPORT SGMatrix
diff --git a/src/painting/vpainter.cpp b/src/vector/vpainter.cpp
index 23d01cb..23d01cb 100644
--- a/src/painting/vpainter.cpp
+++ b/src/vector/vpainter.cpp
diff --git a/src/painting/vpainter.h b/src/vector/vpainter.h
index e1dc527..dcab96c 100644
--- a/src/painting/vpainter.h
+++ b/src/vector/vpainter.h
@@ -1,7 +1,7 @@
1#ifndef VPAINTER_H 1#ifndef VPAINTER_H
2#define VPAINTER_H 2#define VPAINTER_H
3 3
4#include"sgpoint.h" 4#include"vpoint.h"
5#include"sgrle.h" 5#include"sgrle.h"
6#include"vbrush.h" 6#include"vbrush.h"
7 7
diff --git a/src/util/sgpath.cpp b/src/vector/vpath.cpp
index 0987051..e44c496 100644
--- a/src/util/sgpath.cpp
+++ b/src/vector/vpath.cpp
@@ -1,9 +1,9 @@
1#include"sgpath.h" 1#include"vpath.h"
2#include<vector> 2#include<vector>
3#include<cassert> 3#include<cassert>
4#include"sgdebug.h" 4#include"vdebug.h"
5#include"sgbezier.h" 5#include"vbezier.h"
6#include "sgrect.h" 6#include "vrect.h"
7 7
8struct SGPathData 8struct SGPathData
9{ 9{
@@ -258,7 +258,7 @@ void findEllipseCoords(const SGRectF &r, float angle, float length,
258 t = 1 - t; 258 t = 1 - t;
259 259
260 float a, b, c, d; 260 float a, b, c, d;
261 SGBezier::coefficients(t, a, b, c, d); 261 VBezier::coefficients(t, a, b, c, d);
262 SGPointF p(a + b + c*PATH_KAPPA, d + c + b*PATH_KAPPA); 262 SGPointF p(a + b + c*PATH_KAPPA, d + c + b*PATH_KAPPA);
263 263
264 // left quadrants 264 // left quadrants
@@ -420,11 +420,11 @@ curvesForArc(const SGRectF &rect, float startAngle, float sweepLength,
420 const int quadrant = 3 - ((i % 4) + 4) % 4; 420 const int quadrant = 3 - ((i % 4) + 4) % 4;
421 const int j = 3 * quadrant; 421 const int j = 3 * quadrant;
422 422
423 SGBezier b; 423 VBezier b;
424 if (delta > 0) 424 if (delta > 0)
425 b = SGBezier::fromPoints(points[j + 3], points[j + 2], points[j + 1], points[j]); 425 b = VBezier::fromPoints(points[j + 3], points[j + 2], points[j + 1], points[j]);
426 else 426 else
427 b = SGBezier::fromPoints(points[j], points[j + 1], points[j + 2], points[j + 3]); 427 b = VBezier::fromPoints(points[j], points[j + 1], points[j + 2], points[j + 3]);
428 428
429 // empty arc? 429 // empty arc?
430 if (startSegment == endSegment && floatCmp(startT, endT)) 430 if (startSegment == endSegment && floatCmp(startT, endT))
diff --git a/include/sgpath.h b/src/vector/vpath.h
index 4672c1b..072d918 100644
--- a/include/sgpath.h
+++ b/src/vector/vpath.h
@@ -1,9 +1,8 @@
1#ifndef SGPATH_H 1#ifndef SGPATH_H
2#define SGPATH_H 2#define SGPATH_H
3#include "sgglobal.h" 3#include "vpoint.h"
4#include "sgpoint.h" 4#include "vrect.h"
5#include "sgrect.h" 5#include "vmatrix.h"
6#include "sgmatrix.h"
7#include<vector> 6#include<vector>
8 7
9struct SGPathData; 8struct SGPathData;
diff --git a/src/util/sgpathmesure.cpp b/src/vector/vpathmesure.cpp
index 26f9c66..1a4d47c 100644
--- a/src/util/sgpathmesure.cpp
+++ b/src/vector/vpathmesure.cpp
@@ -1,4 +1,4 @@
1#include"sgpathmesure.h" 1#include"vpathmesure.h"
2 2
3class SGPathMesureData 3class SGPathMesureData
4{ 4{
diff --git a/include/sgpathmesure.h b/src/vector/vpathmesure.h
index 1e03266..12498b1 100644
--- a/include/sgpathmesure.h
+++ b/src/vector/vpathmesure.h
@@ -1,7 +1,7 @@
1#ifndef SGPATHMESURE_H 1#ifndef SGPATHMESURE_H
2#define SGPATHMESURE_H 2#define SGPATHMESURE_H
3 3
4#include "sgpath.h" 4#include "vpath.h"
5 5
6class SGPathMesureData; 6class SGPathMesureData;
7class SGPathMesure 7class SGPathMesure
diff --git a/include/sgpoint.h b/src/vector/vpoint.h
index b8430f1..d2ee089 100644
--- a/include/sgpoint.h
+++ b/src/vector/vpoint.h
@@ -1,7 +1,7 @@
1#ifndef SGPOINT_H 1#ifndef SGPOINT_H
2#define SGPOINT_H 2#define SGPOINT_H
3 3
4#include"sgglobal.h" 4#include"vglobal.h"
5 5
6class SG_EXPORT SGPointF 6class SG_EXPORT SGPointF
7{ 7{
@@ -21,7 +21,7 @@ public:
21 return SGPointF(p1.mx + p2.mx , p1.my + p2.my); 21 return SGPointF(p1.mx + p2.mx , p1.my + p2.my);
22 } 22 }
23 inline friend const bool fuzzyCompare(const SGPointF & p1, const SGPointF & p2); 23 inline friend const bool fuzzyCompare(const SGPointF & p1, const SGPointF & p2);
24 inline friend SGDebug& operator<<(SGDebug& os, const SGPointF& o); 24 inline friend VDebug& operator<<(VDebug& os, const SGPointF& o);
25 25
26 friend inline SGPointF operator-(const SGPointF &p1, const SGPointF &p2); 26 friend inline SGPointF operator-(const SGPointF &p1, const SGPointF &p2);
27 friend inline const SGPointF operator*(const SGPointF &, float val); 27 friend inline const SGPointF operator*(const SGPointF &, float val);
@@ -56,7 +56,7 @@ inline const SGPointF operator/(const SGPointF &p, float c)
56inline const SGPointF operator/(float c, const SGPointF &p) 56inline const SGPointF operator/(float c, const SGPointF &p)
57{ return SGPointF(p.mx/c, p.my/c); } 57{ return SGPointF(p.mx/c, p.my/c); }
58 58
59inline SGDebug& operator<<(SGDebug& os, const SGPointF& o) 59inline VDebug& operator<<(VDebug& os, const SGPointF& o)
60{ 60{
61 os<<"{P "<<o.x()<<","<<o.y()<<"}"; 61 os<<"{P "<<o.x()<<","<<o.y()<<"}";
62 return os; 62 return os;
@@ -82,12 +82,12 @@ public:
82 constexpr inline bool operator==(const SGPoint &o) const; 82 constexpr inline bool operator==(const SGPoint &o) const;
83 constexpr inline bool operator!=(const SGPoint &o) const { return !(operator==(o)); } 83 constexpr inline bool operator!=(const SGPoint &o) const { return !(operator==(o)); }
84 friend inline SGPoint operator-(const SGPoint &p1, const SGPoint &p2); 84 friend inline SGPoint operator-(const SGPoint &p1, const SGPoint &p2);
85 inline friend SGDebug& operator<<(SGDebug& os, const SGPoint& o); 85 inline friend VDebug& operator<<(VDebug& os, const SGPoint& o);
86private: 86private:
87 int mx; 87 int mx;
88 int my; 88 int my;
89}; 89};
90inline SGDebug& operator<<(SGDebug& os, const SGPoint& o) 90inline VDebug& operator<<(VDebug& os, const SGPoint& o)
91{ 91{
92 os<<"{P "<<o.x()<<","<<o.y()<<"}"; 92 os<<"{P "<<o.x()<<","<<o.y()<<"}";
93 return os; 93 return os;
@@ -123,12 +123,12 @@ public:
123 inline SGSize &operator-=(const SGSize &p) noexcept; 123 inline SGSize &operator-=(const SGSize &p) noexcept;
124 constexpr inline bool operator==(const SGSize &o) const; 124 constexpr inline bool operator==(const SGSize &o) const;
125 constexpr inline bool operator!=(const SGSize &o) const { return !(operator==(o)); } 125 constexpr inline bool operator!=(const SGSize &o) const { return !(operator==(o)); }
126 inline friend SGDebug& operator<<(SGDebug& os, const SGSize& o); 126 inline friend VDebug& operator<<(VDebug& os, const SGSize& o);
127private: 127private:
128 int mw; 128 int mw;
129 int mh; 129 int mh;
130}; 130};
131inline SGDebug& operator<<(SGDebug& os, const SGSize& o) 131inline VDebug& operator<<(VDebug& os, const SGSize& o)
132{ 132{
133 os<<"{P "<<o.width()<<","<<o.height()<<"}"; 133 os<<"{P "<<o.width()<<","<<o.height()<<"}";
134 return os; 134 return os;
diff --git a/src/util/sgrect.cpp b/src/vector/vrect.cpp
index e69de29..e69de29 100644
--- a/src/util/sgrect.cpp
+++ b/src/vector/vrect.cpp
diff --git a/include/sgrect.h b/src/vector/vrect.h
index 5172d2c..8e64a40 100644
--- a/include/sgrect.h
+++ b/src/vector/vrect.h
@@ -1,8 +1,8 @@
1#ifndef SGRECT_H 1#ifndef SGRECT_H
2#define SGRECT_H 2#define SGRECT_H
3#include"sgglobal.h" 3#include"vglobal.h"
4#include"sgdebug.h" 4#include"vdebug.h"
5#include"sgpoint.h" 5#include"vpoint.h"
6 6
7class SG_EXPORT SGRect 7class SG_EXPORT SGRect
8{ 8{
@@ -32,7 +32,7 @@ public:
32 inline bool intersects(const SGRect &r); 32 inline bool intersects(const SGRect &r);
33 friend SG_CONSTEXPR inline bool operator==(const SGRect &, const SGRect &) noexcept; 33 friend SG_CONSTEXPR inline bool operator==(const SGRect &, const SGRect &) noexcept;
34 friend SG_CONSTEXPR inline bool operator!=(const SGRect &, const SGRect &) noexcept; 34 friend SG_CONSTEXPR inline bool operator!=(const SGRect &, const SGRect &) noexcept;
35 friend SGDebug& operator<<(SGDebug& os, const SGRect& o); 35 friend VDebug& operator<<(VDebug& os, const SGRect& o);
36private: 36private:
37 int x1; 37 int x1;
38 int y1; 38 int y1;
@@ -46,7 +46,7 @@ inline bool SGRect::intersects(const SGRect &r)
46 bottom() > r.top() && top() < r.bottom()); 46 bottom() > r.top() && top() < r.bottom());
47} 47}
48 48
49inline SGDebug& operator<<(SGDebug& os, const SGRect& o) 49inline VDebug& operator<<(VDebug& os, const SGRect& o)
50{ 50{
51 os<<"{R "<<o.x()<<","<<o.y()<<","<<o.width()<<","<<o.height()<<"}"; 51 os<<"{R "<<o.x()<<","<<o.y()<<","<<o.width()<<","<<o.height()<<"}";
52 return os; 52 return os;
diff --git a/src/util/sgregion.cpp b/src/vector/vregion.cpp
index e29cc36..33a2b25 100644
--- a/src/util/sgregion.cpp
+++ b/src/vector/vregion.cpp
@@ -2353,7 +2353,7 @@ bool SGRegion::intersects(const SGRegion &r) const
2353 return PREFIX(_intersects)(d->rgn, r.d->rgn); 2353 return PREFIX(_intersects)(d->rgn, r.d->rgn);
2354} 2354}
2355 2355
2356SGDebug& operator<<(SGDebug& os, const SGRegion& o) 2356VDebug& operator<<(VDebug& os, const SGRegion& o)
2357{ 2357{
2358 os<<"[REGION: "<<"[bbox = "<<o.boundingRect()<<"]"; 2358 os<<"[REGION: "<<"[bbox = "<<o.boundingRect()<<"]";
2359 os<<"[rectCount = "<<o.rectCount()<<"]"; 2359 os<<"[rectCount = "<<o.rectCount()<<"]";
diff --git a/src/util/sgrle.cpp b/src/vector/vrle.cpp
index 4cadaf3..dc91465 100644
--- a/src/util/sgrle.cpp
+++ b/src/vector/vrle.cpp
@@ -1,11 +1,11 @@
1#include "sgrle.h" 1#include "sgrle.h"
2#include"sgglobal.h" 2#include"vglobal.h"
3#include<sgrect.h> 3#include<vrect.h>
4#include<cstdlib> 4#include<cstdlib>
5#include<vector> 5#include<vector>
6#include<array> 6#include<array>
7#include<algorithm> 7#include<algorithm>
8#include"sgdebug.h" 8#include"vdebug.h"
9#include"sgregion.h" 9#include"sgregion.h"
10 10
11struct SGRleHelper 11struct SGRleHelper
@@ -308,7 +308,7 @@ public:
308 bool operator ==(const SGRleImpl &) const; 308 bool operator ==(const SGRleImpl &) const;
309 void intersected(const SGRect &r, SGRleImpl &result); 309 void intersected(const SGRect &r, SGRleImpl &result);
310 void intersected(const SGRleImpl &clip, SGRleImpl &result); 310 void intersected(const SGRleImpl &clip, SGRleImpl &result);
311 friend SGDebug& operator<<(SGDebug& os, const SGRleImpl& object); 311 friend VDebug& operator<<(VDebug& os, const SGRleImpl& object);
312 void invert(); 312 void invert();
313 void alphaMul(int alpha); 313 void alphaMul(int alpha);
314 void translate(const SGPoint &pt); 314 void translate(const SGPoint &pt);
@@ -329,7 +329,7 @@ copyArrayToVector(const SGRle::Span *span, int count, std::vector<SGRle::Span> &
329 std::copy(span, span + count, back_inserter(v)); 329 std::copy(span, span + count, back_inserter(v));
330} 330}
331 331
332SGDebug& operator<<(SGDebug& os, const SGRleImpl& o) 332VDebug& operator<<(VDebug& os, const SGRleImpl& o)
333{ 333{
334 os<<"[bbox="<< o.m_bbox<<"]"<<"[offset="<<o.mOffset<<"]"<< 334 os<<"[bbox="<< o.m_bbox<<"]"<<"[offset="<<o.mOffset<<"]"<<
335 "[span count ="<<o.m_spans.size()<<"]\n"; 335 "[span count ="<<o.m_spans.size()<<"]\n";
@@ -798,7 +798,7 @@ SGRle SGRle::toRle(const SGRectF &rect)
798 return result; 798 return result;
799} 799}
800 800
801SGDebug& operator<<(SGDebug& os, const SGRle& o) 801VDebug& operator<<(VDebug& os, const SGRle& o)
802{ 802{
803 os<<"[RLE: [dptr = "<<"o.d"<<"]"<<"[ref = "<<o.d->ref.count()<<"]"<<o.d->impl<<"]"; 803 os<<"[RLE: [dptr = "<<"o.d"<<"]"<<"[ref = "<<o.d->ref.count()<<"]"<<o.d->impl<<"]";
804 return os; 804 return os;
diff --git a/test/ssgtestsuite.cpp b/test/ssgtestsuite.cpp
index 20e2c33..5fa62d3 100644
--- a/test/ssgtestsuite.cpp
+++ b/test/ssgtestsuite.cpp
@@ -1,5 +1,5 @@
1#include <gtest/gtest.h> 1#include <gtest/gtest.h>
2#include"sgdebug.h" 2#include"vdebug.h"
3 3
4int main(int argc, char **argv) { 4int main(int argc, char **argv) {
5 initialize(GuaranteedLogger(), "/tmp/", "ssglog", 1); 5 initialize(GuaranteedLogger(), "/tmp/", "ssglog", 1);
diff --git a/test/testftraster.cpp b/test/testftraster.cpp
index 5671696..c7345d5 100644
--- a/test/testftraster.cpp
+++ b/test/testftraster.cpp
@@ -1,5 +1,5 @@
1#include <gtest/gtest.h> 1#include <gtest/gtest.h>
2#include "sgpath.h" 2#include "vpath.h"
3#include "ftraster_p.h" 3#include "ftraster_p.h"
4 4
5class FTRasterTest : public ::testing::Test { 5class FTRasterTest : public ::testing::Test {
diff --git a/test/testsgregion.cpp b/test/testsgregion.cpp
index 17b32c9..9e1ec68 100644
--- a/test/testsgregion.cpp
+++ b/test/testsgregion.cpp
@@ -1,7 +1,7 @@
1#include <gtest/gtest.h> 1#include <gtest/gtest.h>
2#include"sgregion.h" 2#include"sgregion.h"
3#include"sgdebug.h" 3#include"vdebug.h"
4#include"sgpoint.h" 4#include"vpoint.h"
5class SGRegionTest : public ::testing::Test { 5class SGRegionTest : public ::testing::Test {
6public: 6public:
7 SGRegionTest():rgn1(-10, -10, 20, 20) 7 SGRegionTest():rgn1(-10, -10, 20, 20)