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 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 enclosed in a Type) like this: -
So, for example, to draw the letter 'A', you would store the pattern like this: -
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? Data banks? Any ideas on how to implement this? Is it too complicated or is there an easier way?
Thank you for any advice.
Rage_Matrix
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 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 enclosed in a Type) 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: -
FROM TO 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? Data banks? Any ideas on how to implement this? Is it too complicated or is there an easier way?
Thank you for any advice.
Rage_Matrix