Commit a3831f96 authored by Nathan Lee's avatar Nathan Lee

Fix 0 radius arc rendering on png export, canvas

See #692
(cherry-picked from 2d432e7d)
parent 29807bb5
Pipeline #178022838 passed with stages
in 87 minutes and 40 seconds
......@@ -750,10 +750,12 @@ feed_curve_to_cairo(cairo_t *cr, Geom::Curve const &c, Geom::Affine const & tran
default:
{
if (Geom::EllipticalArc const *a = dynamic_cast<Geom::EllipticalArc const*>(&c)) {
//if (!optimize_stroke || a->boundsFast().intersects(view)) {
if (a->isChord()) {
Geom::Point endPoint(a->finalPoint());
cairo_line_to(cr, endPoint[0], endPoint[1]);
} else {
Geom::Affine xform = a->unitCircleTransform() * trans;
Geom::Point ang(a->initialAngle().radians(), a->finalAngle().radians());
// Apply the transformation to the current context
cairo_matrix_t cm;
cm.xx = xform[0];
......@@ -774,10 +776,7 @@ feed_curve_to_cairo(cairo_t *cr, Geom::Curve const &c, Geom::Affine const & tran
}
// Revert the current context
cairo_restore(cr);
//} else {
// Geom::Point f = a->finalPoint() * trans;
// cairo_move_to(cr, f[X], f[Y]);
//}
}
} else {
// handles sbasis as well as all other curve types
// this is very slow
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment