Lines Matching defs:surface

134  * while a Cairo image surface will contain:
144 * This is implemented by creating a GdkPixbuf and a Cairo image surface
149 /** Create a pixbuf from a Cairo surface.
150 * The constructor takes ownership of the passed surface,
349 * Converts the pixbuf to Cairo pixel format and returns an image surface
352 * The returned surface is owned by the GdkPixbuf and should not be freed.
388 /** Retrieves the original compressed data for the surface, if any.
716 get_cairo_surface_ci(cairo_surface_t *surface) {
717 void* data = cairo_surface_get_user_data( surface, &ink_color_interpolation_key );
725 /** Set the color_interpolation_value for a Cairo surface.
726 * Transform the surface between sRGB and linearRGB if necessary. */
728 set_cairo_surface_ci(cairo_surface_t *surface, SPColorInterpolation ci) {
730 if( cairo_surface_get_content( surface ) != CAIRO_CONTENT_ALPHA ) {
732 SPColorInterpolation ci_in = get_cairo_surface_ci( surface );
736 ink_cairo_surface_srgb_to_linear( surface );
740 ink_cairo_surface_linear_to_srgb( surface );
743 cairo_surface_set_user_data(surface, &ink_color_interpolation_key, GINT_TO_POINTER (ci), NULL);
801 * Create an exact copy of a surface.
802 * Creates a surface that has the same type, content type, dimensions and contents
803 * as the specified surface.
830 * Create a surface that differs only in pixel content.
831 * Creates a surface that has the same type, content type and dimensions
832 * as the specified surface. Pixel contents are not copied.
851 * Extract the alpha channel into a new surface.
852 * Creates a surface with a content type of CAIRO_CONTENT_ALPHA that contains
912 ink_cairo_surface_get_width(cairo_surface_t *surface)
914 // For now only image surface is handled.
916 assert(cairo_surface_get_type(surface) == CAIRO_SURFACE_TYPE_IMAGE);
917 return cairo_image_surface_get_width(surface);
920 ink_cairo_surface_get_height(cairo_surface_t *surface)
922 assert(cairo_surface_get_type(surface) == CAIRO_SURFACE_TYPE_IMAGE);
923 return cairo_image_surface_get_height(surface);
926 static int ink_cairo_surface_average_color_internal(cairo_surface_t *surface, double &rf, double &gf, double &bf, double &af)
929 cairo_surface_flush(surface);
930 int width = cairo_image_surface_get_width(surface);
931 int height = cairo_image_surface_get_height(surface);
932 int stride = cairo_image_surface_get_stride(surface);
933 unsigned char *data = cairo_image_surface_get_data(surface);
949 guint32 ink_cairo_surface_average_color(cairo_surface_t *surface)
952 ink_cairo_surface_average_color_premul(surface, rf,gf,bf,af);
961 void ink_cairo_surface_average_color(cairo_surface_t *surface, double &r, double &g, double &b, double &a)
963 int count = ink_cairo_surface_average_color_internal(surface, r,g,b,a);
976 void ink_cairo_surface_average_color_premul(cairo_surface_t *surface, double &r, double &g, double &b, double &a)
978 int count = ink_cairo_surface_average_color_internal(surface, r,g,b,a);
1043 int ink_cairo_surface_srgb_to_linear(cairo_surface_t *surface)
1045 cairo_surface_flush(surface);
1046 int width = cairo_image_surface_get_width(surface);
1047 int height = cairo_image_surface_get_height(surface);
1048 // int stride = cairo_image_surface_get_stride(surface);
1049 // unsigned char *data = cairo_image_surface_get_data(surface);
1051 ink_cairo_surface_filter( surface, surface, SurfaceSrgbToLinear() );
1086 int ink_cairo_surface_linear_to_srgb(cairo_surface_t *surface)
1088 cairo_surface_flush(surface);
1089 int width = cairo_image_surface_get_width(surface);
1090 int height = cairo_image_surface_get_height(surface);
1091 // int stride = cairo_image_surface_get_stride(surface);
1092 // unsigned char *data = cairo_image_surface_get_data(surface);
1094 ink_cairo_surface_filter( surface, surface, SurfaceLinearToSrgb() );
1140 * Converts the Cairo surface to a GdkPixbuf pixel format,
1146 * The returned GdkPixbuf takes ownership of the passed surface reference,
1169 * a Cairo surface.
1173 cairo_surface_t *surface = static_cast<cairo_surface_t*>(data);
1174 cairo_surface_destroy(surface);