diff options
author | Camil Staps | 2015-08-13 12:58:13 +0200 |
---|---|---|
committer | Camil Staps | 2015-08-13 12:58:13 +0200 |
commit | 11c9e1a0e29bb862b7a9bbbf76e95a3946263360 (patch) | |
tree | b66d062d43d4bae17fb0fe61f387f07e56c08d4c | |
parent | More common GTK font names (diff) |
Checking equality of requested pen (back) colour and current colour causes heap to fill; why, no idea.
-rw-r--r-- | ospicture.icl | 13 | ||||
-rw-r--r-- | 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
}
|