Anonymous | Login | 04-14-2021 06:17 UTC |
Main | My View | View Issues | Change Log | Docs |
Viewing Issue Advanced Details [ Jump to Notes ] | [ View Simple ] [ Issue History ] [ Print ] | |||||||||||
ID | Category | Severity | Reproducibility | Date Submitted | Last Update | |||||||
0001914 | [Squeak] Graphics | minor | always | 10-10-05 08:56 | 10-27-05 09:37 | |||||||
Reporter | wiz | View Status | public | |||||||||
Assigned To | ||||||||||||
Priority | normal | Resolution | open | Platform | ||||||||
Status | acknowledged | OS | ||||||||||
Projection | none | OS Version | ||||||||||
ETA | none | Fixed in Version | Product Version | 3.9 | ||||||||
Product Build | ||||||||||||
Summary | 0001914: [Bug] On a form canvas drawing rectangles after filling ovals makes the rectangles the wrong color. | |||||||||||
Description |
Hot off the press (Well squeak-dev anyway) [Balloon] BalloonCanvas bug? Baveco, Hans Hans.Baveco at wur.nl Sun Oct 9 22:37:39 CEST 2005 When displaying square and round dots in different colors with the following test code, the BalloonCanvas appears to mesh up the colors. Red-red-blue-red rectangles appear, instead of the expected red-blue-red-blue. When I change the order within the block, with first the #fillOval:etc and then the #fillRectangle:etc, the results are as expected though. Something weird is going on here, with #fillOval:etc always updating the color and #fillRectangle:etc not. Hans | bc offset posRect count | bc := BalloonCanvas on: Display. bc aaLevel: 2. offset := 50 @ 50. posRect := -5 @ -5 extent: 11 @ 11. count := 0. { (Color red). (Color blue). (Color red). (Color blue) } do: [:each | count := count + 1. bc drawRectangle: (posRect translateBy: (offset x * count) @ 10) color: each borderWidth: 0 borderColor: each. bc fillOval: (posRect translateBy: (offset x * count) @ 30) color: each borderWidth: 0 borderColor: each] or a simpler case | bc posRect | bc := BalloonCanvas on: Display. bc aaLevel: 2. posRect := -5 @ -5 extent: 11 @ 11. [ bc drawRectangle: (posRect translateBy: (50) @ 30) color: Color blue borderWidth: 0 borderColor: Color cyan. bc fillOval: (posRect translateBy:(50) @ 50) color: Color red borderWidth: 0 borderColor: each . bc drawRectangle: (posRect translateBy: (50) @ 70) color: Color blue borderWidth: 0 borderColor: Color cyan.] value The second rectangle will be red not blue . For some odd reason the bug will only occur after one rectangle is drawn correctly. This must be setting up some state which the next rectange believes to be undisturbed and the intervening oval of course has changed. |
|||||||||||
Steps To Reproduce | ||||||||||||
Additional Information |
fillOval: etc. causes the GrafPort fillPattern to be set when it sends its receiver a setFillColor: message. drawRectangle leaves fillPattern alone at least on the second pass. So if it is set then the drawRectangle color parameter is trumped by the fillPattern parameter it didn't set. The balloon engine is relatively innocent. This was a great bug find and a fine reproducable pattern. Thanks Hans. A fix is still needed. Are there any undesirable side affect to adding a setFillColor: to drawRectangle? Will fixing up the one drawRectange routine do it. Before setFillColor: is sent. If it is never sent drawRectange works with colors as expected. What state is fillPattern in then and would a better fix be to have fillOval return it to that state? |
|||||||||||
Attached Files | ||||||||||||
|
Mantis 1.0.8[^]
Copyright © 2000 - 2007 Mantis Group
57 total queries executed. 39 unique queries executed. |