Displaying 9 results from an estimated 9 matches for "cairo_scale".
2007 Sep 13
0
test/swfdec-extract.c
...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);
+ cairo_scale (cr, 1.0 / SWFDEC_TWIPS_SCALE_FACTOR, 1.0 / SWFDEC_TWIPS_SCALE_FACTOR);
swfdec_graphic_render (graphic, cr, &trans, &graphic->extents, TRUE);
cairo_show_page (cr);
cairo_destroy (cr);
2007 Mar 02
0
12 commits - libswfdec/Makefile.am libswfdec/swfdec_audio_flv.c libswfdec/swfdec_flv_decoder.c libswfdec/swfdec_js.c libswfdec/swfdec_js.h libswfdec/swfdec_js_video.c libswfdec/swfdec_loader.c libswfdec/swfdec_loader_internal.h
...ce);
}
diff --git a/libswfdec/swfdec_video_movie.c b/libswfdec/swfdec_video_movie.c
index 49e1f4d..cf74a92 100644
--- a/libswfdec/swfdec_video_movie.c
+++ b/libswfdec/swfdec_video_movie.c
@@ -46,7 +46,9 @@ swfdec_video_movie_render (SwfdecMovie *
if (movie->image == NULL)
return;
- cairo_scale (cr, SWFDEC_TWIPS_SCALE_FACTOR, SWFDEC_TWIPS_SCALE_FACTOR);
+ cairo_scale (cr,
+ (mov->original_extents.x1 - mov->original_extents.x0) / movie->image_width,
+ (mov->original_extents.y1 - mov->original_extents.y0) / movie->image_height);
cairo_set_source_surface (cr,...
2007 Feb 17
0
2 commits - doc/swfdec-sections.txt libswfdec/swfdec_color.h libswfdec/swfdec_player.c libswfdec/swfdec_player.h libswfdec/swfdec_player_internal.h libswfdec/swfdec_sprite.c libswfdec/swfdec_sprite.h libswfdec/swfdec_sprite_movie.c
...+ player->bgcolor = SWFDEC_COLOR_COMBINE (0xFF, 0xFF, 0xFF, 0xFF);
player->mouse_visible = TRUE;
player->mouse_cursor = SWFDEC_MOUSE_CURSOR_NORMAL;
@@ -1154,14 +1164,8 @@ swfdec_player_render (SwfdecPlayer *play
cairo_rectangle (cr, x, y, width, height);
cairo_clip (cr);
cairo_scale (cr, 1.0 / SWFDEC_TWIPS_SCALE_FACTOR, 1.0 / SWFDEC_TWIPS_SCALE_FACTOR);
- /* FIXME: find a nicer way to render the background */
- if (player->roots == NULL ||
- !SWFDEC_IS_SPRITE_MOVIE (player->roots->data) ||
- !swfdec_sprite_movie_paint_background (SWFDEC_SPRITE_MOVIE (playe...
2007 Jul 21
0
12 commits - configure.ac doc/Makefile.am doc/swfdec-sections.txt libswfdec/jpeg libswfdec/swfdec_as_array.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_strings.c libswfdec/swfdec_player.c libswfdec/swfdec_player.h libswfdec/swfdec_player_internal.h
...C_TWIPS_SCALE_FACTOR);
- SWFDEC_INFO ("=== %p: START RENDER, area %g %g %g %g ===", player,
- real.x0, real.y0, real.x1, real.y1);
+ height = player->stage_height;
+ /* clip the area */
cairo_save (cr);
cairo_rectangle (cr, x, y, width, height);
cairo_clip (cr);
- cairo_scale (cr, 1.0 / SWFDEC_TWIPS_SCALE_FACTOR, 1.0 / SWFDEC_TWIPS_SCALE_FACTOR);
+ /* compute the rectangle */
+ x -= player->offset_x;
+ y -= player->offset_y;
+ real.x0 = floor (x * SWFDEC_TWIPS_SCALE_FACTOR) / player->scale_x;
+ real.y0 = floor (y * SWFDEC_TWIPS_SCALE_FACTOR) / player->s...
2010 Jul 20
1
Building rattle on Solaris 10u7 X86
...airoDevice.c", line 174: undefined struct/union member: cr
"cairoDevice.c", line 174: warning: implicit function declaration:
gdk_cairo_create
"cairoDevice.c", line 174: improper member use: pixmap
"cairoDevice.c", line 183: warning: implicit function declaration:
cairo_scale
"cairoDevice.c", line 183: undefined struct/union member: cr
"cairoDevice.c", line 185: warning: implicit function declaration:
cairo_save
"cairoDevice.c", line 185: improper member use: cr
"cairoDevice.c", line 217: improper member use: drawing
"cairoDe...
2007 Mar 27
0
15 commits - configure.ac doc/Makefile.am doc/swfdec-docs.sgml doc/swfdec-sections.txt doc/swfdec.types libswfdec-gtk/.gitignore libswfdec-gtk/Makefile.am libswfdec-gtk/swfdec-gtk.h libswfdec-gtk/swfdec_gtk_player.c libswfdec-gtk/swfdec_gtk_player.h
...surface = swfdec_gtk_widget_create_renderer (priv->renderer,
+ event->area.width, event->area.height)) == NULL) {
+ cr = gdk_cairo_create (gtkwidget->window);
+ } else {
+ cr = cairo_create (surface);
+ cairo_translate (cr, -event->area.x, -event->area.y);
+ }
+ cairo_scale (cr, priv->real_scale, priv->real_scale);
+ swfdec_player_render (priv->player, cr,
+ event->area.x / priv->real_scale, event->area.y / priv->real_scale,
+ event->area.width / priv->real_scale, event->area.height / priv->real_scale);
+ cairo_show_page (...
2007 Dec 13
0
libswfdec-gtk/swfdec_gtk_player.c libswfdec/swfdec_as_date.c libswfdec/swfdec_audio.c libswfdec/swfdec_audio_event.c libswfdec/swfdec_button_movie.c libswfdec/swfdec_interval.c libswfdec/swfdec_key_as.c libswfdec/swfdec_mouse_as.c libswfdec/swfdec_movie.c
...= ceil ((y + height) * SWFDEC_TWIPS_SCALE_FACTOR) / priv->scale_y;
SWFDEC_INFO ("=== %p: START RENDER, area %g %g %g %g ===", player,
real.x0, real.y0, real.x1, real.y1);
/* convert the cairo matrix */
- cairo_translate (cr, player->offset_x, player->offset_y);
- cairo_scale (cr, player->scale_x / SWFDEC_TWIPS_SCALE_FACTOR, player->scale_y / SWFDEC_TWIPS_SCALE_FACTOR);
- swfdec_color_set_source (cr, player->bgcolor);
+ cairo_translate (cr, priv->offset_x, priv->offset_y);
+ cairo_scale (cr, priv->scale_x / SWFDEC_TWIPS_SCALE_FACTOR, priv->scale_...
2007 Oct 18
0
18 commits - doc/swfdec-sections.txt libswfdec/Makefile.am libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_strings.c libswfdec/swfdec_button_movie.c libswfdec/swfdec_event.c libswfdec/swfdec_event.h libswfdec/swfdec_flash_security.c
...E;
+}
+
+static void
swfdec_video_movie_render (SwfdecMovie *mov, cairo_t *cr,
const SwfdecColorTransform *trans, const SwfdecRect *inval)
{
SwfdecVideoMovie *movie = SWFDEC_VIDEO_MOVIE (mov);
+ swfdec_video_movie_update_image (movie);
if (movie->image == NULL)
return;
cairo_scale (cr,
- (mov->original_extents.x1 - mov->original_extents.x0) / movie->image_width,
- (mov->original_extents.y1 - mov->original_extents.y0) / movie->image_height);
+ (mov->original_extents.x1 - mov->original_extents.x0)
+ / cairo_image_surface_get_width (...
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
...t;extents.y0 / SWFDEC_TWIPS_SCALE_FACTOR);
- surface = surface_create_for_filename (filename, width, height);
- 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.0 / SWFDEC_TWIPS_SCALE_FACTOR, 1.0 / SWFDEC_TWIPS_SCALE_FACTOR);
- swfdec_graphic_render (graphic, cr, &trans, &graphic->extents);
- cairo_show_page (cr);
- cairo_destroy (cr);
- return surface_destroy_for_type (surface, filename);
-}
-
-static gboolean
-export_image (SwfdecIm...