| 92 | } |
| 93 | |
| 94 | void PiuImageDraw(void* it, PiuView* view, PiuRectangle area) |
| 95 | { |
| 96 | PiuImage* self = it; |
| 97 | PiuContentDraw(it, view, area); |
| 98 | if ((*self)->data) { |
| 99 | PiuRectangleRecord bounds; |
| 100 | PiuRectangleSet(&bounds, 0, 0, (*self)->bounds.width, (*self)->bounds.height); |
| 101 | PiuViewPushClip(view, 0, 0, bounds.width, bounds.height); |
| 102 | #ifdef piuGPU |
| 103 | { |
| 104 | PocoBitmapRecord bm; |
| 105 | if ((*self)->frameChanged) { |
| 106 | (*self)->frameChanged = 0; |
| 107 | PocoBitmapChanged((*view)->poco, (*self)->frameID, PiuViewReceiver, view); |
| 108 | } |
| 109 | bm.width = (*self)->dataWidth; |
| 110 | bm.height = (*self)->dataHeight; |
| 111 | bm.format = (*self)->frameFormat; |
| 112 | bm.pixels = (PocoPixel*)((*self)->data + sizeof(uint16_t) + (*self)->frameOffset); |
| 113 | bm.id = (*self)->frameID; |
| 114 | bm.byteLength = (bm.format == (kCommodettoBitmapRGB565LE | kCommodettoBitmapPacked)) ? 0 : (*self)->frameSize; |
| 115 | PocoDrawImage((*view)->poco, &bm, 255, (*view)->poco->xOrigin, (*view)->poco->yOrigin, bounds.width, bounds.height, 0, 0, (*self)->dataWidth, (*self)->dataHeight); |
| 116 | } |
| 117 | #else |
| 118 | PiuViewDrawContent(view, PiuImageDrawAux, it, 0, 0, (*self)->dataWidth, (*self)->dataHeight); |
| 119 | #endif |
| 120 | PiuViewPopClip(view); |
| 121 | } |
| 122 | } |
| 123 | |
| 124 | void PiuImageDrawAux(void* it, PiuView* view, PiuCoordinate x, PiuCoordinate y, PiuDimension sw, PiuDimension sh) |
| 125 | { |
nothing calls this directly
no test coverage detected