#include <stdlib.h>
#include "pixman-private.h"
+static void
+bits_image_property_changed (pixman_image_t *image)
+{
+
+}
+
static uint32_t *
create_bits (pixman_format_code_t format,
int width,
pixman_region32_init_rect (&image->common.full_region, 0, 0,
image->bits.width, image->bits.height);
+ image->common.property_changed = bits_image_property_changed;
+
+ bits_image_property_changed (image);
+
_pixman_image_reset_clip_region (image);
+
return image;
}
#include <stdlib.h>
#include "pixman-private.h"
+static void
+conical_gradient_property_changed (pixman_image_t *image)
+{
+
+}
+
PIXMAN_EXPORT pixman_image_t *
-pixman_image_create_conical_gradient (pixman_point_fixed_t *center,
- pixman_fixed_t angle,
+pixman_image_create_conical_gradient (pixman_point_fixed_t *center,
+ pixman_fixed_t angle,
const pixman_gradient_stop_t *stops,
- int n_stops)
+ int n_stops)
{
pixman_image_t *image = _pixman_image_allocate();
conical_gradient_t *conical;
conical->center = *center;
conical->angle = angle;
+ image->common.property_changed = conical_gradient_property_changed;
+
+ conical_gradient_property_changed (image);
+
return image;
}
}
}
+static void
+image_property_changed (pixman_image_t *image)
+{
+ image->common.property_changed (image);
+}
+
/* Ref Counting */
PIXMAN_EXPORT pixman_image_t *
pixman_image_ref (pixman_image_t *image)
pixman_region32_t *region)
{
image_common_t *common = (image_common_t *)image;
+ pixman_bool_t result;
if (region)
{
- return pixman_region32_copy (&common->clip_region, region);
+ result = pixman_region32_copy (&common->clip_region, region);
}
else
{
_pixman_image_reset_clip_region (image);
- return TRUE;
+ result = TRUE;
}
+
+ image_property_changed (image);
+
+ return result;
}
pixman_region16_t *region)
{
image_common_t *common = (image_common_t *)image;
+ pixman_bool_t result;
if (region)
{
- return pixman_region32_copy_from_region16 (&common->clip_region, region);
+ result = pixman_region32_copy_from_region16 (&common->clip_region, region);
}
else
{
_pixman_image_reset_clip_region (image);
- return TRUE;
+ result = TRUE;
}
+
+ image_property_changed (image);
+
+ return result;
}
/* Sets whether the clip region includes a clip region set by the client
pixman_bool_t client_clip)
{
image->common.has_client_clip = client_clip;
+
+ image_property_changed (image);
}
PIXMAN_EXPORT pixman_bool_t
};
image_common_t *common = (image_common_t *)image;
+ pixman_bool_t result;
if (common->transform == transform)
return TRUE;
{
free(common->transform);
common->transform = NULL;
- return TRUE;
+ result = TRUE;
+ goto out;
}
if (common->transform == NULL)
common->transform = malloc (sizeof (pixman_transform_t));
+
if (common->transform == NULL)
- return FALSE;
+ {
+ result = FALSE;
+ goto out;
+ }
memcpy(common->transform, transform, sizeof(pixman_transform_t));
+out:
+ image_property_changed (image);
+
return TRUE;
}
pixman_repeat_t repeat)
{
image->common.repeat = repeat;
+
+ image_property_changed (image);
}
PIXMAN_EXPORT pixman_bool_t
common->filter_params = new_params;
common->n_filter_params = n_params;
+
+ image_property_changed (image);
return TRUE;
}
common->src_clip = &common->clip_region;
else
common->src_clip = &common->full_region;
+
+ image_property_changed (image);
}
/* Unlike all the other property setters, this function does not
bits_image_t *bits = (bits_image_t *)image;
bits->indexed = indexed;
+
+ image_property_changed (image);
}
PIXMAN_EXPORT void
common->alpha_origin.x = x;
common->alpha_origin.y = y;
+
+ image_property_changed (image);
}
PIXMAN_EXPORT void
pixman_bool_t component_alpha)
{
image->common.component_alpha = component_alpha;
+
+ image_property_changed (image);
}
image->common.read_func = read_func;
image->common.write_func = write_func;
+
+ image_property_changed (image);
}
PIXMAN_EXPORT uint32_t *
return image->source.class;
}
+static void
+linear_gradient_property_changed (pixman_image_t *image)
+{
+
+}
+
PIXMAN_EXPORT pixman_image_t *
pixman_image_create_linear_gradient (pixman_point_fixed_t *p1,
pixman_point_fixed_t *p2,
image->type = LINEAR;
image->source.class = SOURCE_IMAGE_CLASS_UNKNOWN;
image->common.classify = linear_gradient_classify;
+ image->common.property_changed = linear_gradient_property_changed;
+
+ linear_gradient_property_changed (image);
return image;
}
SOURCE_IMAGE_CLASS_VERTICAL,
} source_pict_class_t;
-typedef source_pict_class_t (* classify_func_t) (pixman_image_t *image,
- int x,
- int y,
- int width,
- int height);
-
typedef void (*scanStoreProc)(pixman_image_t *, int, int, int, uint32_t *);
typedef void (*scanFetchProc)(pixman_image_t *, int, int, int, uint32_t *,
uint32_t *, uint32_t);
int16_t x, y;
};
+typedef source_pict_class_t (* classify_func_t) (pixman_image_t *image,
+ int x,
+ int y,
+ int width,
+ int height);
+typedef void (* property_changed_func_t) (pixman_image_t *image);
+
struct image_common
{
image_type_t type;
pixman_read_memory_func_t read_func;
pixman_write_memory_func_t write_func;
classify_func_t classify;
+ property_changed_func_t property_changed;
};
struct source_image
#include <stdlib.h>
#include "pixman-private.h"
+static void
+radial_gradient_property_changed (pixman_image_t *image)
+{
+
+}
+
PIXMAN_EXPORT pixman_image_t *
pixman_image_create_radial_gradient (pixman_point_fixed_t *inner,
pixman_point_fixed_t *outer,
+ radial->cdy * radial->cdy
- radial->dr * radial->dr);
+ image->common.property_changed = radial_gradient_property_changed;
+
+ radial_gradient_property_changed (image);
+
return image;
}
return (image->source.class = SOURCE_IMAGE_CLASS_HORIZONTAL);
}
+static void
+solid_fill_property_changed (pixman_image_t *image)
+{
+
+}
+
static uint32_t
color_to_uint32 (const pixman_color_t *color)
{
if (!img)
return NULL;
- img->source.class = SOURCE_IMAGE_CLASS_UNKNOWN;
- img->common.classify = solid_fill_classify;
-
img->type = SOLID;
img->solid.color = color_to_uint32 (color);
+ img->source.class = SOURCE_IMAGE_CLASS_UNKNOWN;
+ img->common.classify = solid_fill_classify;
+ img->common.property_changed = solid_fill_property_changed;
+
+ solid_fill_property_changed (img);
+
return img;
}