| 365 | } |
| 366 | |
| 367 | void PiuViewPushClip(PiuView* self, PiuCoordinate x, PiuCoordinate y, PiuDimension w, PiuDimension h) |
| 368 | { |
| 369 | GContext *ctx = (*self)->ctx; |
| 370 | PiuRectangle clip; |
| 371 | if ((MODDEF_PIU_PEBBLE_CLIPS - 1) == (*self)->clipDepth) { |
| 372 | fxReport((*self)->the, "Piu clip stack overflow"); |
| 373 | return; |
| 374 | } |
| 375 | clip = &((*self)->clips[((*self)->clipDepth)++]); |
| 376 | clip->x = ctx->draw_state.clip_box.origin.x; |
| 377 | clip->y = ctx->draw_state.clip_box.origin.y; |
| 378 | clip->width = ctx->draw_state.clip_box.size.w; |
| 379 | clip->height = ctx->draw_state.clip_box.size.h; |
| 380 | x += ctx->draw_state.drawing_box.origin.x; |
| 381 | y += ctx->draw_state.drawing_box.origin.y; |
| 382 | grect_clip(&ctx->draw_state.clip_box, &GRect(x, y, w, h)); |
| 383 | } |
| 384 | |
| 385 | void PiuViewPushColor(PiuView* self, PiuColor color) |
| 386 | { |