Copyright (C) 2000-2012 |
GNU Info (aalib.info)FlushingFlushing into screen and text output functions ********************************************** We've written the whole charapter for small functions to get your attention. None of them without flusing the image into screen will work. Once AA-lib is started, image drawn and rendered it needs to be finally displayed on the screen. Yes! That's it! You have to flush the data (or you'll get a blank screen:). void aa_flush(aa_context *C); This function will update the screen due to the situation stored in text and attribute buffers. This buffers are filled by rendering but they may be also accesed directly. A pointer to them can be obtained by calling `aa_text(context)' or `aa_attrs(context)' macros. The `aa_text' returns pointer to array representing text output buffer. An "videroram-like" array represented in the same way as `aa_image' (with the screen, not image dimenstions) where each byte is ascii value of character to display. The `aa_attrs' return pointer to array representing additional attribute for each character. Attribute buffer can contain following values: `AA_NORMAL' for normal characters `AA_BOLD' for bold (double bright) characters `AA_DIM' for dim (half bright) characters `AA_BOLDFONT' for characters displayed using bold font `AA_REVERSE' for reversed characters `AA_SPECIAL' this can be used for displaying text over images. Its implementation depends at driver. Most drivers implement it as a white text on a blue background. For more comfortable output you may use: void aa_puts(aa_context *C, int X, int Y, int ATTR, char *S); int aa_printf(aa_context *C, int X, int Y, int ATTR, char *FMT, ...); It puts a string `s' (and atribute `attr') at coordinates `x', `y'. Note that it doesn't move the cursor nor flushes buffers to screen. To move the cursor you have to use following function void aa_gotoxy(aa_context *C, int X, int Y); Some drivers can also support cursor hiding: `aa_hidecursor' or `aa_showcursor' functions. automatically generated by info2www version 1.2.2.9 |