MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / PiuViewPushClip

Function PiuViewPushClip

modules/piu/Pebble/piuView.c:367–383  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

365}
366
367void 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
385void PiuViewPushColor(PiuView* self, PiuColor color)
386{

Callers 1

PiuSVGImageDrawFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected