Fix linux build.
This commit is contained in:
parent
a6d92e142f
commit
9e1d951520
50 changed files with 1586 additions and 1192 deletions
|
@ -71,8 +71,8 @@ void SvgPainter::paintMesh(SvgDocument* document, SceneModel* model, bool showOu
|
|||
auto face_locs = face->getNodeLocations();
|
||||
for (const auto& loc : face_locs)
|
||||
{
|
||||
const auto x = loc.getX() * transform.getScaleX() + transform.getLocation().getX();
|
||||
const auto y = loc.getY() * transform.getScaleY() + transform.getLocation().getY();
|
||||
const auto x = loc.getX() * transform.getScale().mX + transform.getLocation().getX();
|
||||
const auto y = loc.getY() * transform.getScale().mY + transform.getLocation().getY();
|
||||
points[count] = { x, y };
|
||||
count++;
|
||||
}
|
||||
|
@ -122,7 +122,7 @@ void SvgPainter::setStyle(SceneModel* model, SvgShapeElement* element) const
|
|||
element->setNoStroke();
|
||||
}
|
||||
|
||||
if (!transform.isDefaultTransform())
|
||||
if (!transform.isIdentityTransform())
|
||||
{
|
||||
element->addAttribute(toTransform(transform));
|
||||
}
|
||||
|
@ -249,7 +249,7 @@ void SvgPainter::paintText(SvgDocument* document, SceneText* text) const
|
|||
svg_text->setFontSize(text->getTextData().mFont.getSize());
|
||||
|
||||
const auto transform = text->getTransform();
|
||||
if (!transform.isDefaultTransform())
|
||||
if (!transform.isIdentityTransform())
|
||||
{
|
||||
svg_text->addAttribute(toTransform(transform));
|
||||
}
|
||||
|
@ -262,13 +262,13 @@ std::unique_ptr<XmlAttribute> SvgPainter::toTransform(const Transform& transform
|
|||
auto svg_transform = std::make_unique<XmlAttribute>("transform");
|
||||
|
||||
std::string ops;
|
||||
if (!transform.hasDefaultLocation())
|
||||
if (!transform.isIdentityTransform())
|
||||
{
|
||||
ops += "translate(" + std::to_string(transform.getLocation().getX()) + " " + std::to_string(transform.getLocation().getY()) + ") ";
|
||||
}
|
||||
if (!transform.hasDefaultScale())
|
||||
if (!transform.getScale().isIdentity())
|
||||
{
|
||||
ops += "scale(" + std::to_string(transform.getScaleX()) + " " + std::to_string(transform.getScaleY()) + ") ";
|
||||
ops += "scale(" + std::to_string(transform.getScale().mX) + " " + std::to_string(transform.getScale().mY) + ") ";
|
||||
}
|
||||
svg_transform->setValue(ops);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue