Displaying 5 results from an estimated 5 matches for "scale_x".
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
...ec_player.c b/libswfdec/swfdec_player.c
index 23083d0..f73bd94 100644
--- a/libswfdec/swfdec_player.c
+++ b/libswfdec/swfdec_player.c
@@ -438,6 +438,75 @@ swfdec_player_get_property (GObject *obj
}
static void
+swfdec_player_update_scale (SwfdecPlayer *player)
+{
+ int width, height;
+ double scale_x, scale_y;
+
+ width = player->stage_width >= 0 ? player->stage_width : (int) player->width;
+ height = player->stage_height >= 0 ? player->stage_height : (int) player->height;
+ if (height == 0 || width == 0) {
+ player->scale_x = 1.0;
+ player->scale_y = 1.0;...
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
...G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);
@@ -721,69 +740,70 @@ swfdec_player_get_property (GObject *object, guint param_id, GValue *value,
void
swfdec_player_update_scale (SwfdecPlayer *player)
{
+ SwfdecPlayerPrivate *priv = player->priv;
int width, height;
double scale_x, scale_y;
- player->stage.width = player->stage_width >= 0 ? player->stage_width : (int) player->width;
- player->stage.height = player->stage_height >= 0 ? player->stage_height : (int) player->height;
- if (player->stage.height == 0 || player->stage.width =...
2007 Aug 22
0
8 commits - libswfdec/swfdec_movie.c libswfdec/swfdec_movie.h libswfdec/swfdec_player.c libswfdec/swfdec_player_internal.h libswfdec/swfdec_sprite_movie_as.c vivified/core
...void
swfdec_movie_local_to_global (SwfdecMovie *movie, double *x, double *y)
{
- SwfdecPlayer *player = SWFDEC_PLAYER (SWFDEC_AS_OBJECT (movie)->context);
-
do {
cairo_matrix_transform_point (&movie->matrix, x, y);
} while ((movie = movie->parent));
-
- *x /= player->scale_x;
- *y /= player->scale_y;
- *x += SWFDEC_TWIPS_TO_DOUBLE (player->offset_x);
- *y += SWFDEC_TWIPS_TO_DOUBLE (player->offset_y);
}
void
@@ -507,12 +500,6 @@ swfdec_movie_global_to_local (SwfdecMovi
{
if (movie->parent) {
swfdec_movie_global_to_local (movie->parent, x,...
2006 Oct 17
0
[680] trunk/wxruby2/samples/printing/printing.rb: Cleaned up to use the Ruby naming convention, added #! line, now uses Wx default ID''s in standard menu items.
...lt;/span><span class="cx"> w, h = dc.get_size
</span><span class="cx">
</span><span class="cx"> # Calculate a suitable scaling factor
</span><del>- scaleX=(w/maxX)
- scaleY=(h/maxY)
</del><ins>+ scale_x=(w/max_x)
+ scale_y=(h/max_y)
</ins><span class="cx">
</span><span class="cx"> # Use x or y scaling factor, whichever fits on the DC
</span><span class="cx"> #actualScale = Wx::min(scaleX,scaleY)
</span><del>-...
2007 May 22
0
[1030] trunk/wxruby2/samples/printing/printing.rb: Fix so will print again.
...h = dc.get_size
</del><ins>+ size = dc.get_size
+ w = size.get_width
+ h = size.get_height
</ins><span class="cx">
</span><span class="cx"> # Calculate a suitable scaling factor
</span><span class="cx"> scale_x=(w/max_x)
</span><span class="lines">@@ -306,7 +308,9 @@
</span><span class="cx"> # Now we have to check in case our real page size is reduced
</span><span class="cx"> # (e.g. because we''re drawing to a print preview...