[graphic-forms-cvs] r80 - in trunk: docs/manual src/uitoolkit/graphics

junrue at common-lisp.net junrue at common-lisp.net
Tue Mar 28 19:42:29 UTC 2006


Author: junrue
Date: Tue Mar 28 14:42:29 2006
New Revision: 80

Modified:
   trunk/docs/manual/api.texinfo
   trunk/src/uitoolkit/graphics/graphics-context.lisp
Log:
implemented draw-point drawing function

Modified: trunk/docs/manual/api.texinfo
==============================================================================
--- trunk/docs/manual/api.texinfo	(original)
+++ trunk/docs/manual/api.texinfo	Tue Mar 28 14:42:29 2006
@@ -900,7 +900,8 @@
 @end deffn
 
 @deffn GenericFunction draw-image self image point
-Draws @code{image} in the receiver at the specified @ref{point}.
+Draws @code{image} in the receiver where @code{point} identifies the
+position of the upper-left corner of the image.
 @end deffn
 
 @deffn GenericFunction draw-line self start-point end-point
@@ -915,6 +916,10 @@
 current pen style, pen width, and foreground color.
 @end deffn
 
+ at deffn GenericFunction draw-point self point
+Draws a pixel at @code{point} in the current foreground color.
+ at end deffn
+
 @deffn GenericFunction draw-poly-bezier self start-point points
 Draws a sequence of connected B@'ezier curves starting with @code{start-point}.
 @code{points} is a list of lists, each sublist containing three points,

Modified: trunk/src/uitoolkit/graphics/graphics-context.lisp
==============================================================================
--- trunk/src/uitoolkit/graphics/graphics-context.lisp	(original)
+++ trunk/src/uitoolkit/graphics/graphics-context.lisp	Tue Mar 28 14:42:29 2006
@@ -343,6 +343,14 @@
   (with-null-brush (self)
     (call-rect-and-range-function #'gfs::pie "pie" (gfs:handle self) rect start-pnt end-pnt)))
 
+(defmethod draw-point ((self graphics-context) pnt)
+  (if (gfs:disposed-p self)
+    (error 'gfs:disposed-error))
+  (gfs::set-pixel (gfs:handle self)
+                  (gfs:point-x pnt)
+                  (gfs:point-y pnt)
+                  (color->rgb (foreground-color self))))
+
 (defmethod draw-poly-bezier ((self graphics-context) start-pnt points)
   (if (gfs:disposed-p self)
     (error 'gfs:disposed-error))



More information about the Graphic-forms-cvs mailing list