You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, OPENRNDR is a bit inconsistent when it comes to strokes. This is most apparent when using a semi-transparent stroke color.
When drawing a Rectangle the stroke is drawn over the fill (top-left shape in the screenshot).
When drawing a Circle the stroke is drawn outside the fill (bottom-left shape in the screenshot).
When drawing a ShapeContour of any kind, the stroke is drawn half-over the fill, leaving the other half outside the fill (top-right and bottom-right shapes in the screenshot).
What's more is that Rectangle and Circle are automatically adjusted as to not change their pixels-on-the-screen size when strokeWeight changes, but this is not the case for ShapeContour, where the strokeWeight affects the pixels-on-the-screen size of the shape. This means calling .contour on a Circle and drawing it can create a shape different in size compared to the original Circle (in terms of pixels on the screen).
I believe the ShapeContour currently has the ideal outcome here, as this matches the behavior of strokes in frameworks such as Processing and is most likely how users expect stroke to work. Therefore the drawing of Rectangle and Circle should be changed to be consistent with ShapeContour.
I'll include a more thorough test case that puts more emphasis on correct transparency.
Ideally in this screenshot every quadrant would have 2 pairs of identical shapes.
Operating System
Windows
OPENRNDR version
32ae9e9
Java version
Adoptium 17
Describe the Bug
Currently, OPENRNDR is a bit inconsistent when it comes to strokes. This is most apparent when using a semi-transparent stroke color.
When drawing a
Rectangle
the stroke is drawn over the fill (top-left shape in the screenshot).When drawing a
Circle
the stroke is drawn outside the fill (bottom-left shape in the screenshot).When drawing a
ShapeContour
of any kind, the stroke is drawn half-over the fill, leaving the other half outside the fill (top-right and bottom-right shapes in the screenshot).What's more is that Rectangle and Circle are automatically adjusted as to not change their pixels-on-the-screen size when strokeWeight changes, but this is not the case for ShapeContour, where the strokeWeight affects the pixels-on-the-screen size of the shape. This means calling
.contour
on a Circle and drawing it can create a shape different in size compared to the original Circle (in terms of pixels on the screen).I believe the ShapeContour currently has the ideal outcome here, as this matches the behavior of strokes in frameworks such as Processing and is most likely how users expect stroke to work. Therefore the drawing of Rectangle and Circle should be changed to be consistent with ShapeContour.
Steps to Reproduce
Screenshots (Optional)
The text was updated successfully, but these errors were encountered: