From: <kr_...@us...> - 2004-05-07 12:45:50
|
Update of /cvsroot/htoolkit/port/src/Port In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21556/src/Port Modified Files: Canvas.hs Log Message: Remove GetResolution and GetScaleFactors functions Index: Canvas.hs =================================================================== RCS file: /cvsroot/htoolkit/port/src/Port/Canvas.hs,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** Canvas.hs 24 Aug 2003 19:02:45 -0000 1.17 --- Canvas.hs 7 May 2004 12:45:41 -0000 1.18 *************** *** 51,55 **** -- * Resolution , mmToVPixels, mmToHPixels - , getResolution, getScaleFactor ) where --- 51,54 ---- *************** *** 339,372 **** foreign import ccall "osMMtoHPixels" mmToHPixels :: Double -> IO Int - -- | Get the resolution of a canvas in pixels per logical inch. - getResolution :: CanvasHandle -> IO Size - getResolution canvas - = alloca $ \pw -> - alloca $ \ph -> - do osGetResolution canvas pw ph - w <- peek pw - h <- peek ph - return (fromCSize w h) - foreign import ccall osGetResolution :: CanvasHandle -> Ptr CInt -> Ptr CInt -> IO () - - -- | Get scaling factors, which have to be applied to coordinates for clipping regions in case - -- of emulating the screen resolution for printing. The function returns the pixel size of the - -- window and the pixel size of the actual view port. - getScaleFactor :: CanvasHandle -> IO (Size,Size) - getScaleFactor canvas - = alloca $ \px0 -> - alloca $ \py0 -> - alloca $ \px1 -> - alloca $ \py1 -> - do osGetScaleFactor canvas px0 px1 py0 py1 - x0 <- peek px0 - x1 <- peek px1 - y0 <- peek py0 - y1 <- peek py1 - return (fromCSize x0 y0, fromCSize x1 y1) - foreign import ccall osGetScaleFactor :: CanvasHandle -> Ptr CInt -> Ptr CInt -> Ptr CInt -> Ptr CInt -> IO () - - - {----------------------------------------------------------------------------------------- World transformations --- 338,341 ---- |