Start cleaning geometry module.
This commit is contained in:
parent
26ecae46b3
commit
cd688f608f
52 changed files with 493 additions and 277 deletions
|
@ -102,7 +102,7 @@ void SvgConverter::setStyle(SceneModel* model, SvgShapeElement* element) const
|
|||
if (model->hasOutlineColor())
|
||||
{
|
||||
element->setStrokeColor(model->getOutlineColor());
|
||||
element->setStrokeWidth(1.0 / transform.getScaleX());
|
||||
element->setStrokeWidth(model->getOutlineThickness() / transform.getScaleX());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -126,8 +126,13 @@ void SvgConverter::convertPrimitive(SvgDocument* document, SceneModel* model) co
|
|||
{
|
||||
auto model_circle = dynamic_cast<Circle*>(model->getGeometry());
|
||||
|
||||
auto circle = std::make_unique<SvgCircle>();
|
||||
auto is_ellipse = model_circle->getMinorRadius() != model_circle->getRadius();
|
||||
auto circle = std::make_unique<SvgCircle>(model_circle->isEllipse() ? SvgCircle::Type::ELLIPSE : SvgCircle::Type::REGULAR);
|
||||
circle->setRadius(model_circle->getRadius());
|
||||
if (model_circle->isEllipse())
|
||||
{
|
||||
circle->setMinorRadius(model_circle->getMinorRadius());
|
||||
}
|
||||
|
||||
setStyle(model, circle.get());
|
||||
document->getRoot()->addChild(std::move(circle));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue