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

Author Topic: Stroke on text / font  (Read 1860 times)

0 Members and 1 Guest are viewing this topic.

Sakurazaki

  • Newbie
  • *
  • Posts: 31
  • `お嬢様を守ります!
    • MSN Messenger - sakurazaki.setsunita@gmail.com
    • View Profile
Stroke on text / font
« on: June 08, 2013, 01:50:31 am »
Hi there,

I'd like to know if there is any possibility, builtin function or some technique
to easily draw a stroke around each letter of a text.

So when i write white color "A" around it will be drawn a x width sf::color stroke.
Something like Outline inside Shapes.

thanks!
こんな私も変われるのならもし変われるのなら白になる

zsbzsb

  • Hero Member
  • *****
  • Posts: 1409
  • Active Maintainer of CSFML/SFML.NET
    • View Profile
    • My little corner...
    • Email
Re: Stroke on text / font
« Reply #1 on: June 08, 2013, 03:40:08 am »
This feature is not build into SFML, however you can fake the effect by drawing the text 5 times. 1 time left, 1 time up, 1 time right, 1 time down and 1 time in the center. Offset in each direction and draw the outline color. Then draw in the middle with your fill color.
Motion / MotionNET - Complete video / audio playback for SFML / SFML.NET

NetEXT - An SFML.NET Extension Library based on Thor

Sakurazaki

  • Newbie
  • *
  • Posts: 31
  • `お嬢様を守ります!
    • MSN Messenger - sakurazaki.setsunita@gmail.com
    • View Profile
Re: Stroke on text / font
« Reply #2 on: June 08, 2013, 02:14:18 pm »
I see, thanks!
こんな私も変われるのならもし変われるのなら白になる