[DEBUG] continue removing STL
This commit is contained in:
parent
ebdfeb99d8
commit
1e0de1fc98
@ -116,7 +116,7 @@ bool esvg::Path::parseXML(const exml::Element& _element, mat2x3& _parentTrans, v
|
|||||||
m_listElement.moveTo(relative,
|
m_listElement.moveTo(relative,
|
||||||
vec2(listDot[0], listDot[1]));
|
vec2(listDot[0], listDot[1]));
|
||||||
}
|
}
|
||||||
for(int32_t iii=2; iii<listDot.size(); iii+=2) {
|
for (size_t iii=2; iii<listDot.size(); iii+=2) {
|
||||||
m_listElement.lineTo(relative,
|
m_listElement.lineTo(relative,
|
||||||
vec2(listDot[iii], listDot[iii+1]));
|
vec2(listDot[iii], listDot[iii+1]));
|
||||||
}
|
}
|
||||||
@ -129,7 +129,7 @@ bool esvg::Path::parseXML(const exml::Element& _element, mat2x3& _parentTrans, v
|
|||||||
ESVG_WARNING("the PATH command "<< command << " has not the good number of element = " << listDot.size() );
|
ESVG_WARNING("the PATH command "<< command << " has not the good number of element = " << listDot.size() );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
for(int32_t iii=0; iii<listDot.size(); iii+=2) {
|
for (size_t iii=0; iii<listDot.size(); iii+=2) {
|
||||||
m_listElement.lineTo(relative,
|
m_listElement.lineTo(relative,
|
||||||
vec2(listDot[iii], listDot[iii+1]));
|
vec2(listDot[iii], listDot[iii+1]));
|
||||||
}
|
}
|
||||||
@ -143,7 +143,7 @@ bool esvg::Path::parseXML(const exml::Element& _element, mat2x3& _parentTrans, v
|
|||||||
ESVG_WARNING("the PATH command "<< command << " has not the good number of element = " << listDot.size() );
|
ESVG_WARNING("the PATH command "<< command << " has not the good number of element = " << listDot.size() );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
for(int32_t iii=0; iii<listDot.size(); iii+=1) {
|
for (size_t iii=0; iii<listDot.size(); iii+=1) {
|
||||||
m_listElement.lineToV(relative,
|
m_listElement.lineToV(relative,
|
||||||
listDot[iii]);
|
listDot[iii]);
|
||||||
}
|
}
|
||||||
@ -157,7 +157,7 @@ bool esvg::Path::parseXML(const exml::Element& _element, mat2x3& _parentTrans, v
|
|||||||
ESVG_WARNING("the PATH command "<< command << " has not the good number of element = " << listDot.size() );
|
ESVG_WARNING("the PATH command "<< command << " has not the good number of element = " << listDot.size() );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
for(int32_t iii=0; iii<listDot.size(); iii+=1) {
|
for (size_t iii=0; iii<listDot.size(); iii+=1) {
|
||||||
m_listElement.lineToH(relative,
|
m_listElement.lineToH(relative,
|
||||||
listDot[iii]);
|
listDot[iii]);
|
||||||
}
|
}
|
||||||
@ -171,7 +171,7 @@ bool esvg::Path::parseXML(const exml::Element& _element, mat2x3& _parentTrans, v
|
|||||||
ESVG_WARNING("the PATH command "<< command << " has not the good number of element = " << listDot.size() );
|
ESVG_WARNING("the PATH command "<< command << " has not the good number of element = " << listDot.size() );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
for(int32_t iii=0; iii<listDot.size(); iii+=4) {
|
for (size_t iii=0; iii<listDot.size(); iii+=4) {
|
||||||
m_listElement.bezierCurveTo(relative,
|
m_listElement.bezierCurveTo(relative,
|
||||||
vec2(listDot[iii],listDot[iii+1]),
|
vec2(listDot[iii],listDot[iii+1]),
|
||||||
vec2(listDot[iii+2],listDot[iii+3]));
|
vec2(listDot[iii+2],listDot[iii+3]));
|
||||||
@ -186,7 +186,7 @@ bool esvg::Path::parseXML(const exml::Element& _element, mat2x3& _parentTrans, v
|
|||||||
ESVG_WARNING("the PATH command "<< command << " has not the good number of element = " << listDot.size() );
|
ESVG_WARNING("the PATH command "<< command << " has not the good number of element = " << listDot.size() );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
for(int32_t iii=0; iii<listDot.size(); iii+=2) {
|
for (size_t iii=0; iii<listDot.size(); iii+=2) {
|
||||||
m_listElement.bezierSmoothCurveTo(relative,
|
m_listElement.bezierSmoothCurveTo(relative,
|
||||||
vec2(listDot[iii],listDot[iii+1]));
|
vec2(listDot[iii],listDot[iii+1]));
|
||||||
}
|
}
|
||||||
@ -200,7 +200,7 @@ bool esvg::Path::parseXML(const exml::Element& _element, mat2x3& _parentTrans, v
|
|||||||
ESVG_WARNING("the PATH command "<< command << " has not the good number of element = " << listDot.size() );
|
ESVG_WARNING("the PATH command "<< command << " has not the good number of element = " << listDot.size() );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
for(int32_t iii=0; iii<listDot.size(); iii+=6) {
|
for (size_t iii=0; iii<listDot.size(); iii+=6) {
|
||||||
m_listElement.curveTo(relative,
|
m_listElement.curveTo(relative,
|
||||||
vec2(listDot[iii],listDot[iii+1]),
|
vec2(listDot[iii],listDot[iii+1]),
|
||||||
vec2(listDot[iii+2],listDot[iii+3]),
|
vec2(listDot[iii+2],listDot[iii+3]),
|
||||||
@ -216,7 +216,7 @@ bool esvg::Path::parseXML(const exml::Element& _element, mat2x3& _parentTrans, v
|
|||||||
ESVG_WARNING("the PATH command "<< command << " has not the good number of element = " << listDot.size() );
|
ESVG_WARNING("the PATH command "<< command << " has not the good number of element = " << listDot.size() );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
for(int32_t iii=0; iii<listDot.size(); iii+=4) {
|
for (size_t iii=0; iii<listDot.size(); iii+=4) {
|
||||||
m_listElement.smoothCurveTo(relative,
|
m_listElement.smoothCurveTo(relative,
|
||||||
vec2(listDot[iii],listDot[iii+1]),
|
vec2(listDot[iii],listDot[iii+1]),
|
||||||
vec2(listDot[iii+2],listDot[iii+3]));
|
vec2(listDot[iii+2],listDot[iii+3]));
|
||||||
@ -231,7 +231,7 @@ bool esvg::Path::parseXML(const exml::Element& _element, mat2x3& _parentTrans, v
|
|||||||
ESVG_WARNING("the PATH command "<< command << " has not the good number of element = " << listDot.size() );
|
ESVG_WARNING("the PATH command "<< command << " has not the good number of element = " << listDot.size() );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
for(int32_t iii=0; iii<listDot.size(); iii+=7) {
|
for (size_t iii=0; iii<listDot.size(); iii+=7) {
|
||||||
bool largeArcFlag = true;
|
bool largeArcFlag = true;
|
||||||
bool sweepFlag = true;
|
bool sweepFlag = true;
|
||||||
if (listDot[iii+3] == 0.0f) {
|
if (listDot[iii+3] == 0.0f) {
|
||||||
|
@ -35,13 +35,13 @@ esvg::Document::~Document() {
|
|||||||
void esvg::Document::displayDebug() {
|
void esvg::Document::displayDebug() {
|
||||||
ESVG_DEBUG("Main SVG: size=" << m_size);
|
ESVG_DEBUG("Main SVG: size=" << m_size);
|
||||||
ESVG_DEBUG(" refs:");
|
ESVG_DEBUG(" refs:");
|
||||||
for (int32_t iii=0; iii<m_refList.size(); iii++) {
|
for (size_t iii=0; iii<m_refList.size(); iii++) {
|
||||||
if (m_refList[iii] != nullptr) {
|
if (m_refList[iii] != nullptr) {
|
||||||
m_refList[iii]->display(2);
|
m_refList[iii]->display(2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ESVG_DEBUG(" Nodes:");
|
ESVG_DEBUG(" Nodes:");
|
||||||
for (int32_t iii=0; iii<m_subElementList.size(); iii++) {
|
for (size_t iii=0; iii<m_subElementList.size(); iii++) {
|
||||||
if (m_subElementList[iii] != nullptr) {
|
if (m_subElementList[iii] != nullptr) {
|
||||||
m_subElementList[iii]->display(2);
|
m_subElementList[iii]->display(2);
|
||||||
}
|
}
|
||||||
@ -50,7 +50,7 @@ void esvg::Document::displayDebug() {
|
|||||||
|
|
||||||
|
|
||||||
void esvg::Document::draw(esvg::Renderer& _myRenderer, mat2x3& _basicTrans, int32_t _level) {
|
void esvg::Document::draw(esvg::Renderer& _myRenderer, mat2x3& _basicTrans, int32_t _level) {
|
||||||
for (int32_t iii=0; iii<m_subElementList.size(); iii++) {
|
for (size_t iii=0; iii<m_subElementList.size(); iii++) {
|
||||||
if (m_subElementList[iii] != nullptr) {
|
if (m_subElementList[iii] != nullptr) {
|
||||||
m_subElementList[iii]->draw(_myRenderer, _basicTrans);
|
m_subElementList[iii]->draw(_myRenderer, _basicTrans);
|
||||||
}
|
}
|
||||||
|
@ -67,7 +67,7 @@ void esvg::render::Weight::set(const ivec2& _pos, float _newColor) {
|
|||||||
void esvg::render::Weight::set(int32_t _posY, const esvg::render::Scanline& _data) {
|
void esvg::render::Weight::set(int32_t _posY, const esvg::render::Scanline& _data) {
|
||||||
if ( _posY>=0
|
if ( _posY>=0
|
||||||
&& _posY<m_size.y()) {
|
&& _posY<m_size.y()) {
|
||||||
for (size_t xxx=0; xxx<m_size.x(); ++xxx) {
|
for (int32_t xxx=0; xxx<m_size.x(); ++xxx) {
|
||||||
m_data[xxx+_posY*m_size.x()] = _data.get(xxx);
|
m_data[xxx+_posY*m_size.x()] = _data.get(xxx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -76,7 +76,7 @@ void esvg::render::Weight::set(int32_t _posY, const esvg::render::Scanline& _dat
|
|||||||
void esvg::render::Weight::append(int32_t _posY, const esvg::render::Scanline& _data) {
|
void esvg::render::Weight::append(int32_t _posY, const esvg::render::Scanline& _data) {
|
||||||
if ( _posY>=0
|
if ( _posY>=0
|
||||||
&& _posY<m_size.y()) {
|
&& _posY<m_size.y()) {
|
||||||
for (size_t xxx=0; xxx<m_size.x(); ++xxx) {
|
for (int32_t xxx=0; xxx<m_size.x(); ++xxx) {
|
||||||
m_data[xxx+_posY*m_size.x()] += _data.get(xxx);
|
m_data[xxx+_posY*m_size.x()] += _data.get(xxx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user