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

Color Pictures



Hello,

I am trying create and draw in a picture (without opening any window), 
and everything is fine except that I couldn't achieve to set the color as I
want. I could
however set the pensize (i.e.).

Does someone know how to do that? Here is the code we use:

(defun jacques-view-draw-contents (&optional cylinder)
   (if cylinder
      (dolist (object *object-list*)
         (draw-object-to-cylinder object))
      (dolist (object *object-list*)
         (draw-object object)))
       )
         
(defun make-picture ()
   (let ((mypict (#_OpenPicture (mysetrect 0 0 500 500))))
      (#_forecolor *blue-color*)
      (jacques-view-draw-contents)
      (#_closepicture)
      (write-pict mypict)
      ))

Given the fact that each object in the object-list has its own drawing
methods, i.e.

(defclass line2D ()
  ((point-1 :initform nil :initarg :point-1 :accessor point-1)
   (point-2 :initform nil :initarg :point-2 :accessor point-2))
  )

(defmethod draw-object ((self line2D))
   (let ((p1 (point-1 self))
           (p2 (point-2 self)))
         (#_moveto (x p1) (y p1))
         (#_lineto (x p2) (y p2)))
      ))

Thanks for your help.

Jacques Teller

Laboratoire d'Etudes Methodologiques Architecturales
Universite de Liege

15, avenue des Tilleuls, Bat D1, 4000, Liege
email : teller@lema.ulg.ac.be
phone : 32 41 66 93 67