search for: swfdeccolor

Displaying 20 results from an estimated 43 matches for "swfdeccolor".

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
...its->ptr); @@ -522,7 +522,7 @@ swfdec_bits_skip_bytes (SwfdecBits *bits } char * -swfdec_bits_get_string_length (SwfdecBits * bits, unsigned int len) +swfdec_bits_get_string_length (SwfdecBits * bits, guint len) { char *ret; @@ -541,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,...
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
...ied diff --git a/libswfdec/swfdec_color.c b/libswfdec/swfdec_color.c index 73276a0..ee3a63f 100644 --- a/libswfdec/swfdec_color.c +++ b/libswfdec/swfdec_color.c @@ -56,6 +56,32 @@ swfdec_color_set_source (cairo_t *cr, Sw SWFDEC_COLOR_B (color) / 255.0, SWFDEC_COLOR_A (color) / 255.0); } +SwfdecColor +swfdec_color_apply_transform_premultiplied (SwfdecColor in, + const SwfdecColorTransform * trans) +{ + int r, g, b, a, aold; + + aold = SWFDEC_COLOR_A (in); + if (aold == 0) + return 0; + + a = (aold * trans->aa >> 8) + trans->ab; + a = CLAMP (a, 0, 255); + + r = SWFDEC_CO...
2007 Oct 17
0
libswfdec/swfdec_text_field.c libswfdec/swfdec_text_field.h libswfdec/swfdec_text_field_movie.c
...nclude <string.h> #include "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 (...
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
...c_image.c diff --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 (Swfde...
2007 Feb 17
0
2 commits - doc/swfdec-sections.txt libswfdec/swfdec_color.h libswfdec/swfdec_player.c libswfdec/swfdec_player.h libswfdec/swfdec_player_internal.h libswfdec/swfdec_sprite.c libswfdec/swfdec_sprite.h libswfdec/swfdec_sprite_movie.c
...e terms of the GNU Lesser General Public @@ -46,6 +46,8 @@ struct _SwfdecPlayer unsigned int height; /* height of movie */ GList * roots; /* all the root movies */ SwfdecCache * cache; /* player cache */ + gboolean bgcolor_set; /* TRUE if the background color has been set */ + SwfdecColor bgcolor; /* background color */ /* javascript */ JSContext * jscx; /* global Javascript context */ diff --git a/libswfdec/swfdec_sprite.c b/libswfdec/swfdec_sprite.c index 0a50906..4145c72 100644 --- a/libswfdec/swfdec_sprite.c +++ b/libswfdec/swfdec_sprite.c @@ -229,7 +229,6 @@ tag_sh...
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
...p; g_return_if_fail (out != NULL); + g_return_if_fail (rect != NULL); x0 = rect->x0; y0 = rect->y0; @@ -233,3 +234,25 @@ swfdec_out_put_rect (SwfdecOut *out, Swf swfdec_out_put_sbits (out, y1, req); swfdec_out_syncbits (out); } + +void +swfdec_out_put_rgb (SwfdecOut *out, SwfdecColor color) +{ + g_return_if_fail (out != NULL); + + swfdec_out_put_u8 (out, SWF_COLOR_R (color)); + swfdec_out_put_u8 (out, SWF_COLOR_G (color)); + swfdec_out_put_u8 (out, SWF_COLOR_B (color)); +} + +void +swfdec_out_put_rgba (SwfdecOut *out, SwfdecColor color) +{ + g_return_if_fail (out != NULL);...
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
...its->ptr); @@ -522,7 +522,7 @@ swfdec_bits_skip_bytes (SwfdecBits *bits } char * -swfdec_bits_get_string_length (SwfdecBits * bits, unsigned int len) +swfdec_bits_get_string_length (SwfdecBits * bits, guint len) { char *ret; @@ -541,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,...
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
...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, paragraphs, trans,...
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
..._STROKE_PATTERN, SwfdecStrokePatternClass)) -#define SWFDEC_STROKE_PATTERN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SWFDEC_TYPE_STROKE_PATTERN, SwfdecStrokePatternClass)) - -struct _SwfdecStrokePattern -{ - SwfdecPattern pattern; - - guint start_width; /* width of line */ - SwfdecColor start_color; /* color to paint with */ - guint end_width; /* width of line */ - SwfdecColor end_color; /* color to paint with */ -}; - -struct _SwfdecStrokePatternClass -{ - SwfdecPatternClass pattern_class; -}; - -G_DEFINE_TYPE (SwfdecStrokePattern, swfdec_stroke_pattern, SWFDEC_TYPE_PAT...
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
...} diff --git a/libswfdec/swfdec_pattern.h b/libswfdec/swfdec_pattern.h index 6a0d2c7..cc63645 100644 --- a/libswfdec/swfdec_pattern.h +++ b/libswfdec/swfdec_pattern.h @@ -58,8 +58,8 @@ struct _SwfdecPatternClass GType swfdec_pattern_get_type (void); SwfdecPattern * swfdec_pattern_new_color (SwfdecColor color); -SwfdecPattern * swfdec_pattern_parse (SwfdecSwfDecoder * dec, - gboolean rgba); +SwfdecPattern * swfdec_pattern_parse (SwfdecSwfDecoder * dec); +SwfdecPattern * swfdec_pattern_parse_rgba (SwfdecSwfDecoder * dec); SwfdecPattern * swfdec_pattern_parse_morph (SwfdecSw...
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
...t 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)->extents.x0; y...
2007 Jun 08
0
Changes to 'refs/tags/0.4.2'
...we don't have the header in the uncompressed buffer We need at least gtk-2.8 add swfedit implement saving remove debugging g_print handle tokens without children add initial support for auto-extraction of contents make the color functions return a SwfdecColor implement StringAdd and GetURL, so Steve dances again add support for colors and the SetBackground tag implement swfdec_js_eval_set use swfdec_js_eval_set for SetVariable That line must've been accidentally removed somewhere rework case sensitivity once again...
2007 Nov 02
0
5 commits - libswfdec/swfdec_text_field.c libswfdec/swfdec_text_field_movie_as.c libswfdec/swfdec_text_field_movie.c libswfdec/swfdec_xml.c libswfdec/swfdec_xml_node.c
...it_values (node, type, swfdec_as_context_get_string (SWFDEC_AS_OBJECT (node)->context, value)); commit fb38f6f974a113827e212b4de1d107b0ab46e85b Author: Pekka Lampila <pekka.lampila at iki.fi> Date: Fri Nov 2 11:49:59 2007 +0200 One more change to make TextField independent of SwfdecColor implementation diff --git a/libswfdec/swfdec_text_field_movie_as.c b/libswfdec/swfdec_text_field_movie_as.c index 70ce222..0b73b2b 100644 --- a/libswfdec/swfdec_text_field_movie_as.c +++ b/libswfdec/swfdec_text_field_movie_as.c @@ -486,7 +486,10 @@ swfdec_text_field_movie_get_backgroundColor (Swfd...
2007 Feb 06
0
Branch 'interpreter' - 15 commits - configure.ac libswfdec/swfdec_audio_event.c libswfdec/swfdec_button_movie.c libswfdec/swfdec_color.c libswfdec/swfdec_color.h libswfdec/swfdec_compiler.c libswfdec/swfdec_image.c libswfdec/swfdec_sprite_movie.c
...ied diff --git a/libswfdec/swfdec_color.c b/libswfdec/swfdec_color.c index 73276a0..ee3a63f 100644 --- a/libswfdec/swfdec_color.c +++ b/libswfdec/swfdec_color.c @@ -56,6 +56,32 @@ swfdec_color_set_source (cairo_t *cr, Sw SWFDEC_COLOR_B (color) / 255.0, SWFDEC_COLOR_A (color) / 255.0); } +SwfdecColor +swfdec_color_apply_transform_premultiplied (SwfdecColor in, + const SwfdecColorTransform * trans) +{ + int r, g, b, a, aold; + + aold = SWFDEC_COLOR_A (in); + if (aold == 0) + return 0; + + a = (aold * trans->aa >> 8) + trans->ab; + a = CLAMP (a, 0, 255); + + r = SWFDEC_CO...
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
...ex ca5f8c4..2f63634 100644 --- a/libswfdec/swfdec_gradient_pattern.c +++ b/libswfdec/swfdec_gradient_pattern.c @@ -56,7 +56,7 @@ swfdec_gradient_pattern_morph (SwfdecDraw *dest, SwfdecDraw *source, guint ratio static cairo_pattern_t * swfdec_gradient_pattern_get_pattern (SwfdecPattern *pat, const SwfdecColorTransform *trans) { - guint i; + guint i, ratio; cairo_pattern_t *pattern; SwfdecColor color; double offset; @@ -89,13 +89,20 @@ swfdec_gradient_pattern_get_pattern (SwfdecPattern *pat, const SwfdecColorTransf } #endif cairo_pattern_set_extend (pattern, gradient->extend); + /*...
2007 Apr 27
0
Changes to 'refs/tags/0.4.3'
...we don't have the header in the uncompressed buffer We need at least gtk-2.8 add swfedit implement saving remove debugging g_print handle tokens without children add initial support for auto-extraction of contents make the color functions return a SwfdecColor implement StringAdd and GetURL, so Steve dances again add support for colors and the SetBackground tag implement swfdec_js_eval_set use swfdec_js_eval_set for SetVariable That line must've been accidentally removed somewhere rework case sensitivity once again...
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
...es (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); +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...
2007 Aug 02
0
2 commits - libswfdec/swfdec_player.c libswfdec/swfdec_player_internal.h libswfdec/swfdec_stage_as.c
...(player, player, swfdec_player_update_size, NULL); } /** diff --git a/libswfdec/swfdec_player_internal.h b/libswfdec/swfdec_player_internal.h index cc9a384..0667e20 100644 --- a/libswfdec/swfdec_player_internal.h +++ b/libswfdec/swfdec_player_internal.h @@ -61,6 +61,8 @@ struct _SwfdecPlayer SwfdecColor bgcolor; /* background color */ SwfdecLoader * loader; /* initial loader */ /* stage properties */ + guint internal_width; /* width used by the scripting engine */ + guint internal_height; /* height used by the scripting engine */ gint stage_width; /* width set by the user */...
2007 Apr 27
0
Changes to 'refs/tags/0.4.4'
...we don't have the header in the uncompressed buffer We need at least gtk-2.8 add swfedit implement saving remove debugging g_print handle tokens without children add initial support for auto-extraction of contents make the color functions return a SwfdecColor implement StringAdd and GetURL, so Steve dances again add support for colors and the SetBackground tag implement swfdec_js_eval_set use swfdec_js_eval_set for SetVariable That line must've been accidentally removed somewhere rework case sensitivity once again...
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
...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 = TRUE; linenum = 0; -...