code cleanup

This commit is contained in:
subhransu mohanty
2019-07-10 17:15:35 +09:00
committed by Subhransu
parent 0f04d7ea9d
commit 97f875751e
4 changed files with 1 additions and 41 deletions

View File

@@ -2,6 +2,7 @@
#include <rlottie.h>
#include<iostream>
#include<string>
#include<vector>
#include<array>

View File

@@ -22,10 +22,5 @@
int main()
{
VInterpolator ip({0.667, 1}, {0.333 , 0});
for (float i = 0.0 ; i < 1.0 ; i+=0.05) {
std::cout<<ip.value(i)<<"\t";
}
std::cout<<std::endl;
return 0;
}

View File

@@ -20,7 +20,6 @@
#include <vglobal.h>
#include <cassert>
#include <cmath>
#include <cstring>
V_BEGIN_NAMESPACE
@@ -695,38 +694,5 @@ VPointF VMatrix::map(const VPointF &p) const
}
return {x, y};
}
static std::string type_helper(VMatrix::MatrixType t)
{
switch (t) {
case VMatrix::MatrixType::None:
return "MatrixType::None";
break;
case VMatrix::MatrixType::Translate:
return "MatrixType::Translate";
break;
case VMatrix::MatrixType::Scale:
return "MatrixType::Scale";
break;
case VMatrix::MatrixType::Rotate:
return "MatrixType::Rotate";
break;
case VMatrix::MatrixType::Shear:
return "MatrixType::Shear";
break;
case VMatrix::MatrixType::Project:
return "MatrixType::Project";
break;
}
return "";
}
std::ostream &operator<<(std::ostream &os, const VMatrix &o)
{
os << "[Matrix: "
<< "type =" << type_helper(o.type()) << ", Data : " << o.m11 << " "
<< o.m12 << " " << o.m13 << " " << o.m21 << " " << o.m22 << " " << o.m23
<< " " << o.mtx << " " << o.mty << " " << o.m33 << " "
<< "]" << std::endl;
return os;
}
V_END_NAMESPACE

View File

@@ -81,8 +81,6 @@ public:
bool operator==(const VMatrix &) const;
bool operator!=(const VMatrix &) const;
bool fuzzyCompare(const VMatrix &) const;
friend std::ostream &operator<<(std::ostream &os, const VMatrix &o);
private:
friend struct VSpanData;
float m11{1}, m12{0}, m13{0};