Menu

#21 Zero Height Gradient Rectangle Brush Exception

0.9.10.0
open
nobody
General (25)
5
2008-03-17
2008-03-17
No

There is an unhandled exception when creating a zero height gradient rectangle brush.

How to Reproduce:
Create a bar plot with the bars filled in vertical gradient mode (color changes along the y-axis). Manually resize the containing window until one of the bars becomes zero pixels high (with a non-zero data point). As soon as this happens, the application will crash with an unhandled exception.

Recommended Fix:
Before painting the bar for a data point, check for zero height. If zero height, maybe draw a single pixel line at that point, but don't bother creating the rectangle or gradient fill brush.

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.