Gmane
From: Luigi Panzeri <matley <at> muppetslab.org>
Subject: draw-arrow with transformation, freetype with fix(ed) fonts
Newsgroups: gmane.lisp.mcclim.devel
Date: 2006-08-19 20:37:43 GMT (2 years, 23 hours and 42 minutes ago)

Hi all (and good holiday if you are in vacation), 

i noted two strange behavior, but I am not a clim expert but so sorry
if i miss something.

1) draw-arrow* use the line-style-thickness to calculate distances in
   order to draw the head, but that thickness is not transformed with the
   current user transformation. So for example:

(in-package :clim-user)

(define-application-frame foo ()
  ()
  (:panes
   (app :application
	:width 1000 :height 1000
	:display-function #'display))
  (:layouts (default (vertically () app))))

(defun display (frame stream)
  (declare (ignore frame))
  (with-first-quadrant-coordinates (stream 0 1000)
    (with-scaling (stream 250 250) ;; so now it is 4x4
      (draw-line* stream 2 1 2 2.5)
      (draw-arrow* stream 1 1 1 2.5
		   :head-length 0.1 :head-width 0.1))))

(run-frame-top-level (make-application-frame 'foo))

i draw a 4x4 grid drawing a line and a parallel arrow (of the same
length), but the two drawing is not of the same length. 
I tried to fix that (see first attachment).

2) in make-text-style i can specify the font family with :fix or
   :fixed for fixed fonts, but the freetype experimental extension
   accept only :fix (that is standard-compliant afaik).

Do you have suggestion for the delivery of mcclim application (e.g. to
avoid the debugger et similia)?

Index: graphics.lisp
===================================================================
RCS file: /project/mcclim/cvsroot/mcclim/graphics.lisp,v
retrieving revision 1.53
diff -r1.53 graphics.lisp
580c580,581
<                (offset     (if (and head-length (not (zerop head-length)))
---
>                (offset     (transform-distance (invert-transformation (medium-transformation medium))
> 		(if (and head-length (not (zerop head-length)))
582c583
<                                0.0))               
---
>                                0.0) 0))               
Index: graphics.lisp
===================================================================
RCS file: /project/mcclim/cvsroot/mcclim/graphics.lisp,v
retrieving revision 1.53
diff -r1.53 graphics.lisp
580c580,581
<                (offset     (if (and head-length (not (zerop head-length)))
---
>                (offset     (transform-distance (invert-transformation (medium-transformation medium))
> 		(if (and head-length (not (zerop head-length)))
582c583
<                                0.0))               
---
>                                0.0) 0))