From 11c9e1a0e29bb862b7a9bbbf76e95a3946263360 Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Thu, 13 Aug 2015 12:58:13 +0200 Subject: Checking equality of requested pen (back) colour and current colour causes heap to fill; why, no idea. --- ospicture.icl | 13 +++++++------ pictCCall_12.icl | 4 ++-- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/ospicture.icl b/ospicture.icl index ddc236f..e76aa6c 100644 --- a/ospicture.icl +++ b/ospicture.icl @@ -229,9 +229,9 @@ getpictpensize picture=:{pictPen={penSize}} // Change the PenColour: setpictpencolour :: !Colour !*Picture -> *Picture setpictpencolour colour picture=:{pictToolbox,pictPen,pictContext} - | reqRGB==curRGB - = picture - | otherwise + //| reqRGB==curRGB + // = picture + //| otherwise # (context,tb) = winSetPenColor reqRGB (pictContext,pictToolbox) pen = {pictPen & penForeColour=colour} = {picture & pictPen=pen,pictToolbox=tb,pictContext=context} @@ -239,11 +239,12 @@ where reqRGB = toRGBtriple colour curRGB = toRGBtriple pictPen.penForeColour +from StdMisc import abort setpictbackcolour :: !Colour !*Picture -> *Picture setpictbackcolour colour picture=:{pictToolbox,pictPen,pictContext} - | reqRGB==curRGB - = picture - | otherwise + //| reqRGB==curRGB + // = picture + //| otherwise # (context,tb) = winSetBackColor (toRGBtriple colour) (pictContext,pictToolbox) pen = {pictPen & penBackColour=colour} = {picture & pictPen=pen,pictToolbox=tb,pictContext=context} diff --git a/pictCCall_12.icl b/pictCCall_12.icl index 7e11f13..e7c7b55 100644 --- a/pictCCall_12.icl +++ b/pictCCall_12.icl @@ -687,7 +687,7 @@ winSetBackColor _ _ = code { .inline WinSetBackColor - ccall WinSetBackColor "IIIII-II" + ccall WinSetBackColor "IIIpI-pI" .end } @@ -696,7 +696,7 @@ winSetPenColor _ _ = code { .inline WinSetPenColor - ccall WinSetPenColor "IIIII-II" + ccall WinSetPenColor "IIIpI-pI" .end } -- cgit v1.2.3