SFML community forums

Help => Graphics => Topic started by: kim366 on November 25, 2016, 05:22:32 pm

Title: Is the Outline Inside or Outside the Object?
Post by: kim366 on November 25, 2016, 05:22:32 pm
Let's say we have an
sf::CircleShape c(10)
If we now set
c.setOutlineThickness(5)
is the Radius of the Circle 10 or 15?

Thanks, Kim
Title: Re: Is the Outline Inside or Outside the Object?
Post by: kim366 on November 25, 2016, 05:23:40 pm
It's outside, so 15 for anyone looking for the answer.
Title: Re: Is the Outline Inside or Outside the Object?
Post by: FRex on November 25, 2016, 06:50:37 pm
Negative outline value works too, by the way.
Title: Re: Is the Outline Inside or Outside the Object?
Post by: Hapax on November 25, 2016, 11:29:59 pm
The radius of the circle would still be 10 but the radius of the outer rim of the outline would be 15.

If you use a negative value (as suggested by FRex) of -5 (instead of positive 5), the radius of the circle would effectively now be 5 and the radius of the outer rim of the outline would be 10.