| 96 | } |
| 97 | |
| 98 | void PiuShapeDraw(void* it, PiuView* view, PiuRectangle area) |
| 99 | { |
| 100 | PiuShape* self = it; |
| 101 | PiuSkin* skin = (*self)->skin; |
| 102 | if (skin) { |
| 103 | PiuColorRecord color; |
| 104 | PiuState state = (*self)->state; |
| 105 | if (state < 0) state = 0; |
| 106 | else if (3 < state) state = 3; |
| 107 | if ((*self)->fillOutline) { |
| 108 | PiuColorsBlend((*skin)->data.color.fill, state, &color); |
| 109 | (*self)->fillColor = PocoMakeColor((*view)->poco, color.r, color.g, color.b); |
| 110 | (*self)->fillBlend = color.a; |
| 111 | } |
| 112 | if ((*self)->strokeOutline) { |
| 113 | PiuColorsBlend((*skin)->data.color.stroke, state, &color); |
| 114 | (*self)->strokeColor = PocoMakeColor((*view)->poco, color.r, color.g, color.b); |
| 115 | (*self)->strokeBlend = color.a; |
| 116 | } |
| 117 | if ((*self)->fillOutline || (*self)->strokeOutline) { |
| 118 | if ((*self)->flags & piuClip) { |
| 119 | PiuRectangleRecord bounds; |
| 120 | PiuRectangleSet(&bounds, 0, 0, (*self)->bounds.width, (*self)->bounds.height); |
| 121 | PiuViewPushClip(view, 0, 0, bounds.width, bounds.height); |
| 122 | PiuViewDrawContent(view, PiuShapeDrawAux, it, 0, 0, bounds.width, bounds.height); |
| 123 | PiuViewPopClip(view); |
| 124 | } |
| 125 | else |
| 126 | PiuViewDrawContent(view, PiuShapeDrawAux, it, 0, 0, (*self)->bounds.width, (*self)->bounds.height); |
| 127 | } |
| 128 | } |
| 129 | } |
| 130 | |
| 131 | void PiuShapeDrawAux(void* it, PiuView* view, PiuCoordinate x, PiuCoordinate y, PiuDimension sw, PiuDimension sh) |
| 132 | { |
nothing calls this directly
no test coverage detected