[fondue-commits] [SCM] Fondue Font Editor branch, master, updated. 097b323e15f08ea5e8c1070c59c211e384fc8003
Eugeniy Meshcheryakov
eugen at debian.org
Thu May 15 18:58:03 UTC 2008
The following commit has been merged in the master branch:
commit bc0d080ea71cd9a8759992be50b5046e2e231b9e
Author: Eugeniy Meshcheryakov <eugen at debian.org>
Date: Thu May 15 17:26:30 2008 +0200
make it possible to insert points inside a contour
diff --git a/nongui/glyphcontour.cxx b/nongui/glyphcontour.cxx
index 2efc18c..fff668a 100644
--- a/nongui/glyphcontour.cxx
+++ b/nongui/glyphcontour.cxx
@@ -42,6 +42,15 @@ void GlyphContour::appendPoint(const GlyphPoint &point)
emit pointsAdded(pointNo, pointNo);
}
+void GlyphContour::insertPoint(const GlyphPoint &point, int where)
+{
+ if (where < 0 || where > m_points.size())
+ return; // TODO warn?
+ emit pointsAboutToBeAdded(where, where);
+ m_points.insert(where, point);
+ emit pointsAdded(where, where);
+}
+
void GlyphContour::changePoint(int number, const GlyphPoint &newPoint)
{
Q_ASSERT(number < m_points.size()); // XXX scriptable!
diff --git a/nongui/glyphcontour.h b/nongui/glyphcontour.h
index 33f0aa5..5f80b81 100644
--- a/nongui/glyphcontour.h
+++ b/nongui/glyphcontour.h
@@ -33,6 +33,7 @@ public:
GlyphPointList points() const {return m_points;}
Q_INVOKABLE void appendPoint(const GlyphPoint &point);
+ Q_INVOKABLE void insertPoint(const GlyphPoint &point, int where);
Q_INVOKABLE void removePoints(int first, int count);
Q_INVOKABLE void changePoint(int number, const GlyphPoint &newPoint);
bool isEmpty() const;
--
Fondue Font Editor
More information about the fondue-commits
mailing list