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)?
On 8/19/06, Luigi Panzeri matley@muppetslab.org wrote:
- 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.
Thanks for pointing this out. However, your patch is not quite correct. First, transform-distance returns two values, so your use of it would only be correct where the arrow was aligned with the x-axis. Also, I believe the right thing is to adjust for scaling on the variable 'thickness', rather than scaling only 'offset'. You get the same result for 'offset', but thickness is also used in the edge case where the arrow heads would overlap, and the idea is that we just get the thickness (in some unspecified units which we'll pretend are stream coordinate units) into the current coordinate system.
I've adapted your patch as such and applied it to McCLIM. Hopefully this resolves the issue.
Thanks for the patch. Sorry for the delayed response.