| 1 | [[TOC]] |
| 2 | |
| 3 | = CImage (825gen2) = |
| 4 | |
| 5 | CImage is a C++ class that is provided to display jpeg or png images. |
| 6 | |
| 7 | == Constructors == |
| 8 | |
| 9 | {{{ |
| 10 | CImage(void); |
| 11 | CImage(const char* filename) |
| 12 | }}} |
| 13 | The constructor with a passed filename will create a CImage object and load the file into memory. |
| 14 | |
| 15 | ==== Parameters ==== |
| 16 | * filename - filename |
| 17 | |
| 18 | ==== Examples ==== |
| 19 | |
| 20 | {{{ |
| 21 | CImage image("/usr/images/cardinal.png"); |
| 22 | }}} |
| 23 | |
| 24 | |
| 25 | {{{ |
| 26 | CImage image; |
| 27 | }}} |
| 28 | This constructs the image object without loading any file yet. |
| 29 | |
| 30 | == Member Functions == |
| 31 | |
| 32 | === LoadImage === |
| 33 | Opens a specified file. |
| 34 | |
| 35 | {{{ |
| 36 | int LoadImage(const char* filename); |
| 37 | }}} |
| 38 | |
| 39 | ==== Parameters ==== |
| 40 | * pszFilename - filename |
| 41 | |
| 42 | ==== Return Value ==== |
| 43 | |
| 44 | |
| 45 | ==== Remarks ==== |
| 46 | |
| 47 | |
| 48 | ==== Example ==== |
| 49 | |
| 50 | |
| 51 | === Draw === |
| 52 | Display the image |
| 53 | |
| 54 | {{{ |
| 55 | void Draw(int x, int y, CDspArea* dspArea = NULL); |
| 56 | }}} |
| 57 | |
| 58 | ==== Parameters ==== |
| 59 | * x - X display coordinate - (If dspArea specified - within specified area) |
| 60 | * y - Y display coordinate - (If dspArea specified - within specified area) |
| 61 | * dspArea - Display area - if not specified default to main display area dspMain |
| 62 | |
| 63 | ==== Return Value ==== |
| 64 | |
| 65 | |
| 66 | ==== Remarks ==== |
| 67 | |
| 68 | |
| 69 | ==== Example ==== |
| 70 | |