Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


2D Vector Text help.

This topic is 5454 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi all, I'm getting my head round vector graphics in 2D at the moment and trying to construct some routines to draw vector graphics text based on a normal text string to a certain XY co-ordinate. I have a line drawing function Line(x1, y1, x2, y2) which I am going to use to draw this text. I would like some advice or suggestions for ways of doing this. My first thought was to have a generic data structure for each letter made up of nine points (each with an XY co-ordinate) like this: -
1     2     3
*     *     *

4     5     6
*     *     *

7     8     9
*     *     *
So, for example, to draw the letter 'A', you would store the pattern like this: -
7      4        2 Bytes
4      2        2 Bytes
2      6        2 Bytes
6      9        2 Bytes
4      6        2 Bytes
The generic data structure of these nine points (with 5 being the local origin) would be used to draw the letters only, but not stored for each letter (I think). Problem is, I'm not really sure where to go from here. What data structures could I use for this? Arrays? Any ideas on how to implement this? Is it too complicated or is there an easier way? Thank you for any advice. RM. Tron Software [edited by - RageMatrix on October 16, 2003 4:56:15 PM]

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!