Displaying 20 results from an estimated 60 matches for "swfdecrect".
2007 Oct 17
0
libswfdec/swfdec_text_field.c libswfdec/swfdec_text_field.h libswfdec/swfdec_text_field_movie.c
...t;swfdec_text_field.h"
@@ -91,293 +90,6 @@ swfdec_text_field_init (SwfdecTextField * text)
text->scroll = 1;
}
-SwfdecLayout *
-swfdec_text_field_generate_layouts (SwfdecTextField *text, cairo_t *cr,
- const SwfdecParagraph *paragraphs, const SwfdecColorTransform *trans,
- const SwfdecRect *inval, int *num)
-{
- GArray *layouts;
- guint i;
-
- g_return_val_if_fail (SWFDEC_IS_TEXT_FIELD (text), NULL);
- g_return_val_if_fail (cr != NULL, NULL);
- g_return_val_if_fail (paragraphs != NULL, NULL);
-
- layouts = g_array_new (TRUE, TRUE, sizeof (SwfdecLayout));
-
- for (i = 0; paragr...
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
...dex 0722f4c..2a39cb0 100644
--- a/libswfdec/swfdec_sprite_movie_as.c
+++ b/libswfdec/swfdec_sprite_movie_as.c
@@ -160,9 +160,8 @@ swfdec_sprite_movie_hitTest (SwfdecAsCon
SwfdecMovie *movie = SWFDEC_MOVIE (obj);
if (argc == 1) {
- SwfdecMovie *other, *tmp;
+ SwfdecMovie *other;
SwfdecRect movie_rect, other_rect;
- guint movie_depth, other_depth;
if (!SWFDEC_AS_VALUE_IS_OBJECT (&argv[0]) ||
!SWFDEC_IS_MOVIE (other = (SwfdecMovie *) SWFDEC_AS_VALUE_GET_OBJECT (&argv[0]))) {
SWFDEC_ERROR ("FIXME: what happens now?");
@@ -170,70 +169,29 @@ swfde...
2007 Dec 10
0
6 commits - libswfdec/Makefile.am libswfdec/swfdec_as_interpret.c libswfdec/swfdec_color_as.c libswfdec/swfdec_graphic_movie.c libswfdec/swfdec_image_decoder.c libswfdec/swfdec_morph_movie.c libswfdec/swfdec_movie_as_drawing.c
...hic_movie, SWFDEC_TYPE_MOVIE)
@@ -49,6 +50,15 @@ swfdec_graphic_movie_render (SwfdecMovie *movie, cairo_t *cr,
swfdec_graphic_render (movie->graphic, cr, trans, inval);
}
+static void
+swfdec_graphic_movie_invalidate (SwfdecMovie *movie, const cairo_matrix_t *matrix, gboolean last)
+{
+ SwfdecRect rect;
+
+ swfdec_rect_transform (&rect, &movie->graphic->extents, matrix);
+ swfdec_player_invalidate (SWFDEC_PLAYER (SWFDEC_AS_OBJECT (movie)->context), &rect);
+}
+
static SwfdecMovie *
swfdec_graphic_movie_contains (SwfdecMovie *movie, double x, double y,
gboolean...
2007 Oct 15
0
6 commits - libswfdec/swfdec_as_strings.c libswfdec/swfdec_codec_audio.c libswfdec/swfdec_codec_video.c libswfdec/swfdec_text_field.c libswfdec/swfdec_text_field.h libswfdec/swfdec_text_field_movie_as.c libswfdec/swfdec_text_field_movie.c
...ven if it doesn't fit completely
diff --git a/libswfdec/swfdec_text_field.c b/libswfdec/swfdec_text_field.c
index e848c90..a594bbd 100644
--- a/libswfdec/swfdec_text_field.c
+++ b/libswfdec/swfdec_text_field.c
@@ -276,6 +276,7 @@ swfdec_text_field_render (SwfdecTextField *text, cairo_t *cr,
SwfdecRect limit;
SwfdecColor color;
int i, y, x, linenum;
+ gboolean first;
g_return_if_fail (SWFDEC_IS_TEXT_FIELD (text));
g_return_if_fail (cr != NULL);
@@ -308,6 +309,7 @@ swfdec_text_field_render (SwfdecTextField *text, cairo_t *cr,
layouts = swfdec_text_field_generate_layouts (text, cr...
2007 Oct 14
0
10 commits - libswfdec/swfdec_as_strings.c libswfdec/swfdec_text_field.c libswfdec/swfdec_text_field_movie_as.c libswfdec/swfdec_text_field_movie.c
...valid area
diff --git a/libswfdec/swfdec_text_field.c b/libswfdec/swfdec_text_field.c
index 6adbe8a..867b30d 100644
--- a/libswfdec/swfdec_text_field.c
+++ b/libswfdec/swfdec_text_field.c
@@ -254,7 +254,7 @@ swfdec_text_field_render (SwfdecTextField *text, cairo_t *cr,
GList *layouts, *iter;
SwfdecRect limit;
SwfdecColor color;
- int y, linenum;
+ int y, x, linenum;
g_return_if_fail (SWFDEC_IS_TEXT_FIELD (text));
g_return_if_fail (cr != NULL);
@@ -285,8 +285,9 @@ swfdec_text_field_render (SwfdecTextField *text, cairo_t *cr,
inval);
linenum = 0;
+ x = SWFDEC_GRAPHIC (text...
2007 Feb 13
0
9 commits - libswfdec/js libswfdec/swfdec_bits.c libswfdec/swfdec_bits.h libswfdec/swfdec_codec_screen.c libswfdec/swfdec_image.c libswfdec/swfdec_script.c test/Makefile.am test/swfdec_out.c test/swfdec_out.h test/swfedit.c test/swfedit_file.c
...t)
+swfedit_rect_write (SwfeditToken *token, gpointer data, SwfdecOut *out, gconstpointer hint)
{
swfdec_out_put_rect (out, data);
}
static gpointer
-swfedit_rect_read (SwfdecBits *bits, gconstpointer hint)
+swfedit_rect_read (SwfeditToken *token, SwfdecBits *bits, gconstpointer hint)
{
SwfdecRect *rect = g_new (SwfdecRect, 1);
swfdec_bits_get_rect (bits, rect);
@@ -130,13 +131,13 @@ swfedit_rect_read (SwfdecBits *bits, gco
}
static void
-swfedit_string_write (gpointer data, SwfdecOut *out, gconstpointer hint)
+swfedit_string_write (SwfeditToken *token, gpointer data, SwfdecOut *out,...
2007 Feb 15
0
8 commits - libswfdec/swfdec_bits.h libswfdec/swfdec_font.c libswfdec/swfdec_font.h libswfdec/swfdec_loader.c libswfdec/swfdec_loader_internal.h libswfdec/swfdec_tag.c libswfdec/swfdec_text.c libswfdec/swfdec_text.h test/swfedit_token.c test/various
...escent, leading;
+
+ ascent = swfdec_bits_get_u16 (bits);
+ descent = swfdec_bits_get_u16 (bits);
+ leading = swfdec_bits_get_u16 (bits);
+ for (i = 0; i < n_glyphs; i++) {
+ /* guint advance = */ swfdec_bits_get_u16 (bits);
+ }
+ for (i = 0; i < n_glyphs; i++) {
+ SwfdecRect rect;
+ swfdec_bits_get_rect (bits, &rect);
+ }
+ swfdec_font_parse_kerning_table (s, font, wide_codes);
+ }
+
return SWFDEC_STATUS_OK;
}
diff --git a/libswfdec/swfdec_font.h b/libswfdec/swfdec_font.h
index c8e2d04..23ecce4 100644
--- a/libswfdec/swfdec_font.h
+++ b/libswfdec/sw...
2007 Nov 20
0
4 commits - libswfdec/swfdec_movie.c libswfdec/swfdec_movie.h libswfdec/swfdec_resource.c test/image test/trace
...ks work when the parents of mask and masked movie don't match
diff --git a/libswfdec/swfdec_movie.c b/libswfdec/swfdec_movie.c
index 2325138..a3772c8 100644
--- a/libswfdec/swfdec_movie.c
+++ b/libswfdec/swfdec_movie.c
@@ -564,6 +564,32 @@ swfdec_movie_rect_local_to_global (SwfdecMovie *movie, SwfdecRect *rect)
}
void
+swfdec_movie_global_to_local_matrix (SwfdecMovie *movie, cairo_matrix_t *matrix)
+{
+ g_return_if_fail (SWFDEC_IS_MOVIE (movie));
+ g_return_if_fail (matrix != NULL);
+
+ cairo_matrix_init_identity (matrix);
+ while (movie) {
+ cairo_matrix_multiply (matrix, &movie->...
2007 Oct 10
0
libswfdec/swfdec_rect.c
...f)
Author: Benjamin Otte <otte at gnome.org>
Date: Wed Oct 10 22:49:14 2007 +0200
typo
diff --git a/libswfdec/swfdec_rect.c b/libswfdec/swfdec_rect.c
index 674bcba..c6365c1 100644
--- a/libswfdec/swfdec_rect.c
+++ b/libswfdec/swfdec_rect.c
@@ -205,7 +205,7 @@ swfdec_rect_inside (const SwfdecRect *ou
/* if outer is empty, below will return FALSE */
return outer->x0 <= inner->x0 &&
outer->y0 <= inner->y0 &&
- outer->x1 >= inner->y1 &&
+ outer->x1 >= inner->x1 &&
outer->y1 >= inner->y1;
}
2007 Oct 28
0
2 commits - libswfdec/swfdec_as_object.c libswfdec/swfdec_player.c
...g we don't like, but stupid doubles will always get us...
diff --git a/libswfdec/swfdec_player.c b/libswfdec/swfdec_player.c
index 93887f4..6791094 100644
--- a/libswfdec/swfdec_player.c
+++ b/libswfdec/swfdec_player.c
@@ -1624,7 +1624,8 @@ swfdec_player_invalidate (SwfdecPlayer *player, const SwfdecRect *rect)
guint i;
if (swfdec_rect_is_empty (rect)) {
- g_assert_not_reached ();
+ SWFDEC_ERROR ("called with an empty rectanle. In theory this shouldn't happen.");
+ SWFDEC_ERROR (" However, degenerate matrixes can cause this. We need a fix for that.");...
2007 Jan 25
0
Branch 'interpreter' - 28 commits - configure.ac libswfdec/js libswfdec/swfdec_buffer.c libswfdec/swfdec_edittext_movie.c libswfdec/swfdec_js.c libswfdec/swfdec_js_global.c libswfdec/swfdec_js.h libswfdec/swfdec_js_movie.c libswfdec/swfdec_player.c
...its_required (guint x)
+{
+ guint ret = 0;
+
+ while (x > 0) {
+ x >>= 1;
+ ret++;
+ }
+ return ret;
+}
+
+static guint
+swfdec_out_sbits_required (int x)
+{
+ if (x < 0)
+ x = -x;
+ return swfdec_out_bits_required (x) + 1;
+}
+
+void
+swfdec_out_put_rect (SwfdecOut *out, SwfdecRect *rect)
+{
+ int x0, x1, y0, y1;
+ guint req, tmp;
+
+ g_return_if_fail (out != NULL);
+
+ x0 = rect->x0;
+ y0 = rect->y0;
+ x1 = rect->x1;
+ y1 = rect->y1;
+ req = swfdec_out_sbits_required (x0);
+ tmp = swfdec_out_sbits_required (y0);
+ req = MAX (req, tmp);
+ tmp = swfdec_o...
2007 Apr 16
0
7 commits - libswfdec/swfdec_codec_gst.c libswfdec/swfdec_font.c libswfdec/swfdec_js_movie.c libswfdec/swfdec_morph_movie.c libswfdec/swfdec_pattern.c libswfdec/swfdec_pattern.h libswfdec/swfdec_shape.c libswfdec/swfdec_shape.h libswfdec/swfdec_sprite.c
...ec/swfdec_js_movie.c b/libswfdec/swfdec_js_movie.c
index 3f6333c..53fb5d9 100644
--- a/libswfdec/swfdec_js_movie.c
+++ b/libswfdec/swfdec_js_movie.c
@@ -308,7 +308,9 @@ mc_hitTest (JSContext *cx, JSObject *obj
}
if (argc == 1) {
- SwfdecMovie *other;
+ SwfdecMovie *other, *tmp;
+ SwfdecRect movie_rect, other_rect;
+ guint movie_depth, other_depth;
other = swfdec_scriptable_from_jsval (cx, argv[0], SWFDEC_TYPE_MOVIE);
if (other == NULL) {
SWFDEC_ERROR ("FIXME: what happens now?");
@@ -316,9 +318,36 @@ mc_hitTest (JSContext *cx, JSObject *obj
}
ot...
2007 Nov 12
0
13 commits - libswfdec/Makefile.am libswfdec/swfdec_decoder.c libswfdec/swfdec_decoder.h libswfdec/swfdec_flv_decoder.c libswfdec/swfdec_flv_decoder.h libswfdec/swfdec_image.c libswfdec/swfdec_image_decoder.c libswfdec/swfdec_image_decoder.h
...fdec_event.h"
#include "swfdec_graphic.h"
+#include "swfdec_image.h"
#include "swfdec_loader_internal.h"
#include "swfdec_player_internal.h"
#include "swfdec_sprite.h"
@@ -128,6 +129,12 @@ swfdec_movie_update_extents (SwfdecMovie *movie)
SwfdecRect *extents = &movie->extents;
*rect = movie->draw_extents;
+ if (movie->image) {
+ SwfdecRect image_extents = { 0, 0,
+ movie->image->width * SWFDEC_TWIPS_SCALE_FACTOR,
+ movie->image->height * SWFDEC_TWIPS_SCALE_FACTOR };
+ swfdec_rect_union (rect, rec...
2007 Aug 17
0
3 commits - libswfdec/swfdec_sprite_movie_as.c test/trace
...movie_as.c
@@ -208,8 +208,31 @@ swfdec_sprite_movie_hitTest (SwfdecAsCon
SWFDEC_OBJECT (other)->extents.x1, SWFDEC_OBJECT (other)->extents.y1);
#endif
SWFDEC_AS_VALUE_SET_BOOLEAN (rval, swfdec_rect_intersect (NULL, &movie_rect, &other_rect));
+ } else if (argc >= 2) {
+ SwfdecRect movie_rect;
+ double x, y;
+
+ x = swfdec_as_value_to_number (cx, &argv[0]);
+ y = swfdec_as_value_to_number (cx, &argv[1]);
+
+ if (argc >= 3) {
+ if (swfdec_as_value_to_boolean (cx, &argv[2])) {
+ SWFDEC_FIXME ("hitTest's shapeFlag parameter not supported&...
2007 Jun 20
1
Branch 'as' - libswfdec/swfdec_graphic_movie.c libswfdec/swfdec_movie.c libswfdec/swfdec_movie.h libswfdec/swfdec_sprite_movie.c
...35,8 @@ struct _SwfdecMovieClass {
/* general vfuncs */
void (* init_movie) (SwfdecMovie * movie);
void (* finish_movie) (SwfdecMovie * movie);
+ void (* replace) (SwfdecMovie * movie,
+ SwfdecGraphic * graphic);
void (* update_extents) (SwfdecMovie * movie,
SwfdecRect * extents);
void (* render) (SwfdecMovie * movie,
diff --git a/libswfdec/swfdec_sprite_movie.c b/libswfdec/swfdec_sprite_movie.c
index 89b076f..cbbc8b7 100644
--- a/libswfdec/swfdec_sprite_movie.c
+++ b/libswfdec/swfdec_sprite_movie.c
@@ -96,6 +96,7 @@ swfdec_sprite_movie_perform_place (...
2007 Apr 22
0
3 commits - libswfdec/swfdec_bits.c libswfdec/swfdec_font.c libswfdec/swfdec_movie.c
...for (i = 0; i < n_glyphs; i++) {
+ for (i = 0; i < n_glyphs && swfdec_bits_left (bits); i++) {
/* guint advance = */ swfdec_bits_get_u16 (bits);
}
- for (i = 0; i < n_glyphs; i++) {
+ for (i = 0; i < n_glyphs && swfdec_bits_left (bits); i++) {
SwfdecRect rect;
swfdec_bits_get_rect (bits, &rect);
}
diff-tree ea79f997727fcd34b23b206be84b95c7e2f6d152 (from 375960447cf4f4286d6bab0e36656dfb6df89d30)
Author: Benjamin Otte <otte@gnome.org>
Date: Sun Apr 22 14:43:40 2007 +0200
handle removal of movies that aren't inited/con...
2007 Oct 18
0
11 commits - libswfdec/swfdec_as_strings.c libswfdec/swfdec_text_field.c libswfdec/swfdec_text_field.h libswfdec/swfdec_text_field_movie_as.c libswfdec/swfdec_text_field_movie.c libswfdec/swfdec_text_field_movie.h test/trace
...t hscroll
diff --git a/libswfdec/swfdec_text_field_movie.c b/libswfdec/swfdec_text_field_movie.c
index 50ce2c6..8e4175f 100644
--- a/libswfdec/swfdec_text_field_movie.c
+++ b/libswfdec/swfdec_text_field_movie.c
@@ -579,8 +579,7 @@ swfdec_text_field_movie_render (SwfdecMovie *movie, cairo_t *cr,
SwfdecRect limit;
SwfdecColor color;
SwfdecParagraph *paragraphs;
- int i, y, x;
- guint linenum;
+ int i, y, x, linenum;
gboolean first;
g_return_if_fail (SWFDEC_IS_TEXT_FIELD_MOVIE (movie));
@@ -620,8 +619,8 @@ swfdec_text_field_movie_render (SwfdecMovie *movie, cairo_t *cr,
first = TR...
2007 Mar 29
0
libswfdec-gtk/swfdec_playback_alsa.c libswfdec/swfdec_audio_event.h libswfdec/swfdec_audio_flv.h libswfdec/swfdec_audio_stream.h libswfdec/swfdec_bits.c libswfdec/swfdec_bits.h libswfdec/swfdec_buffer.c libswfdec/swfdec_buffer.h libswfdec/swfdec_cache.c
...et, next_offset;
+ guint i, id, n_glyphs, offset, next_offset;
SwfdecFont *font;
SwfdecBits offsets;
@@ -257,7 +257,7 @@ int
tag_func_define_font_2 (SwfdecSwfDecoder * s)
{
SwfdecBits *bits = &s->b;
- unsigned int id;
+ guint id;
SwfdecShape *shape;
SwfdecFont *font;
SwfdecRect rect;
diff --git a/libswfdec/swfdec_font.h b/libswfdec/swfdec_font.h
index babfa5a..a14aa42 100644
--- a/libswfdec/swfdec_font.h
+++ b/libswfdec/swfdec_font.h
@@ -74,10 +74,10 @@ struct _SwfdecFontClass
GType swfdec_font_get_type (void);
SwfdecShape * swfdec_font_get_glyph (SwfdecFont * fon...
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
...v->mouse_y);
if (x != movie->matrix.x0 || y != movie->matrix.y0) {
swfdec_movie_queue_update (movie, SWFDEC_MOVIE_INVALID_MATRIX);
movie->matrix.x0 = x;
@@ -982,32 +1006,35 @@ void
swfdec_player_set_drag_movie (SwfdecPlayer *player, SwfdecMovie *drag, gboolean center,
SwfdecRect *rect)
{
+ SwfdecPlayerPrivate *priv;
+
g_return_if_fail (SWFDEC_IS_PLAYER (player));
g_return_if_fail (drag == NULL || SWFDEC_IS_MOVIE (drag));
/* FIXME: need to do anything with old drag? */
- player->mouse_drag = drag;
- player->mouse_drag_center = center;
+ priv = player-&...
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
...gt;image = movie->input->get_image (movie->input);
+ if (movie->image)
+ cairo_surface_reference (movie->image);
+ }
+ movie->needs_update = FALSE;
+}
+
+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_ex...