Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Is the Outline Inside or Outside the Object?  (Read 2623 times)

0 Members and 1 Guest are viewing this topic.

kim366

  • Newbie
  • *
  • Posts: 35
    • View Profile
Is the Outline Inside or Outside the Object?
« 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

kim366

  • Newbie
  • *
  • Posts: 35
    • View Profile
Re: Is the Outline Inside or Outside the Object?
« Reply #1 on: November 25, 2016, 05:23:40 pm »
It's outside, so 15 for anyone looking for the answer.

FRex

  • Hero Member
  • *****
  • Posts: 1848
  • Back to C++ gamedev with SFML in May 2023
    • View Profile
    • Email
Re: Is the Outline Inside or Outside the Object?
« Reply #2 on: November 25, 2016, 06:50:37 pm »
Negative outline value works too, by the way.
Back to C++ gamedev with SFML in May 2023

Hapax

  • Hero Member
  • *****
  • Posts: 3385
  • My number of posts is shown in hexadecimal.
    • View Profile
    • Links
Re: Is the Outline Inside or Outside the Object?
« Reply #3 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.
Selba Ward -SFML drawables
Cheese Map -Drawable Layered Tile Map
Kairos -Timing Library
Grambol
 *Hapaxia Links*

 

anything