Displaying 8 results from an estimated 8 matches for "swfdecgradiententry".
2007 Sep 17
0
2 commits - libswfdec/swfdec_bits.c
...*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 @@ swfdec_bits_do_get_gradient (SwfdecBits
SwfdecGradient *
swfdec_bits_get_gradient (SwfdecBits * bits)
{
- return swfdec_bits_do_get_gradient (bits, FALSE);
+ retu...
2007 Apr 22
0
3 commits - libswfdec/swfdec_bits.c libswfdec/swfdec_font.c libswfdec/swfdec_movie.c
...c/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++) {
grad->array[i].ratio = swfdec_bits_get_u8 (bits);
grad->array[i].color = swfdec_bits_get_color (bits);...
2007 May 01
0
2 commits - libswfdec/swfdec_bits.c
...c/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_malloc (sizeof (SwfdecGradient) +
- sizeof (SwfdecGradientEntry) * (n_gradients - 1));
+ sizeof (SwfdecGradientEntry) * (MAX (n_gradients, 1) - 1));
for (i = 0; i < n_gradients && swfdec_bits_left (bits); i++) {
grad->array[i].ratio = swfdec_bits_get_u8 (bits);
grad->array[i].color = swfdec_bits_get_color (bits);
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
...+ */
+
+#ifndef _SWFDEC_GRADIENT_PATTERN_H_
+#define _SWFDEC_GRADIENT_PATTERN_H_
+
+#include <libswfdec/swfdec_pattern.h>
+
+G_BEGIN_DECLS
+
+typedef struct _SwfdecGradientPattern SwfdecGradientPattern;
+typedef struct _SwfdecGradientPatternClass SwfdecGradientPatternClass;
+
+typedef struct _SwfdecGradientEntry SwfdecGradientEntry;
+
+#define SWFDEC_TYPE_GRADIENT_PATTERN (swfdec_gradient_pattern_get_type())
+#define SWFDEC_IS_GRADIENT_PATTERN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SWFDEC_TYPE_GRADIENT_PATTERN))
+#define SWFDEC_IS_GRADIENT_PATTERN_CLASS(klass) (...
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
...@@ -24,6 +24,8 @@
#include <libswfdec/swfdec_types.h>
+/* Pixel value in the same colorspace as cairo - endian-dependant ARGB.
+ * The alpha pixel must be present */
typedef unsigned int SwfdecColor;
struct _SwfdecColorTransform {
@@ -46,11 +48,25 @@ struct swfdec_gradient_struct
SwfdecGradientEntry array[1];
};
-#define SWFDEC_COLOR_COMBINE(r,g,b,a) (((r)<<24) | ((g)<<16) | ((b)<<8) | (a))
-#define SWFDEC_COLOR_R(x) (((x)>>24)&0xff)
-#define SWFDEC_COLOR_G(x) (((x)>>16)&0xff)
-#define SWFDEC_COLOR_B(x) (((x)>>8)&0xff)
-#define SWFDEC_COLOR...
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
...@@ -24,6 +24,8 @@
#include <libswfdec/swfdec_types.h>
+/* Pixel value in the same colorspace as cairo - endian-dependant ARGB.
+ * The alpha pixel must be present */
typedef unsigned int SwfdecColor;
struct _SwfdecColorTransform {
@@ -46,11 +48,25 @@ struct swfdec_gradient_struct
SwfdecGradientEntry array[1];
};
-#define SWFDEC_COLOR_COMBINE(r,g,b,a) (((r)<<24) | ((g)<<16) | ((b)<<8) | (a))
-#define SWFDEC_COLOR_R(x) (((x)>>24)&0xff)
-#define SWFDEC_COLOR_G(x) (((x)>>16)&0xff)
-#define SWFDEC_COLOR_B(x) (((x)>>8)&0xff)
-#define SWFDEC_COLOR...
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
...iff --git a/libswfdec/swfdec_color.h b/libswfdec/swfdec_color.h
index 878ec66..296311b 100644
--- a/libswfdec/swfdec_color.h
+++ b/libswfdec/swfdec_color.h
@@ -40,7 +40,7 @@ struct swfdec_gradient_entry_struct
struct swfdec_gradient_struct
{
- unsigned int n_gradients;
+ guint n_gradients;
SwfdecGradientEntry array[1];
};
@@ -64,7 +64,7 @@ struct swfdec_gradient_struct
#define SWFDEC_COLOR_G(x) (((x)>>8)&0xff)
#define SWFDEC_COLOR_B(x) ((x)&0xff)
-SwfdecColor swfdec_color_apply_morph (SwfdecColor start, SwfdecColor end, unsigned int ratio);
+SwfdecColor swfdec_color_apply_morph (S...
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
...iff --git a/libswfdec/swfdec_color.h b/libswfdec/swfdec_color.h
index 878ec66..296311b 100644
--- a/libswfdec/swfdec_color.h
+++ b/libswfdec/swfdec_color.h
@@ -40,7 +40,7 @@ struct swfdec_gradient_entry_struct
struct swfdec_gradient_struct
{
- unsigned int n_gradients;
+ guint n_gradients;
SwfdecGradientEntry array[1];
};
@@ -64,7 +64,7 @@ struct swfdec_gradient_struct
#define SWFDEC_COLOR_G(x) (((x)>>8)&0xff)
#define SWFDEC_COLOR_B(x) ((x)&0xff)
-SwfdecColor swfdec_color_apply_morph (SwfdecColor start, SwfdecColor end, unsigned int ratio);
+SwfdecColor swfdec_color_apply_morph (S...