search for: cairo_surface_get_type

Displaying 8 results from an estimated 8 matches for "cairo_surface_get_type".

2007 Jan 26
0
libswfdec/swfdec_image.c libswfdec/swfdec_image.h libswfdec/swfdec_pattern.c
...ace (SwfdecImage *i return image->surface; } +cairo_surface_t * +swfdec_image_get_surface_for_target (SwfdecImage *image, cairo_surface_t *target) +{ + cairo_surface_t *current, *similar; + cairo_t *copy; + cairo_content_t content; + + current = swfdec_image_get_surface (image); + if (cairo_surface_get_type (current) == cairo_surface_get_type (target)) + return current; + + /* FIXME: we might want to create multiple surfaces here if there's multiple + * live rendering sources. Right now, this is the quick fix, that transforms + * the cache to the most recent used type */ + if (cairo_surfa...
2007 Jan 29
0
Branch 'interpreter' - 18 commits - libswfdec/swfdec_image.c libswfdec/swfdec_image.h libswfdec/swfdec_js.c libswfdec/swfdec_js_color.c libswfdec/swfdec_js_sound.c libswfdec/swfdec_pattern.c libswfdec/swfdec_scriptable.c libswfdec/swfdec_script.c
...e_data); } int @@ -611,11 +619,7 @@ swfdec_image_get_surface_for_target (Swf /* FIXME: we might want to create multiple surfaces here if there's multiple * live rendering sources. Right now, this is the quick fix, that transforms * the cache to the most recent used type */ - if (cairo_surface_get_type (current) == CAIRO_SURFACE_TYPE_IMAGE && - cairo_image_surface_get_format (current) == CAIRO_FORMAT_RGB24) - content = CAIRO_CONTENT_COLOR; - else - content = CAIRO_CONTENT_COLOR_ALPHA; + content = swfdec_image_has_alpha (image) ? CAIRO_CONTENT_COLOR_ALPHA : CAIRO_CONTENT_COLOR...
2008 Jan 08
0
4 commits - test/.gitignore test/image test/Makefile.am test/swfdec_test_function.c test/swfdec_test_image.c test/swfdec_test_image.h test/swfdec_test_initialize.as test/swfdec_test_initialize.h test/swfdec_test_test.c test/trace
...ilename); - image = cairo_image_surface_create_from_png (real); - if (cairo_surface_status (image)) { - g_print (" ERROR: Could not load %s: %s\n", real, - cairo_status_to_string (cairo_surface_status (image))); - g_free (real); - goto dump; - } - g_free (real); - g_assert (cairo_surface_get_type (surface) == CAIRO_SURFACE_TYPE_IMAGE); - w = cairo_image_surface_get_width (surface); - h = cairo_image_surface_get_height (surface); - if (w != cairo_image_surface_get_width (image) || - h != cairo_image_surface_get_height (image)) { - g_print (" ERROR: sizes don't match. Sho...
2007 Feb 06
0
21 commits - configure.ac libswfdec/swfdec_audio_event.c libswfdec/swfdec_bits.c libswfdec/swfdec_button_movie.c libswfdec/swfdec_color.c libswfdec/swfdec_color.h libswfdec/swfdec_compiler.c libswfdec/swfdec_edittext.c libswfdec/swfdec_image.c
...ilename); + image = cairo_image_surface_create_from_png (real); + if (cairo_surface_status (image)) { + g_print (" ERROR: Could not load %s: %s\n", real, + cairo_status_to_string (cairo_surface_status (image))); + g_free (real); + goto dump; + } + g_free (real); + g_assert (cairo_surface_get_type (surface) == CAIRO_SURFACE_TYPE_IMAGE); + w = cairo_image_surface_get_width (surface); + h = cairo_image_surface_get_height (surface); + if (w != cairo_image_surface_get_width (image) || + h != cairo_image_surface_get_height (image)) { + g_print (" ERROR: sizes don't match. Sho...
2007 Feb 06
0
Branch 'interpreter' - 8 commits - libswfdec/swfdec_bits.c libswfdec/swfdec_color.c libswfdec/swfdec_color.h libswfdec/swfdec_edittext.c libswfdec/swfdec_image.c libswfdec/swfdec_image.h libswfdec/swfdec_pattern.c libswfdec/swfdec_sprite.c test/dump.c
...face_for_target (SwfdecImage *image, cairo_surface_t *target) +swfdec_image_get_surface_transformed (SwfdecImage *image, const SwfdecColorTransform *trans) { - cairo_surface_t *current, *similar; - cairo_t *copy; - cairo_content_t content; - - current = swfdec_image_get_surface (image); - if (cairo_surface_get_type (current) == cairo_surface_get_type (target)) - return current; - - /* FIXME: we might want to create multiple surfaces here if there's multiple - * live rendering sources. Right now, this is the quick fix, that transforms - * the cache to the most recent used type */ - if (cairo_surfa...
2007 Feb 06
0
Branch 'interpreter' - 15 commits - configure.ac libswfdec/swfdec_audio_event.c libswfdec/swfdec_button_movie.c libswfdec/swfdec_color.c libswfdec/swfdec_color.h libswfdec/swfdec_compiler.c libswfdec/swfdec_image.c libswfdec/swfdec_sprite_movie.c
...ilename); + image = cairo_image_surface_create_from_png (real); + if (cairo_surface_status (image)) { + g_print (" ERROR: Could not load %s: %s\n", real, + cairo_status_to_string (cairo_surface_status (image))); + g_free (real); + goto dump; + } + g_free (real); + g_assert (cairo_surface_get_type (surface) == CAIRO_SURFACE_TYPE_IMAGE); + w = cairo_image_surface_get_width (surface); + h = cairo_image_surface_get_height (surface); + if (w != cairo_image_surface_get_width (image) || + h != cairo_image_surface_get_height (image)) { + g_print (" ERROR: sizes don't match. Sho...
2008 Jan 07
0
12 commits - configure.ac doc/swfdec.types Makefile.am test/crashfinder.c test/dump.c test/Makefile.am test/swfdec-extract.c test/swfdec_out.c test/swfdec_out.h test/swfedit.c test/swfedit_file.c test/swfedit_file.h test/swfedit_list.c test/swfedit_list.h
...{ - surface = cairo_svg_surface_create (filename, width, height); -#endif - } else { - surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, width, height); - } - return surface; -} - -static gboolean -surface_destroy_for_type (cairo_surface_t *surface, const char *filename) -{ - if (cairo_surface_get_type (surface) == CAIRO_SURFACE_TYPE_IMAGE) { - cairo_status_t status = cairo_surface_write_to_png (surface, filename); - if (status != CAIRO_STATUS_SUCCESS) { - g_printerr ("Error saving file: %s\n", cairo_status_to_string (status)); - cairo_surface_destroy (surface); - r...
2007 Feb 06
0
109 commits - configure.ac libswfdec/js libswfdec/Makefile.am libswfdec/swfdec_bits.c libswfdec/swfdec_bits.h libswfdec/swfdec_buffer.c libswfdec/swfdec_button_movie.c libswfdec/swfdec_codec_screen.c libswfdec/swfdec_color.c libswfdec/swfdec_color.h
...e_data); } int @@ -611,11 +619,7 @@ swfdec_image_get_surface_for_target (Swf /* FIXME: we might want to create multiple surfaces here if there's multiple * live rendering sources. Right now, this is the quick fix, that transforms * the cache to the most recent used type */ - if (cairo_surface_get_type (current) == CAIRO_SURFACE_TYPE_IMAGE && - cairo_image_surface_get_format (current) == CAIRO_FORMAT_RGB24) - content = CAIRO_CONTENT_COLOR; - else - content = CAIRO_CONTENT_COLOR_ALPHA; + content = swfdec_image_has_alpha (image) ? CAIRO_CONTENT_COLOR_ALPHA : CAIRO_CONTENT_COLOR...