SFML community forums

Help => Graphics => Topic started by: hippocat on March 03, 2010, 04:09:33 am

Title: Fill shape with pattern
Post by: hippocat on March 03, 2010, 04:09:33 am
Is there any way to fill shape not just color but specific pattern or bitmap ?
Thanks
Aleksey
Title: Fill shape with pattern
Post by: Laurent on March 03, 2010, 08:34:09 am
No.
Title: Fill shape with pattern
Post by: Nexus on March 03, 2010, 09:00:41 pm
Not directly. You could render the shape to an image (SFML 2) and then modify all colored pixels (e.g. copy the texture to them). Eventually, you work with a sf::Sprite instead of sf::Shape.
Title: Fill shape with pattern
Post by: bluelink on March 04, 2010, 01:40:55 am
There's no need to modify the pixels manually, you can adapt the blend mode of the sf::Shape and the sf::Sprite to get the effect you want.  :wink:
Title: Fill shape with pattern
Post by: hippocat on March 04, 2010, 04:06:26 pm
Interesting, so I can fill shape with color I like and employ blender somehow to make pattern ? Could anyone give me short sample for this color blending  ?
Thanks
Aleksey