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

Author Topic: Setting outline colour independently of fill colour  (Read 2378 times)

0 Members and 1 Guest are viewing this topic.

Wibbs

  • Newbie
  • *
  • Posts: 40
    • View Profile
Setting outline colour independently of fill colour
« on: October 18, 2010, 06:30:49 pm »
Hi,

I'm currently trying to get a shape to render with independently set fill and outline colours.  I have worked out how to set the point colour and point outline colour when I'm adding the points to the shape but whatever I seem to do, I can't stop the fill colour from influencing the outline colour thats drawn.  The example I'm working with is trying to draw a black shape with a white outline, and I get the following results...

A shape with a black fill and white outline will always draw as a black outline, even when the fill is disabled.
A shape with a white fill and white outline will draw with a white outline with the fill disabled.

I'm pretty certain this is to do with the way the two colours combine when rendered, and I've tried messing around with the blend mode of the shape, but this didn't have the desired effect either.

I feel there must be something obvious I'm missing here, but can't see it.

Any help would be greatly appreciated.

Thanks,

Phil

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Setting outline colour independently of fill colour
« Reply #1 on: October 18, 2010, 07:05:50 pm »
Can you show your code?
Laurent Gomila - SFML developer

Wibbs

  • Newbie
  • *
  • Posts: 40
    • View Profile
Setting outline colour independently of fill colour
« Reply #2 on: October 18, 2010, 07:42:41 pm »
Heh,

I've actually just tracked down what the problem was - I was accidentally setting the general shape colour as well as the colours of individual points, which when combined together gave be black.  Now I've removed the line that sets the shape colour it works fine.

Sorry about that,

Phil