Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Direct2D Border Around Text

For better visual appearance want to draw a black border around my text.

example pic

Currently i am drawing the same text 5 times.

If i want to draw the text on x = 5, y = 10 i would draw the text one time on the actual position.

Then i would draw the same text in black color with slightly other positions.

  1. x = 4, y = 10
  2. x = 5, y = 9

    ...

I can only imagine that this is bad performance wise. Or is this the correct way?

like image 854
Tommy Avatar asked May 03 '26 05:05

Tommy


1 Answers

I never did it the correct way myself, but it seems here they did it: http://www.codeproject.com/Articles/376597/Outline-Text-With-DirectWrite

like image 142
Anton Angelov Avatar answered May 05 '26 00:05

Anton Angelov