@@ -362,22 +362,33 @@ void gfx_PrintString(const char *string);
362
362
* The current cursor position is updated.
363
363
* No text clipping is performed.
364
364
*/
365
- void gfx_PrintStringXY (const char * string , uint24_t x , uint8_t y );
365
+ void gfx_PrintStringXY (const char * string , int x , int y );
366
366
367
367
/**
368
368
* Returns the current text cursor X position
369
369
*/
370
- uint24_t gfx_GetTextX (void );
370
+ int gfx_GetTextX (void );
371
371
372
372
/**
373
373
* Returns the current text cursor Y position
374
374
*/
375
- uint8_t gfx_GetTextY (void );
375
+ int gfx_GetTextY (void );
376
376
377
377
/**
378
378
* Sets the text cursor XY position
379
379
*/
380
- void gfx_SetTextXY (uint24_t x , uint8_t y );
380
+ void gfx_SetTextXY (int x , int y );
381
+
382
+ /**
383
+ * Sets the configuration for the text routines. The current options are:
384
+ * GFX_TEXT_CLIP - Default, text routines do not clip (much faster)
385
+ * GFX_TEXT_NOCLIP - Text routines will clip against the defined clip window
386
+ *
387
+ * Clipped text does not scale text
388
+ */
389
+ void gfx_SetTextConfig (uint8_t config );
390
+ #define GFX_TEXT_CLIP 1
391
+ #define GFX_TEXT_NOCLIP 2
381
392
382
393
/**
383
394
* Sets the text foreground (FG), background (BG), and transparent (TP) color indexes
@@ -432,6 +443,12 @@ gfx_image_t *gfx_RotateSpriteC(gfx_image_t *sprite_in, gfx_image_t *sprite_out);
432
443
gfx_image_t * gfx_RotateSpriteCC (gfx_image_t * sprite_in , gfx_image_t * sprite_out );
433
444
gfx_image_t * gfx_RotateSpriteHalf (gfx_image_t * sprite_in , gfx_image_t * sprite_out );
434
445
446
+ /**
447
+ * Creates a temporary sprite for the character c. This may be useful for performing rotations and other
448
+ * operations on characters? The sprite returned is always 8x8 pixels.
449
+ */
450
+ gfx_image_t * gfx_GetSpriteChar (char c );
451
+
435
452
/**
436
453
* Set the font routines to use the provided font, formated 8x8
437
454
*/
@@ -483,6 +500,17 @@ void gfx_ShiftUp(uint8_t pixels);
483
500
void gfx_ShiftLeft (uint24_t pixels );
484
501
void gfx_ShiftRight (uint24_t pixels );
485
502
503
+ /**
504
+ * The following routines are used to implement text clipping; which is
505
+ * substantially slower than normal text. However, these may be useful.
506
+ */
507
+
508
+ /**
509
+ * Outputs a string at the given XY coordinates.
510
+ * The current cursor position is updated.
511
+ */
512
+ void gfx_PrintStringXY_Clip (const char * string , int x , int y );
513
+
486
514
/**
487
515
* Produces a random integer value
488
516
*/
0 commit comments