[mcclim-cvs] CVS update: mcclim/Backends/beagle/windowing/mirror.lisp

Duncan Rose drose at common-lisp.net
Wed May 18 20:21:59 UTC 2005


Update of /project/mcclim/cvsroot/mcclim/Backends/beagle/windowing
In directory common-lisp.net:/tmp/cvs-serv24418/beagle/windowing

Modified Files:
	mirror.lisp 
Log Message:
Rewrote font metrics code; bounding rectangles around text now look
much better. Unfortunately there doesn't seem to be a way not to
include Cocoa's own 'leading' in the font metrics, which means the
linegap is larger than it needs to be. This can be resolved with
a move to 10.4 (new constants in NSStringAdditions to control this).
Rejigged the drawing methods somewhat so the 'thinnest visible line'
gets displayed which makes bounding rects look better. Artefacts
less obvious (but still present )-:) now.

Date: Wed May 18 22:21:58 2005
Author: drose

Index: mcclim/Backends/beagle/windowing/mirror.lisp
diff -u mcclim/Backends/beagle/windowing/mirror.lisp:1.1 mcclim/Backends/beagle/windowing/mirror.lisp:1.2
--- mcclim/Backends/beagle/windowing/mirror.lisp:1.1	Tue May 17 00:13:21 2005
+++ mcclim/Backends/beagle/windowing/mirror.lisp	Wed May 18 22:21:58 2005
@@ -590,20 +590,6 @@
 (defmethod port-disable-sheet ((port beagle-port) (mirror mirrored-sheet-mixin))
   (error "port-disable-sheet: implement me"))
 
-;;; Nabbed from CLX backend medium.lisp
-(declaim (inline round-coordinate))
-(defun round-coordinate (x)
-  "Function used for rounding coordinates:
-
-We use \"mercantile rounding\", instead of the CL round to nearest
-even number, when in doubt.
-
-Reason: As the CLIM drawing model is specified, you quite often
-want to operate with coordinates, which are multiples of 1/2. 
-Using CL:ROUND gives \"random\" results. Using \"mercantile
-rounding\" gives consistent results."
-  (floor (+ x .5)))
-
 ;;; From CLX/port.lisp - hrm. What the heck is this doing exactly?
 ;;; I suspect (though can't be sure) that a proper implementation of grafts might
 ;;; make all this much, much easier.




More information about the Mcclim-cvs mailing list