It is currently March 28th, 2024, 11:59 am

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

Report bugs with the Rainmeter application and suggest features.
Post Reply
User avatar
ikarus1969
Posts: 571
Joined: February 28th, 2011, 3:20 pm
Location: Vienna, Austria

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

Post by ikarus1969 »

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
Brian
Developer
Posts: 2673
Joined: November 24th, 2011, 1:42 am
Location: Utah

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

Post by Brian »

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
ikarus1969
Posts: 571
Joined: February 28th, 2011, 3:20 pm
Location: Vienna, Austria

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

Post by ikarus1969 »

Ah, ok, thank you Brian for clarifying!
Post Reply