Custom Text Formatting (Previously: Getting long results in a program)
|
03-31-2024, 04:34 PM
Post: #27
|
|||
|
|||
RE: Getting long results in Program
The solution I mentioned utilizes the ICON object. A particular characteristic of ICON is that you can also draw on it exactly the same way as on G0-G9. The only limitation here is that you must specify the maximum buffer size in advance (or buffers, as it's often better to have several small ones instead of one large). By defining such a buffer, you assume that you will draw something on it, so during its definition, we can assume that it is entirely in a uniform color. This makes its size relatively small in the source code. Then it doesn't matter whether the buffer is 20x20 pixels or 320x240 pixels because it will occupy a similar amount of space in the source code.
Here is an example of using a buffer based on ICON for drawing transparent text: Code: EXPORT DRAWTEXT_P(text,x,y,font,alpha) In this example, I used a buffer with a size of 320x28 pixels because that is sufficient to draw text at the maximum font size using TEXTOUT_P. Piotr Kowalewski |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 73 Guest(s)