if (image->common.alpha_map)
{
- x -= image->common.alpha_origin.x;
- y -= image->common.alpha_origin.y;
+ x -= image->common.alpha_origin_x;
+ y -= image->common.alpha_origin_y;
bits_image_store_scanline_32 (image->common.alpha_map, x, y, width, buffer);
}
if (image->common.alpha_map)
{
- x -= image->common.alpha_origin.x;
- y -= image->common.alpha_origin.y;
+ x -= image->common.alpha_origin_x;
+ y -= image->common.alpha_origin_y;
bits_image_store_scanline_64 (image->common.alpha_map, x, y, width, buffer);
}
if (x != 0xffffffff)
{
- x -= image->common.alpha_origin.x;
+ x -= image->common.alpha_origin_x;
if (x < 0 || x >= image->common.alpha_map->width)
x = 0xffffffff;
if (y != 0xffffffff)
{
- y -= image->common.alpha_origin.y;
+ y -= image->common.alpha_origin_y;
if (y < 0 || y >= image->common.alpha_map->height)
y = 0xffffffff;
common->alpha_map = NULL;
}
- common->alpha_origin.x = x;
- common->alpha_origin.y = y;
+ common->alpha_origin_x = x;
+ common->alpha_origin_y = y;
image_property_changed (image);
}
#endif
-
+/*
+ * Images
+ */
typedef struct image_common image_common_t;
typedef struct source_image source_image_t;
typedef struct solid_fill solid_fill_t;
typedef struct radial_gradient radial_gradient_t;
typedef struct bits_image bits_image_t;
typedef struct circle circle_t;
-typedef struct point point_t;
/* FIXME - the types and structures below should be give proper names
*/
void
_pixman_image_reset_clip_region (pixman_image_t *image);
-struct point
-{
- int16_t x, y;
-};
-
typedef source_pict_class_t (* classify_func_t) (pixman_image_t *image,
int x,
int y,
pixman_fixed_t *filter_params;
int n_filter_params;
bits_image_t *alpha_map;
- point_t alpha_origin;
+ int alpha_origin_x;
+ int alpha_origin_y;
pixman_bool_t component_alpha;
pixman_read_memory_func_t read_func;
pixman_write_memory_func_t write_func;
pixman_image_get_solid (pixman_image_t *image,
pixman_format_code_t format);
-/* Region Helpers */
-pixman_bool_t pixman_region32_copy_from_region16 (pixman_region32_t *dst,
- pixman_region16_t *src);
-pixman_bool_t pixman_region16_copy_from_region32 (pixman_region16_t *dst,
- pixman_region32_t *src);
-
-
/*
* Implementations
*/
} pixman_fast_path_t;
/* Memory allocation helpers */
-void *pixman_malloc_ab (unsigned int n, unsigned int b);
-void *pixman_malloc_abc (unsigned int a, unsigned int b, unsigned int c);
-pixman_bool_t pixman_multiply_overflows_int (unsigned int a, unsigned int b);
-pixman_bool_t pixman_addition_overflows_int (unsigned int a, unsigned int b);
+void *
+pixman_malloc_ab (unsigned int n, unsigned int b);
+
+void *
+pixman_malloc_abc (unsigned int a, unsigned int b, unsigned int c);
+
+pixman_bool_t
+pixman_multiply_overflows_int (unsigned int a, unsigned int b);
+
+pixman_bool_t
+pixman_addition_overflows_int (unsigned int a, unsigned int b);
/* Compositing utilities */
pixman_bool_t
uint16_t height,
pixman_composite_func_t compositeRect);
+/* Region Helpers */
+pixman_bool_t
+pixman_region32_copy_from_region16 (pixman_region32_t *dst,
+ pixman_region16_t *src);
+
+pixman_bool_t
+pixman_region16_copy_from_region32 (pixman_region16_t *dst,
+ pixman_region32_t *src);
+
+
/*
* Various useful macros
*/
if (pDst->common.alpha_map && pDst->common.alpha_map->common.have_clip_region)
{
if (!miClipPictureReg (pRegion, &pDst->common.alpha_map->common.clip_region,
- -pDst->common.alpha_origin.x,
- -pDst->common.alpha_origin.y))
+ -pDst->common.alpha_origin_x,
+ -pDst->common.alpha_origin_y))
{
pixman_region32_fini (pRegion);
return FALSE;
if (pSrc->common.alpha_map && pSrc->common.alpha_map->common.have_clip_region)
{
if (!miClipPictureSrc (pRegion, (pixman_image_t *)pSrc->common.alpha_map,
- xDst - (xSrc - pSrc->common.alpha_origin.x),
- yDst - (ySrc - pSrc->common.alpha_origin.y)))
+ xDst - (xSrc - pSrc->common.alpha_origin_x),
+ yDst - (ySrc - pSrc->common.alpha_origin_y)))
{
pixman_region32_fini (pRegion);
return FALSE;
if (pMask->common.alpha_map && pMask->common.alpha_map->common.have_clip_region)
{
if (!miClipPictureSrc (pRegion, (pixman_image_t *)pMask->common.alpha_map,
- xDst - (xMask - pMask->common.alpha_origin.x),
- yDst - (yMask - pMask->common.alpha_origin.y)))
+ xDst - (xMask - pMask->common.alpha_origin_x),
+ yDst - (yMask - pMask->common.alpha_origin_y)))
{
pixman_region32_fini (pRegion);
return FALSE;