search for: n_gradient

Displaying 10 results from an estimated 10 matches for "n_gradient".

Did you mean: n_gradients
2007 Sep 17
0
2 commits - libswfdec/swfdec_bits.c
...c/swfdec_bits.c @@ -599,12 +599,14 @@ swfdec_bits_get_rgba (SwfdecBits * bits) } static inline SwfdecGradient * -swfdec_bits_do_get_gradient (SwfdecBits *bits, gboolean alpha) +swfdec_bits_do_get_gradient (SwfdecBits *bits, gboolean alpha, gboolean morph) { SwfdecGradient *grad; guint i, n_gradients; n_gradients = swfdec_bits_get_u8 (bits); + if (morph) + n_gradients *= 2; grad = g_malloc (sizeof (SwfdecGradient) + sizeof (SwfdecGradientEntry) * (MAX (n_gradients, 1) - 1)); for (i = 0; i < n_gradients && swfdec_bits_left (bits); i++) { @@ -625,35 +627,19 @@ sw...
2007 Apr 22
0
3 commits - libswfdec/swfdec_bits.c libswfdec/swfdec_font.c libswfdec/swfdec_movie.c
...6:41 2007 +0200 break out of gradient loop when no more bits are available diff --git a/libswfdec/swfdec_bits.c b/libswfdec/swfdec_bits.c index 0f7e4c9..7077cdc 100644 --- a/libswfdec/swfdec_bits.c +++ b/libswfdec/swfdec_bits.c @@ -585,11 +585,15 @@ swfdec_bits_get_gradient (SwfdecBits * b n_gradients = swfdec_bits_get_u8 (bits); grad = g_malloc (sizeof (SwfdecGradient) + sizeof (SwfdecGradientEntry) * (n_gradients - 1)); - grad->n_gradients = n_gradients; - for (i = 0; i < n_gradients; i++) { + for (i = 0; i < n_gradients && swfdec_bits_left (bits); i++) { gr...
2007 May 01
0
2 commits - libswfdec/swfdec_bits.c
...ter' of ssh://company@git.freedesktop.org/git/swfdec diff-tree d9f0775f1390a4af3ca7a8c81717dc0b83ae0b51 (from 158cee244eb9faa5c818d41b3e06a20bfbd0cbce) Author: Benjamin Otte <otte@gnome.org> Date: Tue May 1 16:36:50 2007 +0200 don't compute a size < (unsigned) 0 if n_gradients was 0, that could happen diff --git a/libswfdec/swfdec_bits.c b/libswfdec/swfdec_bits.c index b74846e..c8a5062 100644 --- a/libswfdec/swfdec_bits.c +++ b/libswfdec/swfdec_bits.c @@ -587,7 +587,7 @@ swfdec_bits_get_gradient (SwfdecBits * b n_gradients = swfdec_bits_get_u8 (bits); grad = g_...
2007 Dec 03
0
12 commits - libswfdec/Makefile.am libswfdec/swfdec_as_strings.c libswfdec/swfdec_as_types.c libswfdec/swfdec_as_types.h libswfdec/swfdec_gradient_pattern.c libswfdec/swfdec_gradient_pattern.h libswfdec/swfdec_movie_as_drawing.c libswfdec/swfdec_pattern.c
...SWFDEC_ERROR ("different lengths for colors, alphas and ratios, aborting"); + return; + } + draw = swfdec_gradient_pattern_new (); + pattern = SWFDEC_PATTERN (draw); + gradient = SWFDEC_GRADIENT_PATTERN (draw); + gradient->radial = radial; + len = MIN (len, 8); + gradient->n_gradients = len; + for (i = 0; i < len; i++) { + int c, a, r; + SwfdecAsValue v; + int check = swfdec_sprite_movie_gradient_fill_check_length (colors, alphas, ratios); + if (check > i) { + const char *name = swfdec_as_integer_to_string (cx, i); + if (swfdec_as_object_get_variabl...
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
...Color swfdec_bits_get_rgba (SwfdecBits * bits) { - unsigned int r, g, b, a; + guint r, g, b, a; r = swfdec_bits_get_u8 (bits); g = swfdec_bits_get_u8 (bits); @@ -567,7 +567,7 @@ SwfdecGradient * swfdec_bits_get_gradient (SwfdecBits * bits) { SwfdecGradient *grad; - unsigned int i, n_gradients; + guint i, n_gradients; n_gradients = swfdec_bits_get_u8 (bits); grad = g_malloc (sizeof (SwfdecGradient) + @@ -584,7 +584,7 @@ SwfdecGradient * swfdec_bits_get_gradient_rgba (SwfdecBits * bits) { SwfdecGradient *grad; - unsigned int i, n_gradients; + guint i, n_gradients; n_...
2007 Mar 29
0
Branch 'as' - 9 commits - libswfdec-gtk/swfdec_playback_alsa.c libswfdec/js libswfdec/Makefile.am libswfdec/swfdec_as_context.c libswfdec/swfdec_as_context.h libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame.h libswfdec/swfdec_as_function.c
...Color swfdec_bits_get_rgba (SwfdecBits * bits) { - unsigned int r, g, b, a; + guint r, g, b, a; r = swfdec_bits_get_u8 (bits); g = swfdec_bits_get_u8 (bits); @@ -567,7 +567,7 @@ SwfdecGradient * swfdec_bits_get_gradient (SwfdecBits * bits) { SwfdecGradient *grad; - unsigned int i, n_gradients; + guint i, n_gradients; n_gradients = swfdec_bits_get_u8 (bits); grad = g_malloc (sizeof (SwfdecGradient) + @@ -584,7 +584,7 @@ SwfdecGradient * swfdec_bits_get_gradient_rgba (SwfdecBits * bits) { SwfdecGradient *grad; - unsigned int i, n_gradients; + guint i, n_gradients; n_...
2007 Apr 13
0
5 commits - libswfdec/Makefile.am libswfdec/swfdec_color.c libswfdec/swfdec_color.h libswfdec/swfdec_font.c libswfdec/swfdec_loadertarget.c libswfdec/swfdec_movie.h libswfdec/swfdec_pattern.c libswfdec/swfdec_pattern.h libswfdec/swfdec_player.c
...tern; @@ -663,63 +514,14 @@ swfdec_pattern_to_string (SwfdecPattern SwfdecGradientPattern *gradient = SWFDEC_GRADIENT_PATTERN (pattern); return g_strdup_printf ("%s gradient (%u colors)", gradient->radial ? "radial" : "linear", gradient->gradient->n_gradients); - } else if (SWFDEC_IS_STROKE_PATTERN (pattern)) { - SwfdecStrokePattern *line = SWFDEC_STROKE_PATTERN (pattern); + } else if (SWFDEC_IS_STROKE (pattern)) { + SwfdecStroke *line = SWFDEC_STROKE (pattern); return g_strdup_printf ("line (width %u, color #%08X)", line->sta...
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
...rom * @@ -511,9 +525,6 @@ swfdec_pattern_to_string (SwfdecPattern SwfdecGradientPattern *gradient = SWFDEC_GRADIENT_PATTERN (pattern); return g_strdup_printf ("%s gradient (%u colors)", gradient->radial ? "radial" : "linear", gradient->gradient->n_gradients); - } else if (SWFDEC_IS_STROKE (pattern)) { - SwfdecStroke *line = SWFDEC_STROKE (pattern); - return g_strdup_printf ("line (width %u, color #%08X)", line->start_width, line->start_color); } else { return g_strdup_printf ("%s", G_OBJECT_TYPE_NAME (pattern)...
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
.../ 255.0, SWF_COLOR_G(color) / 255.0, - SWF_COLOR_B(color) / 255.0, SWF_COLOR_A(color) / 255.0); + SWFDEC_COLOR_R(color) / 255.0, SWFDEC_COLOR_G(color) / 255.0, + SWFDEC_COLOR_B(color) / 255.0, SWFDEC_COLOR_A(color) / 255.0); } } else { for (i = 0; i < gradient->gradient->n_gradients; i++){ @@ -377,8 +377,8 @@ swfdec_gradient_pattern_paint (SwfdecPat trans); offset = gradient->gradient->array[i].ratio / 255.0; cairo_pattern_add_color_stop_rgba (pattern, offset, - SWF_COLOR_R(color) / 255.0, SWF_COLOR_G(color) / 255.0, - SWF_COLOR_B(color) / 255.0, S...
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
.../ 255.0, SWF_COLOR_G(color) / 255.0, - SWF_COLOR_B(color) / 255.0, SWF_COLOR_A(color) / 255.0); + SWFDEC_COLOR_R(color) / 255.0, SWFDEC_COLOR_G(color) / 255.0, + SWFDEC_COLOR_B(color) / 255.0, SWFDEC_COLOR_A(color) / 255.0); } } else { for (i = 0; i < gradient->gradient->n_gradients; i++){ @@ -377,8 +377,8 @@ swfdec_gradient_pattern_paint (SwfdecPat trans); offset = gradient->gradient->array[i].ratio / 255.0; cairo_pattern_add_color_stop_rgba (pattern, offset, - SWF_COLOR_R(color) / 255.0, SWF_COLOR_G(color) / 255.0, - SWF_COLOR_B(color) / 255.0, S...