Lisp HUG Maillist Archive

Capi tranforms

Hi,

I tried this with LWW 6.1:

(defun test ()
  (let ((pane (capi:contain (make-instance 'capi:output-pane))))
    (gp:set-graphics-state pane :transform '(10 0 0 10 0 0) :scale-thickness nil :thickness 0.1)
    (loop for i from 1 to 20 do 
         (gp:draw-point pane i i :thickness 0.1))
  ))

and I can't seem to set the transform so that it doesn't affect the size of pixels.
How can I zoom say 10x the graphics area, but still draw 'true' pixels (non-scaled) ?

I surely miss something obvious.

--
Fabrice

Re: Capi tranforms

.... (make-instance 'capi:output-pane :drawing-mode :compatible) ...

pt

_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html


Re: Capi tranforms

Thanks for your answers. 

There seems to be something wrong however.
I'm running LWW 6.1 under Windows 8 and
gp:draw-point is always scaled, whatever I do.

(defun test ()
  (let ((pane (capi:contain (make-instance 'capi:output-pane
                                           ;; :drawing-mode :compatible
                                           ))))
    (gp:set-graphics-port-coordinates pane :bottom -0.5 :left -1.5 :top 0.5 :right 1.5)
    (gp:draw-line pane -0.2 -0.2 0.2 0.2)
    (gp:draw-point pane -0.2 0.2 
    ;;                     :thickness .001
    )))

I get the picture below. I tried to fix it by using (gp:draw-line pane x y x y)
but that doesn't draw any point.
Drawing in compatible mode doesn't draw the point at all.

Fabrice

Images intégrées 1


2013/3/31 Paul Tarvydas <paultarvydas@gmail.com>
... (make-instance 'capi:output-pane :drawing-mode :compatible) ...

pt



--
Fabrice Popineau
-----------------------------
SUPELEC
Département Informatique
3, rue Joliot Curie
91192 Gif/Yvette Cedex
Tel direct : +33 (0) 169851950
Standard : +33 (0) 169851212
------------------------------

Re: Capi tranforms

Unable to parse email body. Email id is 12203

Re: Capi tranforms


2. Drawing to a pane immediately after creating it with capi:contain is not
recommended, because it happs in the wrong thread and also might be erased by
the window system.  Instead, put the drawing operations in the
:display-callback of the pane.


Oops. Sure.

Thanks for the workaround.

Fabrice
Updated at: 2020-12-10 08:35 UTC