switch (src->type)
{ case GSK_GPU_CLIP_ALL_CLIPPED:
dest->type = GSK_GPU_CLIP_ALL_CLIPPED; break;
case GSK_GPU_CLIP_NONE: if (gsk_rect_contains_rect (&tmp, &src->rect.bounds))
{
gsk_gpu_clip_init_copy (dest, src); returnTRUE;
}
G_GNUC_FALLTHROUGH;
case GSK_GPU_CLIP_CONTAINED:
gsk_gpu_clip_init_copy (dest, src); if (gsk_rect_intersection (&dest->rect.bounds, &tmp, &dest->rect.bounds))
dest->type = GSK_GPU_CLIP_RECT; else
dest->type = GSK_GPU_CLIP_ALL_CLIPPED; break;
case GSK_GPU_CLIP_RECT:
gsk_gpu_clip_init_copy (dest, src); if (!gsk_rect_intersection (&dest->rect.bounds, &tmp, &dest->rect.bounds))
dest->type = GSK_GPU_CLIP_ALL_CLIPPED; break;
case GSK_GPU_CLIP_ROUNDED:
res = gsk_rounded_rect_intersect_with_rect (&src->rect, &tmp, &dest->rect); if (!gsk_gpu_clip_init_after_intersection (dest, res)) returnFALSE; break;
if (gsk_rounded_rect_contains_rect (&tmp, &src->rect.bounds))
{
gsk_gpu_clip_init_copy (dest, src); returnTRUE;
} if (!gsk_rect_intersects (&tmp.bounds, &src->rect.bounds))
{
dest->type = GSK_GPU_CLIP_ALL_CLIPPED; returnTRUE;
}
switch (src->type)
{ case GSK_GPU_CLIP_ALL_CLIPPED:
dest->type = GSK_GPU_CLIP_ALL_CLIPPED; break;
case GSK_GPU_CLIP_NONE:
res = gsk_rounded_rect_intersect_with_rect (&tmp, &src->rect.bounds, &dest->rect); if (gsk_gpu_clip_init_after_intersection (dest, res)) break; /* XXX: This may grow the bounds quite substantially */
gsk_gpu_clip_init_rounded_rect (dest, &tmp); break;
case GSK_GPU_CLIP_CONTAINED: case GSK_GPU_CLIP_RECT:
res = gsk_rounded_rect_intersect_with_rect (&tmp, &src->rect.bounds, &dest->rect); if (!gsk_gpu_clip_init_after_intersection (dest, res)) returnFALSE; break;
case GSK_GPU_CLIP_ROUNDED:
res = gsk_rounded_rect_intersection (&src->rect, &tmp, &dest->rect); if (!gsk_gpu_clip_init_after_intersection (dest, res)) returnFALSE; break;
case GSK_GPU_CLIP_ALL_CLIPPED:
gsk_gpu_clip_init_copy (dest, src); returnTRUE;
case GSK_GPU_CLIP_NONE: case GSK_GPU_CLIP_CONTAINED: case GSK_GPU_CLIP_RECT: case GSK_GPU_CLIP_ROUNDED: switch (gsk_transform_get_category (transform))
{ case GSK_TRANSFORM_CATEGORY_IDENTITY:
gsk_gpu_clip_init_copy (dest, src); returnTRUE;
case GSK_TRANSFORM_CATEGORY_2D_TRANSLATE:
{ float dx, dy;
case GSK_TRANSFORM_CATEGORY_UNKNOWN: case GSK_TRANSFORM_CATEGORY_ANY: case GSK_TRANSFORM_CATEGORY_3D: case GSK_TRANSFORM_CATEGORY_2D: default: returnFALSE;
}
}
}
switch (self->type)
{ default:
g_assert_not_reached(); case GSK_GPU_CLIP_ALL_CLIPPED: returnFALSE;
case GSK_GPU_CLIP_NONE: case GSK_GPU_CLIP_CONTAINED: case GSK_GPU_CLIP_RECT: case GSK_GPU_CLIP_ROUNDED: return gsk_rect_intersects (&self->rect.bounds, &r);
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.