search for: swfdec_color_set_source

Displaying 18 results from an estimated 18 matches for "swfdec_color_set_source".

2007 Oct 27
1
libswfdec/swfdec_text_field_movie.c
libswfdec/swfdec_text_field_movie.c | 2 ++ 1 file changed, 2 insertions(+) New commits: commit 27e0f570ff653063b78efc89a604236e7fe03ece Author: Pekka Lampila <pekka.lampila at iki.fi> Date: Sat Oct 27 17:14:06 2007 +0300 Init TextField's native properties when TextField is created from a tag diff --git a/libswfdec/swfdec_text_field_movie.c
2007 Nov 01
0
2 commits - libswfdec/swfdec_text_field_movie.c test/image
...ovie.c @@ -593,7 +593,8 @@ swfdec_text_field_movie_render (SwfdecMovie *movie, cairo_t *cr, if (text->background) { cairo_rectangle (cr, limit.x0, limit.y0, limit.x1 - limit.x0, limit.y1 - limit.y0); color = swfdec_color_apply_transform (text_movie->background_color, trans); - swfdec_color_set_source (cr, color); + // always use full alpha + swfdec_color_set_source (cr, (color & 0xffffff) + (255 << 24)); cairo_fill (cr); } @@ -604,7 +605,8 @@ swfdec_text_field_movie_render (SwfdecMovie *movie, cairo_t *cr, movie->original_extents.y1 - movie->original_extents.y0...
2007 Oct 17
0
libswfdec/swfdec_text_field.c libswfdec/swfdec_text_field.h libswfdec/swfdec_text_field_movie.c
...DEC_GRAPHIC (text)->extents, inval); - - cairo_rectangle (cr, limit.x0, limit.y0, limit.x1, limit.y1); - cairo_clip (cr); - - if (text->background) { - cairo_rectangle (cr, limit.x0, limit.y0, limit.x1, limit.y1); - color = swfdec_color_apply_transform (background_color, trans); - swfdec_color_set_source (cr, color); - cairo_fill (cr); - } - - if (text->border) { - cairo_rectangle (cr, SWFDEC_GRAPHIC (text)->extents.x0, - SWFDEC_GRAPHIC (text)->extents.y0, SWFDEC_GRAPHIC (text)->extents.x1, - SWFDEC_GRAPHIC (text)->extents.y1); - color = swfdec_color_apply_transform (borde...
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
...ITE_MOVIE (player->roots->data) || - !swfdec_sprite_movie_paint_background (SWFDEC_SPRITE_MOVIE (player->roots->data), cr)) { - SWFDEC_INFO ("couldn't paint the background, using white"); - cairo_set_source_rgb (cr, 1.0, 1.0, 1.0); - cairo_paint (cr); - } + swfdec_color_set_source (cr, player->bgcolor); + cairo_paint (cr); for (walk = player->roots; walk; walk = walk->next) { swfdec_movie_render (walk->data, cr, &trans, &real, TRUE); @@ -1299,3 +1303,42 @@ swfdec_player_get_audio (SwfdecPlayer * return player->audio; } +/** + * swfdec...
2007 Nov 01
0
5 commits - libswfdec/swfdec_as_array.c libswfdec/swfdec_as_object.c libswfdec/swfdec_text_field_movie.c test/image
...r, cairo_clip (cr); if (text->background) { - cairo_rectangle (cr, limit.x0, limit.y0, limit.x1, limit.y1); + cairo_rectangle (cr, limit.x0, limit.y0, limit.x1 - limit.x0, limit.y1 - limit.y0); color = swfdec_color_apply_transform (text_movie->background_color, trans); swfdec_color_set_source (cr, color); cairo_fill (cr); } if (text->border) { - cairo_rectangle (cr, movie->original_extents.x0, - movie->original_extents.y0, movie->original_extents.x1, - movie->original_extents.y1); + cairo_rectangle (cr, movie->original_extents.x0 + SWFDEC_DOUBLE_TO_T...
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
...amin Otte <otte@gnome.org> Date: Tue Feb 6 09:50:42 2007 +0100 add swfdec_color_apply_transform_premultiplied 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) + retur...
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
...ec_color_transform_chain: * @dest: #SwfdecColorTransform to take the result diff --git a/libswfdec/swfdec_color.h b/libswfdec/swfdec_color.h index b38c269..46fdea4 100644 --- a/libswfdec/swfdec_color.h +++ b/libswfdec/swfdec_color.h @@ -72,6 +72,7 @@ SwfdecColor swfdec_color_apply_morph (Sw void swfdec_color_set_source (cairo_t *cr, SwfdecColor color); void swfdec_color_transform_init_identity (SwfdecColorTransform * trans); void swfdec_color_transform_init_color (SwfdecColorTransform *trans, SwfdecColor color); +gboolean swfdec_color_transform_is_identity (const SwfdecColorTransform * trans); void swfdec_colo...
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
...ecColor color; - double width; - SwfdecStrokePattern *stroke = SWFDEC_STROKE_PATTERN (pattern); - - swfdec_pattern_append_path_snapped (cr, path); - color = swfdec_color_apply_morph (stroke->start_color, stroke->end_color, ratio); - color = swfdec_color_apply_transform (color, trans); - swfdec_color_set_source (cr, color); - if (ratio == 0) { - width = stroke->start_width; - } else if (ratio == 65535) { - width = stroke->end_width; - } else { - width = (stroke->start_width * (65535 - ratio) + stroke->end_width * ratio) / 65535; - } - if (width < SWFDEC_TWIPS_SCALE_FACTOR) -...
2007 Oct 23
0
9 commits - libswfdec/swfdec_as_strings.c libswfdec/swfdec_html_parser.c libswfdec/swfdec_style_sheet.c libswfdec/swfdec_style_sheet.h libswfdec/swfdec_text_field_movie_as.c libswfdec/swfdec_text_field_movie.c libswfdec/swfdec_text_field_movie.h
...466d 100644 --- a/libswfdec/swfdec_text_field_movie.c +++ b/libswfdec/swfdec_text_field_movie.c @@ -611,7 +611,7 @@ swfdec_text_field_movie_render (SwfdecMovie *movie, cairo_t *cr, movie->original_extents.y1); color = swfdec_color_apply_transform (text_movie->border_color, trans); swfdec_color_set_source (cr, color); - cairo_set_line_width (cr, 20.0); // FIXME: Is this correct? + cairo_set_line_width (cr, SWFDEC_DOUBLE_TO_TWIPS (1)); cairo_stroke (cr); } commit c7c15478f857113ff9dcf28a5f976f4583d4ec40 Author: Pekka Lampila <pekka.lampila at iki.fi> Date: Mon Oct 22 22:36:17...
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
..., SWFDEC_GRAPHIC (text)->extents.x0, - SWFDEC_GRAPHIC (text)->extents.y0, SWFDEC_GRAPHIC (text)->extents.x1, - SWFDEC_GRAPHIC (text)->extents.y1); + cairo_rectangle (cr, limit.x0, limit.y0, limit.x1, limit.y1); color = swfdec_color_apply_transform (background_color, trans); swfdec_color_set_source (cr, color); cairo_fill (cr); @@ -284,20 +285,17 @@ swfdec_text_field_render (SwfdecTextField *text, cairo_t *cr, inval); y = SWFDEC_GRAPHIC (text)->extents.y0 + 1; - y_min = MAX (SWFDEC_GRAPHIC (text)->extents.y0, inval->y0); - y_max = MIN (SWFDEC_GRAPHIC (text)->ext...
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
...amin Otte <otte@gnome.org> Date: Tue Feb 6 09:50:42 2007 +0100 add swfdec_color_apply_transform_premultiplied 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) + retur...
2007 Jul 21
0
12 commits - configure.ac doc/Makefile.am doc/swfdec-sections.txt libswfdec/jpeg libswfdec/swfdec_as_array.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_strings.c libswfdec/swfdec_player.c libswfdec/swfdec_player.h libswfdec/swfdec_player_internal.h
...a %g %g %g %g ===", player, + real.x0, real.y0, real.x1, real.y1); + /* convert the cairo matrix */ + cairo_translate (cr, player->offset_x, player->offset_y); + cairo_scale (cr, player->scale_x / SWFDEC_TWIPS_SCALE_FACTOR, player->scale_y / SWFDEC_TWIPS_SCALE_FACTOR); swfdec_color_set_source (cr, player->bgcolor); cairo_paint (cr); @@ -1664,6 +1743,7 @@ swfdec_player_set_size (SwfdecPlayer *pl g_object_notify (G_OBJECT (player), "height"); } g_object_thaw_notify (G_OBJECT (player)); + swfdec_player_update_scale (player); } /** diff --git a/libswfdec/sw...
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
...nt ratio) { SwfdecColorPattern *pattern = SWFDEC_COLOR_PATTERN (pat); SwfdecColor color; - cairo_append_path (cr, (cairo_path_t *) path); color = swfdec_color_apply_morph (pattern->start_color, pattern->end_color, ratio); color = swfdec_color_apply_transform (color, trans); - swfdec_color_set_source (cr, color); - cairo_fill (cr); + return cairo_pattern_create_rgba ( + SWFDEC_COLOR_R (color) / 255.0, SWFDEC_COLOR_G (color) / 255.0, + SWFDEC_COLOR_B (color) / 255.0, SWFDEC_COLOR_A (color) / 255.0); } static void swfdec_color_pattern_class_init (SwfdecColorPatternClass *klass)...
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
...a %g %g %g %g ===", player, real.x0, real.y0, real.x1, real.y1); /* convert the cairo matrix */ - cairo_translate (cr, player->offset_x, player->offset_y); - cairo_scale (cr, player->scale_x / SWFDEC_TWIPS_SCALE_FACTOR, player->scale_y / SWFDEC_TWIPS_SCALE_FACTOR); - swfdec_color_set_source (cr, player->bgcolor); + cairo_translate (cr, priv->offset_x, priv->offset_y); + cairo_scale (cr, priv->scale_x / SWFDEC_TWIPS_SCALE_FACTOR, priv->scale_y / SWFDEC_TWIPS_SCALE_FACTOR); + swfdec_color_set_source (cr, priv->bgcolor); cairo_paint (cr); - for (walk = player-&...
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
...nt_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 (SwfdecColor start, SwfdecColor end, guint ratio); void swfdec_color_set_source (cairo_t *cr, SwfdecColor color); void swfdec_color_transform_init_identity (SwfdecColorTransform * trans); void swfdec_color_transform_init_color (SwfdecColorTransform *trans, SwfdecColor color); diff --git a/libswfdec/swfdec_debug.c b/libswfdec/swfdec_debug.c index cf95a14..d18e8a7 100644 --- a...
2007 Nov 07
0
14 commits - libswfdec/swfdec_as_context.c libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_interpret.h libswfdec/swfdec_net_stream.c libswfdec/swfdec_script.c libswfdec/swfdec_sprite_movie.c libswfdec/swfdec_tag.c libswfdec/swfdec_text_field_movie.c
...ROUND); + color_p = ((PangoAttrColor *)attr)->color; + color = SWFDEC_COLOR_COMBINE (color_p.red >> 8, color_p.green >> 8, + color_p.blue >> 8, 255); + color = swfdec_color_apply_transform (color, trans); + pango_attr_iterator_destroy (attr_iter); + + swfdec_color_set_source (cr, color); + + cairo_arc (cr, x + layout->offset_x + + pango_layout_get_indent (layout->layout) - + SWFDEC_DOUBLE_TO_TWIPS (BULLET_MARGIN) / 2, + y + rect.height / 2, rect.height / 8, 20, 2 * M_PI); + cairo_fill (cr); + } + + cairo_move_to (cr, x, y); + skipped =...
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
...nt_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 (SwfdecColor start, SwfdecColor end, guint ratio); void swfdec_color_set_source (cairo_t *cr, SwfdecColor color); void swfdec_color_transform_init_identity (SwfdecColorTransform * trans); void swfdec_color_transform_init_color (SwfdecColorTransform *trans, SwfdecColor color); diff --git a/libswfdec/swfdec_debug.c b/libswfdec/swfdec_debug.c index cf95a14..d18e8a7 100644 --- a...
2007 Nov 20
0
19 commits - libswfdec/swfdec_audio_event.c libswfdec/swfdec_bits.c libswfdec/swfdec_color.c libswfdec/swfdec_color.h libswfdec/swfdec_flv_decoder.c libswfdec/swfdec_image.c libswfdec/swfdec_initialize.as libswfdec/swfdec_initialize.h
...re always black */ /* naming here is taken from ActionScript, where ?a is the multiplier and ?b the offset */ int ra, rb, ga, gb, ba, bb, aa, ab; }; @@ -52,6 +53,7 @@ struct _SwfdecColorTransform { SwfdecColor swfdec_color_apply_morph (SwfdecColor start, SwfdecColor end, guint ratio); void swfdec_color_set_source (cairo_t *cr, SwfdecColor color); void swfdec_color_transform_init_identity (SwfdecColorTransform * trans); +void swfdec_color_transform_init_mask (SwfdecColorTransform * trans); void swfdec_color_transform_init_color (SwfdecColorTransform *trans, SwfdecColor color); gboolean swfdec_color_transf...