region: add image clip and composite functions for fractional regions

Signed-off-by: Loukas Agorgianitis <loukas@agorgianitis.com>
This commit is contained in:
Loukas Agorgianitis 2025-04-24 20:49:39 +03:00
parent d1eb2680de
commit 9879f6cfc4
No known key found for this signature in database
GPG Key ID: DDC6FA7D5BB332E6
3 changed files with 60 additions and 0 deletions

View File

@ -613,6 +613,30 @@ pixman_image_set_clip_region (pixman_image_t * image,
return result;
}
PIXMAN_EXPORT pixman_bool_t
pixman_image_set_clip_region64f (pixman_image_t * image,
const pixman_region64f_t *region)
{
image_common_t *common = (image_common_t *)image;
pixman_bool_t result;
if (region)
{
if ((result = pixman_region32_copy_from_region64f (&common->clip_region, region)))
image->common.have_clip_region = TRUE;
}
else
{
_pixman_image_reset_clip_region (image);
result = TRUE;
}
image_property_changed (image);
return result;
}
PIXMAN_EXPORT void
pixman_image_set_has_client_clip (pixman_image_t *image,
pixman_bool_t client_clip)

View File

@ -739,6 +739,24 @@ pixman_image_composite (pixman_op_t op,
mask_x, mask_y, dest_x, dest_y, width, height);
}
PIXMAN_EXPORT void
pixman_image_composite64f (pixman_op_t op,
pixman_image_t * src,
pixman_image_t * mask,
pixman_image_t * dest,
double src_x,
double src_y,
double mask_x,
double mask_y,
double dest_x,
double dest_y,
double width,
double height)
{
pixman_image_composite32 (op, src, mask, dest, src_x, src_y,
mask_x, mask_y, dest_x, dest_y, width, height);
}
PIXMAN_EXPORT pixman_bool_t
pixman_blt (uint32_t *src_bits,
uint32_t *dst_bits,

View File

@ -1192,6 +1192,10 @@ PIXMAN_API
pixman_bool_t pixman_image_set_clip_region32 (pixman_image_t *image,
const pixman_region32_t *region);
PIXMAN_API
pixman_bool_t pixman_image_set_clip_region64f (pixman_image_t *image,
const pixman_region64f_t *region);
PIXMAN_API
void pixman_image_set_has_client_clip (pixman_image_t *image,
pixman_bool_t clien_clip);
@ -1348,6 +1352,20 @@ void pixman_image_composite32 (pixman_op_t op,
int32_t width,
int32_t height);
PIXMAN_API
void pixman_image_composite64f (pixman_op_t op,
pixman_image_t *src,
pixman_image_t *mask,
pixman_image_t *dest,
double src_x,
double src_y,
double mask_x,
double mask_y,
double dest_x,
double dest_y,
double width,
double height);
/* Executive Summary: This function is a no-op that only exists
* for historical reasons.
*