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

Author Topic: SFML2 ConvexShape setFillColor Error  (Read 1697 times)

0 Members and 1 Guest are viewing this topic.

b3ngr33ni3r

  • Newbie
  • *
  • Posts: 6
    • View Profile
SFML2 ConvexShape setFillColor Error
« on: March 19, 2012, 09:21:05 pm »
Hey guys, so basically what i'm seeing is when creating a convex shape, the setFillColor isn't just effecting the inside of the convex shape, it's effecting the outside slightly. it's fairly difficult to explain, but when the convex shape points drop below a certain point, the fill color is show above it.
For instance,

http://dl.dropbox.com/u/2644125/WaterChainProblem.png

Any help/guidance/explanations would be greatly appreciated.

julen26

  • Jr. Member
  • **
  • Posts: 89
    • View Profile
    • http://julen26.blogspot.com
SFML2 ConvexShape setFillColor Error
« Reply #1 on: March 19, 2012, 10:08:58 pm »
http://www.sfml-dev.org/documentation/2.0/classsf_1_1ConvexShape.php#details

Quote
It is important to keep in mind that a convex shape must always be... convex, otherwise it may not be drawn correctly.


Your shape isn't convex.

Non-convex

Convex

b3ngr33ni3r

  • Newbie
  • *
  • Posts: 6
    • View Profile
SFML2 ConvexShape setFillColor Error
« Reply #2 on: March 19, 2012, 11:29:26 pm »
Oh wow, my bad.
thanks.