Displaying 7 results from an estimated 7 matches for "export_graphic".
2007 Sep 13
0
test/swfdec-extract.c
...gnome.org>
Date: Thu Sep 13 21:38:51 2007 +0200
scale by a double, not an int
This caused all extraction to fail.
diff --git a/test/swfdec-extract.c b/test/swfdec-extract.c
index 73e49fa..4c79a7f 100644
--- a/test/swfdec-extract.c
+++ b/test/swfdec-extract.c
@@ -201,7 +201,7 @@ export_graphic (SwfdecGraphic *graphic,
cr = cairo_create (surface);
cairo_translate (cr, - floor (graphic->extents.x0 / SWFDEC_TWIPS_SCALE_FACTOR),
- floor (graphic->extents.y0 / SWFDEC_TWIPS_SCALE_FACTOR));
- cairo_scale (cr, 1 / SWFDEC_TWIPS_SCALE_FACTOR, 1 / SWFDEC_TWIPS_SCALE_FACTOR);
+ c...
2007 Feb 19
0
2 commits - libswfdec/swfdec_script.c test/swfdec-extract.c
...sprite->n_frames) {
- g_printerr ("No sound in sprite %u", SWFDEC_CHARACTER (sprite)->id);
+ g_printerr ("No sound in sprite %u\n", SWFDEC_CHARACTER (sprite)->id);
return FALSE;
}
audio = swfdec_audio_stream_new (NULL, sprite, i);
@@ -185,11 +185,11 @@ export_graphic (SwfdecGraphic *graphic,
const SwfdecColorTransform trans = { 256, 0, 256, 0, 256, 0, 256, 0 };
if (SWFDEC_IS_SPRITE (graphic)) {
- g_printerr ("Sprites can not be exported");
+ g_printerr ("Sprites can not be exported\n");
return FALSE;
}
if (SWFDEC_IS...
2007 Feb 02
0
Branch 'interpreter' - 6 commits - libswfdec/swfdec_bits.c libswfdec/swfdec_compiler.c libswfdec/swfdec_sprite.c test/swfdec-extract.c
...r: Benjamin Otte <otte@gnome.org>
Date: Fri Feb 2 21:30:02 2007 +0100
missing \n
diff --git a/test/swfdec-extract.c b/test/swfdec-extract.c
index bea068e..ac79124 100644
--- a/test/swfdec-extract.c
+++ b/test/swfdec-extract.c
@@ -259,7 +259,7 @@ main (int argc, char *argv[])
if (!export_graphic (SWFDEC_GRAPHIC (character), argv[3]))
ret = 1;
} else {
- g_printerr ("id %ld does not specify an exportable object", id);
+ g_printerr ("id %ld does not specify an exportable object\n", id);
ret = 1;
}
diff-tree 828ab7af700ce3d9b4e44b90c4f7d804b5d243c...
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
..._IS_IMAGE (c)) {
++ dump_image (SWFDEC_IMAGE (c));
++ }
if (SWFDEC_IS_SPRITE (c)) {
dump_sprite (SWFDEC_SPRITE (c));
}
diff --cc test/swfdec-extract.c
index ac79124,b4a2951..47e8234
@@@ -258,8 -269,11 +269,11 @@@
} else if (SWFDEC_IS_GRAPHIC (character)) {
if (!export_graphic (SWFDEC_GRAPHIC (character), argv[3]))
ret = 1;
+ } else if (SWFDEC_IS_IMAGE (character)) {
+ if (!export_image (SWFDEC_IMAGE (character), argv[3]))
+ ret = 1;
} else {
- g_printerr ("id %ld does not specify an exportable object", id);
+ g_printerr ("i...
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
...t;
#include <libswfdec/swfdec_button.h>
#include <libswfdec/swfdec_graphic.h>
+#include <libswfdec/swfdec_image.h>
#include <libswfdec/swfdec_player_internal.h>
#include <libswfdec/swfdec_root_movie.h>
#include <libswfdec/swfdec_sound.h>
@@ -206,6 +207,16 @@ export_graphic (SwfdecGraphic *graphic,
return surface_destroy_for_type (surface, filename);
}
+static gboolean
+export_image (SwfdecImage *image, const char *filename)
+{
+ cairo_surface_t *surface = swfdec_image_create_surface (image);
+
+ if (surface == NULL)
+ return FALSE;
+ return surface_destr...
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
...urface, filename);
- if (status != CAIRO_STATUS_SUCCESS) {
- g_printerr ("Error saving file: %s\n", cairo_status_to_string (status));
- cairo_surface_destroy (surface);
- return FALSE;
- }
- }
- cairo_surface_destroy (surface);
- return TRUE;
-}
-
-static gboolean
-export_graphic (SwfdecGraphic *graphic, const char *filename)
-{
- cairo_surface_t *surface;
- cairo_t *cr;
- guint width, height;
- const SwfdecColorTransform trans = { 256, 0, 256, 0, 256, 0, 256, 0 };
-
- if (SWFDEC_IS_SPRITE (graphic)) {
- g_printerr ("Sprites can not be exported\n");
- 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
..._IS_IMAGE (c)) {
++ dump_image (SWFDEC_IMAGE (c));
++ }
if (SWFDEC_IS_SPRITE (c)) {
dump_sprite (SWFDEC_SPRITE (c));
}
diff --cc test/swfdec-extract.c
index ac79124,b4a2951..47e8234
@@@ -258,8 -269,11 +269,11 @@@
} else if (SWFDEC_IS_GRAPHIC (character)) {
if (!export_graphic (SWFDEC_GRAPHIC (character), argv[3]))
ret = 1;
+ } else if (SWFDEC_IS_IMAGE (character)) {
+ if (!export_image (SWFDEC_IMAGE (character), argv[3]))
+ ret = 1;
} else {
- g_printerr ("id %ld does not specify an exportable object", id);
+ g_printerr ("i...