Displaying 17 results from an estimated 17 matches for "swfdec_bits_get_rgba".
2007 Sep 17
0
2 commits - libswfdec/swfdec_bits.c
...3787d61d2)
Author: Benjamin Otte <otte at gnome.org>
Date: Mon Sep 17 11:31:24 2007 +0200
more bad duplication
diff --git a/libswfdec/swfdec_bits.c b/libswfdec/swfdec_bits.c
index bddef90..2d1551a 100644
--- a/libswfdec/swfdec_bits.c
+++ b/libswfdec/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);...
2007 Apr 16
0
4 commits - libswfdec/swfdec_shape.c libswfdec/swfdec_stroke.c test/dump.c
...th, stroke->start_color);
+ SWFDEC_LOG ("new stroke: width %u color %08x", stroke->start_width, stroke->start_color);
return stroke;
}
@@ -167,7 +167,7 @@ swfdec_stroke_parse_rgba (SwfdecSwfDecod
stroke->end_width = stroke->start_width;
stroke->start_color = swfdec_bits_get_rgba (bits);
stroke->end_color = stroke->start_color;
- SWFDEC_LOG ("new stroke stroke: width %u color %08x", stroke->start_width, stroke->start_color);
+ SWFDEC_LOG ("new stroke: width %u color %08x", stroke->start_width, stroke->start_color);
return stro...
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
...ec, gboolean rgba)
-{
- SwfdecBits *bits = &dec->b;
- SwfdecStrokePattern *pattern = g_object_new (SWFDEC_TYPE_STROKE_PATTERN, NULL);
-
- pattern->start_width = swfdec_bits_get_u16 (bits);
- pattern->end_width = pattern->start_width;
- if (rgba) {
- pattern->start_color = swfdec_bits_get_rgba (bits);
- } else {
- pattern->start_color = swfdec_bits_get_color (bits);
- }
- pattern->end_color = pattern->start_color;
- SWFDEC_LOG ("new stroke pattern: width %u color %08x", pattern->start_width, pattern->start_color);
-
- return SWFDEC_PATTERN (pattern);
-}
-...
2007 Apr 22
0
3 commits - libswfdec/swfdec_bits.c libswfdec/swfdec_font.c libswfdec/swfdec_movie.c
...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_rgba (bits);
}
+ if (i < n_gradients) {
+ SWFDEC_ERROR ("not enough data for %u gradients, could only read %u",
+ n_gradients, i);
+ }
+ grad->n_gradients = i;
return grad;
}
@@ -620,11 +628,15 @@ swfdec_bits_get_morph_gradient (SwfdecBi
n_gradients *= 2;
grad = g_ma...
2007 Jan 24
0
Branch 'interpreter' - 8 commits - libswfdec/swfdec_bits.c libswfdec/swfdec_bits.h libswfdec/swfdec_js.c libswfdec/swfdec_js.h libswfdec/swfdec_script.c test/swfdec_out.c test/swfdec_out.h test/swfedit_tag.c test/swfedit_token.c test/swfedit_token.h
...(SwfdecBits *bits)
+{
+ return GUINT_TO_POINTER (swfdec_bits_get_color (bits));
+}
+
+static void
+swfedit_rgba_write (gpointer data, SwfdecOut *out)
+{
+ swfdec_out_put_rgba (out, GPOINTER_TO_UINT (data));
+}
+
+static gpointer
+swfedit_rgba_read (SwfdecBits *bits)
+{
+ return GUINT_TO_POINTER (swfdec_bits_get_rgba (bits));
+}
+
struct {
void (* write) (gpointer data, SwfdecOut *out);
gpointer (* read) (SwfdecBits *bits);
@@ -106,6 +130,8 @@ struct {
{ swfedit_u16_write, swfedit_u16_read },
{ swfedit_u32_write, swfedit_u32_read },
{ swfedit_rect_write, swfedit_rect_read },
+ { swfedit_rgb_wr...
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
...c_stroke_parse (SwfdecSwfDecoder *dec)
{
SwfdecBits *bits = &dec->b;
SwfdecStroke *stroke = g_object_new (SWFDEC_TYPE_STROKE, NULL);
stroke->start_width = swfdec_bits_get_u16 (bits);
stroke->end_width = stroke->start_width;
- if (rgba) {
- stroke->start_color = swfdec_bits_get_rgba (bits);
- } else {
- stroke->start_color = swfdec_bits_get_color (bits);
- }
+ stroke->start_color = swfdec_bits_get_color (bits);
+ stroke->end_color = stroke->start_color;
+ SWFDEC_LOG ("new stroke stroke: width %u color %08x", stroke->start_width, stroke->star...
2007 Jun 15
0
Branch 'as' - 5 commits - libswfdec/swfdec_as_native_function.c libswfdec/swfdec_edittext.c libswfdec/swfdec_edittext.h libswfdec/swfdec_font.c libswfdec/swfdec_font.h libswfdec/swfdec_image.c libswfdec/swfdec_image.h libswfdec/swfdec_morphshape.h
...+tag_func_define_text (SwfdecSwfDecoder * s, guint tag)
{
SwfdecBits *bits = &s->b;
int id;
@@ -150,10 +150,10 @@ define_text (SwfdecSwfDecoder * s, int r
//printf(" font = %d\n",font);
}
if (has_color) {
- if (rgba) {
- glyph.color = swfdec_bits_get_rgba (bits);
- } else {
+ if (tag == SWFDEC_TAG_DEFINETEXT) {
glyph.color = swfdec_bits_get_color (bits);
+ } else {
+ glyph.color = swfdec_bits_get_rgba (bits);
}
//printf(" color = %08x\n",glyph.color);
}
@@ -175,21 +175,7 @@...
2007 Nov 22
0
5 commits - libswfdec/swfdec_as_interpret.c libswfdec/swfdec_bits.c libswfdec/swfdec_bits.h libswfdec/swfdec_debugger.c libswfdec/swfdec_movie.c libswfdec/swfdec_script.c libswfdec/swfdec_sprite_movie.c libswfdec/swfdec_tag.c libswfdec/swfdec_text_field.c
...wfdecBits * bits);
char *swfdec_bits_get_string_length (SwfdecBits * bits, guint len);
-char *swfdec_bits_get_string_with_version (SwfdecBits *bits, guint version);
+char *swfdec_bits_get_string (SwfdecBits *bits, guint version);
SwfdecColor swfdec_bits_get_color (SwfdecBits * bits);
SwfdecColor swfdec_bits_get_rgba (SwfdecBits * bits);
void swfdec_bits_get_rect (SwfdecBits * bits, SwfdecRect *rect);
diff --git a/libswfdec/swfdec_debugger.c b/libswfdec/swfdec_debugger.c
index 89adbf6..2dca1df 100644
--- a/libswfdec/swfdec_debugger.c
+++ b/libswfdec/swfdec_debugger.c
@@ -71,7 +71,7 @@ swfdec_debugger_print_pus...
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
...7 +541,7 @@ swfdec_bits_get_string_length (SwfdecBit
SwfdecColor
swfdec_bits_get_color (SwfdecBits * bits)
{
- unsigned int r, g, b;
+ guint r, g, b;
r = swfdec_bits_get_u8 (bits);
g = swfdec_bits_get_u8 (bits);
@@ -553,7 +553,7 @@ swfdec_bits_get_color (SwfdecBits * bits
SwfdecColor
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_...
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
...f --cc libswfdec/swfdec_bits.c
index f3ea7c4,5013e49..21172f2
@@@ -482,13 -450,13 +482,13 @@@
g = swfdec_bits_get_u8 (bits);
b = swfdec_bits_get_u8 (bits);
- return SWF_COLOR_COMBINE (r, g, b, 0xff);
+ return SWFDEC_COLOR_COMBINE (r, g, b, 0xff);
}
-unsigned int
+SwfdecColor
swfdec_bits_get_rgba (SwfdecBits * bits)
{
- int r, g, b, a;
+ unsigned int r, g, b, a;
r = swfdec_bits_get_u8 (bits);
g = swfdec_bits_get_u8 (bits);
diff --cc libswfdec/swfdec_image.c
index 23602c4,224e101..53dad98
@@@ -290,18 -288,19 +267,17 @@@
swfdec_image_jpeg3_load (SwfdecImage *image)
{...
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
...gpointer data, SwfdecOut *out, gconstpointer hint)
{
swfdec_out_put_rgba (out, GPOINTER_TO_UINT (data));
}
static gpointer
-swfedit_rgba_read (SwfdecBits *bits, gconstpointer hint)
+swfedit_rgba_read (SwfeditToken *token, SwfdecBits *bits, gconstpointer hint)
{
return GUINT_TO_POINTER (swfdec_bits_get_rgba (bits));
}
static void
-swfedit_matrix_write (gpointer data, SwfdecOut *out, gconstpointer hint)
+swfedit_matrix_write (SwfeditToken *token, gpointer data, SwfdecOut *out, gconstpointer hint)
{
swfdec_out_put_matrix (out, data);
}
static gpointer
-swfedit_matrix_read (SwfdecBits *bits,...
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
...7 +541,7 @@ swfdec_bits_get_string_length (SwfdecBit
SwfdecColor
swfdec_bits_get_color (SwfdecBits * bits)
{
- unsigned int r, g, b;
+ guint r, g, b;
r = swfdec_bits_get_u8 (bits);
g = swfdec_bits_get_u8 (bits);
@@ -553,7 +553,7 @@ swfdec_bits_get_color (SwfdecBits * bits
SwfdecColor
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_...
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
...bits.c
+++ b/libswfdec/swfdec_bits.c
@@ -450,7 +450,7 @@ swfdec_bits_get_color (SwfdecBits * bits
g = swfdec_bits_get_u8 (bits);
b = swfdec_bits_get_u8 (bits);
- return SWF_COLOR_COMBINE (r, g, b, 0xff);
+ return SWFDEC_COLOR_COMBINE (r, g, b, 0xff);
}
unsigned int
@@ -463,7 +463,7 @@ swfdec_bits_get_rgba (SwfdecBits * bits)
b = swfdec_bits_get_u8 (bits);
a = swfdec_bits_get_u8 (bits);
- return SWF_COLOR_COMBINE (r, g, b, a);
+ return SWFDEC_COLOR_COMBINE (r, g, b, a);
}
SwfdecGradient *
diff --git a/libswfdec/swfdec_color.c b/libswfdec/swfdec_color.c
index 0d8a8be..7761653 100644
---...
2007 Jun 06
0
Branch 'as' - 13 commits - libswfdec/swfdec_as_context.c libswfdec/swfdec_as_context.h libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame.h libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_object.h
...(SwfdecBits *bits, guint bytes);
char *swfdec_bits_get_string (SwfdecBits * bits);
char *swfdec_bits_get_string_length (SwfdecBits * bits, guint len);
+char *swfdec_bits_get_string_with_version (SwfdecBits *bits, guint version);
SwfdecColor swfdec_bits_get_color (SwfdecBits * bits);
SwfdecColor swfdec_bits_get_rgba (SwfdecBits * bits);
SwfdecGradient *swfdec_bits_get_gradient (SwfdecBits * bits);
diff --git a/libswfdec/swfdec_debugger.c b/libswfdec/swfdec_debugger.c
index 8d0a96e..52ae539 100644
--- a/libswfdec/swfdec_debugger.c
+++ b/libswfdec/swfdec_debugger.c
@@ -47,6 +47,7 @@ static guint signals[LAST_SI...
2007 Feb 06
0
109 commits - configure.ac libswfdec/js libswfdec/Makefile.am libswfdec/swfdec_bits.c libswfdec/swfdec_bits.h libswfdec/swfdec_buffer.c libswfdec/swfdec_button_movie.c libswfdec/swfdec_codec_screen.c libswfdec/swfdec_color.c libswfdec/swfdec_color.h
...f --cc libswfdec/swfdec_bits.c
index f3ea7c4,5013e49..21172f2
@@@ -482,13 -450,13 +482,13 @@@
g = swfdec_bits_get_u8 (bits);
b = swfdec_bits_get_u8 (bits);
- return SWF_COLOR_COMBINE (r, g, b, 0xff);
+ return SWFDEC_COLOR_COMBINE (r, g, b, 0xff);
}
-unsigned int
+SwfdecColor
swfdec_bits_get_rgba (SwfdecBits * bits)
{
- int r, g, b, a;
+ unsigned int r, g, b, a;
r = swfdec_bits_get_u8 (bits);
g = swfdec_bits_get_u8 (bits);
diff --cc libswfdec/swfdec_image.c
index 23602c4,224e101..53dad98
@@@ -290,18 -288,19 +267,17 @@@
swfdec_image_jpeg3_load (SwfdecImage *image)
{...
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
...}
-
-static void
-swfedit_rgba_write (SwfeditToken *token, gpointer data, SwfdecOut *out, gconstpointer hint)
-{
- swfdec_out_put_rgba (out, GPOINTER_TO_UINT (data));
-}
-
-static gpointer
-swfedit_rgba_read (SwfeditToken *token, SwfdecBits *bits, gconstpointer hint)
-{
- return GUINT_TO_POINTER (swfdec_bits_get_rgba (bits));
-}
-
-static void
-swfedit_matrix_write (SwfeditToken *token, gpointer data, SwfdecOut *out, gconstpointer hint)
-{
- swfdec_out_put_matrix (out, data);
-}
-
-static gpointer
-swfedit_matrix_read (SwfeditToken *token, SwfdecBits *bits, gconstpointer hint)
-{
- cairo_matrix_t *matrix = g_...
2007 Oct 29
0
20 commits - libswfdec/Makefile.am libswfdec/swfdec_as_interpret.c libswfdec/swfdec_html_parser.c libswfdec/swfdec_initialize.as libswfdec/swfdec_initialize.h libswfdec/swfdec_text_field.c libswfdec/swfdec_text_field.h
...pported");
+
if (has_font) {
SwfdecCharacter *font;
@@ -142,6 +145,7 @@ tag_func_define_edit_text (SwfdecSwfDecoder * s, guint tag)
text->size = swfdec_bits_get_u16 (b);
SWFDEC_LOG (" size = %u", text->size);
}
+
if (has_color) {
text->color = swfdec_bits_get_rgba (b);
SWFDEC_LOG (" color = %u", text->color);
@@ -149,11 +153,13 @@ tag_func_define_edit_text (SwfdecSwfDecoder * s, guint tag)
SWFDEC_WARNING ("FIXME: figure out default color");
text->color = SWFDEC_COLOR_COMBINE (255, 255, 255, 255);
}
+
if (has_ma...