From: <kr_...@us...> - 2003-02-03 16:53:46
|
Update of /cvsroot/htoolkit/gio/src/Graphics/UI/GIO In directory sc8-pr-cvs1:/tmp/cvs-serv13436/gio/src/Graphics/UI/GIO Modified Files: Canvas.hs Log Message: The implementation of Canvas are changed for better performance. setPenColor, setPenBackColor, setPenHatchStyle and all other setPen* functions are replaced with single function which changes all attributes of Canvas in single step. Index: Canvas.hs =================================================================== RCS file: /cvsroot/htoolkit/gio/src/Graphics/UI/GIO/Canvas.hs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Canvas.hs 30 Jan 2003 23:58:30 -0000 1.3 --- Canvas.hs 3 Feb 2003 16:53:41 -0000 1.4 *************** *** 89,111 **** where getter c = getVar (vpen c) ! setter c p = do let h = hcanvas c ! oldp <- takeVar (vpen c) ! when (penColor oldp /= penColor p) ! (Port.setPenColor (penColor p) h) ! when (penSize oldp /= penSize p) ! (Port.setPenSize (penSize p) h) ! when (penFont oldp /= penFont p) ! (Port.setPenFont (penFont p) h) ! when (penMode oldp /= penMode p) ! (Port.setPenDrawMode (penMode p) h) ! when (penJoinStyle oldp /= penJoinStyle p) ! (Port.setPenJoinStyle (penJoinStyle p) h) ! when (penHatchStyle oldp /= penHatchStyle p) ! (Port.setPenHatchStyle (penHatchStyle p) h) ! when (penCapStyle oldp /= penCapStyle p) ! (Port.setPenCapStyle (penCapStyle p) h) ! when (penLineStyle oldp /= penLineStyle p) ! (Port.setPenLineStyle (penLineStyle p) h) ! putVar (vpen c) p -- | The current drawing color. --- 89,95 ---- where getter c = getVar (vpen c) ! setter c p = do takeVar (vpen c) ! Port.changeCanvasPen p (hcanvas c) ! putVar (vpen c) p -- | The current drawing color. |