[fondue-commits] [SCM] Fondue Font Editor branch, master, updated. 097b323e15f08ea5e8c1070c59c211e384fc8003
Eugeniy Meshcheryakov
eugen at debian.org
Thu May 15 18:58:04 UTC 2008
The following commit has been merged in the master branch:
commit 097b323e15f08ea5e8c1070c59c211e384fc8003
Author: Eugeniy Meshcheryakov <eugen at debian.org>
Date: Thu May 15 20:56:32 2008 +0200
do not close open contours starting or ending with off-contour point
diff --git a/gui/glyphgraphics.cxx b/gui/glyphgraphics.cxx
index 7bbc55f..d15f6a3 100644
--- a/gui/glyphgraphics.cxx
+++ b/gui/glyphgraphics.cxx
@@ -98,7 +98,7 @@ QPainterPath GlyphGraphics::contourToPath(const GlyphContour *contour)
// TODO move away from the loop
if (i == 0) {
- if (gpt.on()) {
+ if (gpt.on() || contour->isOpen()) {
path.moveTo(pt);
continue;
}
@@ -116,6 +116,8 @@ QPainterPath GlyphGraphics::contourToPath(const GlyphContour *contour)
if (gpt.on())
path.lineTo(pt);
else {
+ if (i == contour->points().size() - 1 && contour->isOpen())
+ break;
GlyphPoint next_gpt = (i < contour->points().size() - 1) ?
contour->points().at(i + 1) : contour->points().at(0);
QPointF next(next_gpt.x(), -next_gpt.y());
--
Fondue Font Editor
More information about the fondue-commits
mailing list