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

Author Topic: setting a transparent color  (Read 3086 times)

0 Members and 1 Guest are viewing this topic.

WSPSNIPER

  • Newbie
  • *
  • Posts: 28
    • View Profile
setting a transparent color
« on: January 02, 2010, 01:08:04 am »
i need to know how to set a transparent color so that i can have a sprite not in a block, how do you go about doing this

i mean like in sdl when you set (255, 0, 255) aka pink to be transparent is there a way in sfml?

OniLinkPlus

  • Hero Member
  • *****
  • Posts: 500
    • View Profile
setting a transparent color
« Reply #1 on: January 02, 2010, 01:29:26 am »
I don't think you can. Turn the image into a PNG with an Alpha channel and you won't have to do that.
I use the latest build of SFML2

Dravere

  • Newbie
  • *
  • Posts: 37
    • View Profile
setting a transparent color
« Reply #2 on: January 02, 2010, 01:51:28 am »
Do you mean, how to create a transparent color mask for an image?
-> http://www.sfml-dev.org/documentation/1.5/classsf_1_1Image.htm#e9a15fe9a4750295845b5ae081c2ec50

Dravere

WSPSNIPER

  • Newbie
  • *
  • Posts: 28
    • View Profile
setting a transparent color
« Reply #3 on: January 02, 2010, 02:43:04 am »
Thanks that helped alot

 

anything