libcvd-members
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libcvd-members] libcvd/cvd draw.h


From: Edward Rosten
Subject: [libcvd-members] libcvd/cvd draw.h
Date: Fri, 08 Aug 2008 19:34:18 +0000

CVSROOT:        /cvsroot/libcvd
Module name:    libcvd
Changes by:     Edward Rosten <edrosten>        08/08/08 19:34:18

Modified files:
        cvd            : draw.h 

Log message:
        Toonify dome of draw.h

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/libcvd/cvd/draw.h?cvsroot=libcvd&r1=1.7&r2=1.8

Patches:
Index: draw.h
===================================================================
RCS file: /cvsroot/libcvd/libcvd/cvd/draw.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- draw.h      16 May 2006 13:29:54 -0000      1.7
+++ draw.h      8 Aug 2008 19:34:18 -0000       1.8
@@ -32,6 +32,11 @@
 #include <vector>
 #include <algorithm>
 
+#include <cvd/config.h>
+#ifdef CVD_HAVE_TOON
+#include <TooN/TooN.h>
+#endif
+
 
 namespace CVD {
 
@@ -146,6 +151,22 @@
     drawLine(im, double(p1.x), double(p1.y), double(p2.x), double(p2.y), c);
 }
 
+#ifdef CVD_HAVE_TOON
+/// draws a line defined by two TooN::Vector<2> with given color into an image.
+/// @param im image to draw in
+/// @param p1 start point
+/// @param p2 end point
+/// @param c color of the line
+/// @ingroup gGraphics
+template <class T>
+void drawLine(Image<T>& im, const TooN::Vector<2>& p1, const TooN::Vector<2>& 
p2, const T& c)
+{
+    drawLine(im, p1[0], p1[1], p2[0], p2[1], c);
+}
+#endif
+
+
+
 /// draws a polyline defined by a set of points into an image. A given offset 
is added
 /// to all points.
 /// @param im image to draw in




reply via email to

[Prev in Thread] Current Thread [Next in Thread]