X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fgraphicprimitives.cpp;fp=src%2Fgraphicprimitives.cpp;h=dd9b480e54650eca6ce7553d3326276da7de3511;hb=2b16243b0aa693d18ce49a071cdae73cadc37c4f;hp=82e15ab323db6b2bf70e569808fa5707c94ced22;hpb=f8bd40b1a7da7d54a84afbc992fe289af85633a5;p=ttedit diff --git a/src/graphicprimitives.cpp b/src/graphicprimitives.cpp index 82e15ab..dd9b480 100755 --- a/src/graphicprimitives.cpp +++ b/src/graphicprimitives.cpp @@ -23,6 +23,7 @@ double abs(double n) // Helper function return (n < 0 ? -n : n); } + // // This function takes three points and draws a curve using a second order // Bezier function. @@ -49,6 +50,16 @@ void Bezier(QPainter &p, point p1, point p2, point p3) p.drawLine(prevX, prevY, (int)p3.x, (int)p3.y); } + +// +// This is a convenience funtion, using IPoints :-) +// +void Bezier(QPainter &p, IPoint p1, IPoint p2, IPoint p3) +{ + Bezier(p, point(p1.x, p1.y), point(p2.x, p2.y), point(p3.x, p3.y)); +} + + // // Draw a round dot (5x5, centered on [x, y]) // @@ -68,6 +79,7 @@ void DrawRoundDot(QPainter &p, int32 x, int32 y) p.drawPolygon(pt, 8); } + // // Draw a sqaure dot (5x5, centered on [x, y]) // @@ -83,6 +95,7 @@ void DrawSquareDot(QPainter &p, int32 x, int32 y) p.drawPolygon(pt, 4); } + // // Draw a sqaure dot (nxn, centered on [x, y]) // @@ -99,6 +112,7 @@ void DrawSquareDotN(QPainter &p, int32 x, int32 y, uint32 n) p.drawPolygon(pt, 4); } + // // Draw a round dot (nxn, centered on [x, y]) //