diff --git a/src/drawconstraint.cpp b/src/drawconstraint.cpp index 6442989..b744805 100644 --- a/src/drawconstraint.cpp +++ b/src/drawconstraint.cpp @@ -437,7 +437,7 @@ void Constraint::DoArcForAngle(Canvas *canvas, Canvas::hStroke hcs, Vector trans = (*ref).Plus(gu.ScaledBy(-1.5*VectorFont::Builtin()->GetCapHeight(textHeight))); canvas->DrawVectorText("angle between skew lines", textHeight, - trans, gr.WithMagnitude(pixels), gu.WithMagnitude(pixels), + trans, gr.WithMagnitude(1), gu.WithMagnitude(1), hcs); } } @@ -925,7 +925,8 @@ void Constraint::DoLayout(DrawAs how, Canvas *canvas, } Vector ex = VectorFont::Builtin()->GetExtents(textHeight, "T"); - canvas->DrawVectorText("T", textHeight, textAt.Minus(ex.ScaledBy(0.5)), u, v, hcs); + canvas->DrawVectorText("T", textHeight, textAt.Minus(ex.ScaledBy(0.5)), + u.WithMagnitude(1), v.WithMagnitude(1), hcs); if(refs) refs->push_back(textAt); return; } @@ -1122,7 +1123,8 @@ s: } Vector o = m.Plus(offset).Plus(u.WithMagnitude(textHeight/5)), ex = VectorFont::Builtin()->GetExtents(textHeight, s); - canvas->DrawVectorText(s, textHeight, o.Minus(ex.ScaledBy(0.5)), r, u, hcs); + canvas->DrawVectorText(s, textHeight, o.Minus(ex.ScaledBy(0.5)), + r.WithMagnitude(1), u.WithMagnitude(1), hcs); if(refs) refs->push_back(o); } else { Vector a = SK.GetEntity(ptA)->PointGetNum(); diff --git a/test/constraint/angle/skew.png b/test/constraint/angle/skew.png new file mode 100644 index 0000000..76191f5 Binary files /dev/null and b/test/constraint/angle/skew.png differ diff --git a/test/constraint/angle/skew.slvs b/test/constraint/angle/skew.slvs new file mode 100644 index 0000000..e793f93 Binary files /dev/null and b/test/constraint/angle/skew.slvs differ diff --git a/test/constraint/angle/test.cpp b/test/constraint/angle/test.cpp index 57d7820..a117b23 100644 --- a/test/constraint/angle/test.cpp +++ b/test/constraint/angle/test.cpp @@ -47,3 +47,8 @@ TEST_CASE(reference_free_in_3d_migrate_from_v20) { CHECK_RENDER("reference_free_in_3d.png"); CHECK_SAVE("reference_free_in_3d.slvs"); } + +TEST_CASE(skew_render) { + CHECK_LOAD("skew.slvs"); + CHECK_RENDER("skew.png"); +} diff --git a/test/constraint/at_midpoint/line_plane_free_in_3d.png b/test/constraint/at_midpoint/line_plane_free_in_3d.png index 81d1acb..510aa89 100644 Binary files a/test/constraint/at_midpoint/line_plane_free_in_3d.png and b/test/constraint/at_midpoint/line_plane_free_in_3d.png differ diff --git a/test/constraint/at_midpoint/line_pt_free_in_3d.png b/test/constraint/at_midpoint/line_pt_free_in_3d.png index 314734e..fe28308 100644 Binary files a/test/constraint/at_midpoint/line_pt_free_in_3d.png and b/test/constraint/at_midpoint/line_pt_free_in_3d.png differ diff --git a/test/constraint/cubic_line_tangent/free_in_3d.png b/test/constraint/cubic_line_tangent/free_in_3d.png index 1583d93..5784a67 100644 Binary files a/test/constraint/cubic_line_tangent/free_in_3d.png and b/test/constraint/cubic_line_tangent/free_in_3d.png differ