Bug? Shape Rectangle with "radius 0" differs from "no radius defined"

Report bugs with the Rainmeter application and suggest features.
User avatar

Bug? Shape Rectangle with "radius 0" differs from "no radius defined"

November 6th, 2017, 2:48 pm
ikarus1969
   [240 posts]

Hi!

today i noticed a difference between the following definitions:

I have a rectangle, one time defined with no radius and one time with radius 0 and got a difference which i didn't expect:

Here, radius is defined as zero:

Code: Select all

[RM_Rect]
Meter=SHAPE
Shape=Rectangle 20, 20, 100, 100, 0, 0 | StrokeWidth 10 | Stroke Color 000000FF | Fill Color 004080FF

-> will produce a rounded corner:
Screenshot Rainmeter Shape Radius 0.jpg



Here, radius is not defined:

Code: Select all

[RM_Rect]
Meter=SHAPE
Shape=Rectangle 20, 20, 100, 100 | StrokeWidth 10 | Stroke Color 000000FF | Fill Color 004080FF

-> will produce a "sharp" corner:
Screenshot Rainmeter Shape No Radius.jpg


Is this an intended behavior?
Or shouldn't both code fragments produce the same, second ("sharp"), corner-type?
Last edited by ikarus1969 on November 6th, 2017, 5:23 pm, edited 1 time in total.
User avatar

Re: Bug? Shape Rectangle with "radius 0" differs from "no radius defined"

November 6th, 2017, 3:28 pm
Brian
Developer   [1591 posts]

Unfortunately this is expected behavior from D2D. It has to do with how the stroke is drawn.

Here is what MS says: [link]
Microsoft wrote:Even when both radiuX and radiusY are zero, the rounded rectangle is different from a rectangle., When stroked, the corners of the rounded rectangle are roundly joined, not mitered (square).


-Brian
User avatar

Re: Bug? Shape Rectangle with "radius 0" differs from "no radius defined"

November 6th, 2017, 5:23 pm
ikarus1969
   [240 posts]

Ah, ok, thank you Brian for clarifying!

Return to “Bugs & Feature Suggestions”



Who is online

Users browsing this forum: No registered users and 2 guests