Displaying 20 results from an estimated 27 matches for "swfdec_color_combine".
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
...ec/swfdec_text_field.c
+++ b/libswfdec/swfdec_text_field.c
@@ -151,7 +151,7 @@ tag_func_define_edit_text (SwfdecSwfDecoder * s, guint tag)
SWFDEC_LOG (" color = %u", text->color);
} else {
SWFDEC_WARNING ("FIXME: figure out default color");
- text->color = SWFDEC_COLOR_COMBINE (255, 255, 255, 255);
+ text->color = SWFDEC_COLOR_COMBINE (255, 255, 255, 0);
}
if (has_max_length) {
diff --git a/libswfdec/swfdec_text_field_movie.c b/libswfdec/swfdec_text_field_movie.c
index a09610e..2ca9424 100644
--- a/libswfdec/swfdec_text_field_movie.c
+++ b/libswfdec/swfdec_...
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 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
...into interpreter
Conflicts:
libswfdec/swfdec_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...
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
...bytes",
0, G_MAXUINT, 50 * 1024 * 1024, G_PARAM_READABLE));
-
+ g_object_class_install_property (object_class, PROP_BACKGROUND_COLOR,
+ g_param_spec_uint ("background-color", "background color", "ARGB color used to draw the background",
+ 0, G_MAXUINT, SWFDEC_COLOR_COMBINE (0xFF, 0xFF, 0xFF, 0xFF), G_PARAM_READWRITE));
/**
* SwfdecPlayer::trace:
@@ -820,6 +829,7 @@ swfdec_player_init (SwfdecPlayer *player
player->actions = swfdec_ring_buffer_new_for_type (SwfdecPlayerAction, 16);
player->cache = swfdec_cache_new (50 * 1024 * 1024); /* 100 MB */...
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
...(r * trans->ra * a / aold >> 8) + trans->rb * a / 255;
+ r = CLAMP (r, 0, a);
+ g = (g * trans->ga * a / aold >> 8) + trans->gb * a / 255;
+ g = CLAMP (g, 0, a);
+ b = (b * trans->ba * a / aold >> 8) + trans->bb * a / 255;
+ b = CLAMP (b, 0, a);
+
+ return SWFDEC_COLOR_COMBINE (r, g, b, a);
+}
+
unsigned int
swfdec_color_apply_transform (unsigned int in, const SwfdecColorTransform * trans)
{
diff --git a/libswfdec/swfdec_color.h b/libswfdec/swfdec_color.h
index 46fdea4..54ce268 100644
--- a/libswfdec/swfdec_color.h
+++ b/libswfdec/swfdec_color.h
@@ -77,6 +77,8 @@ void...
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
...xt_field_movie.c
+++ b/libswfdec/swfdec_text_field_movie.c
@@ -935,8 +935,8 @@ swfdec_text_field_movie_init_movie (SwfdecMovie *movie)
text->format_new->indent = text->text->indent / 20;
text->format_new->leading = text->text->leading / 20;
- text->border_color = SWFDEC_COLOR_COMBINE (0, 0, 0, 0);
- text->background_color = SWFDEC_COLOR_COMBINE (255, 255, 255, 0);
+ text->border_color = SWFDEC_COLOR_COMBINE (0, 0, 0, 255);
+ text->background_color = SWFDEC_COLOR_COMBINE (255, 255, 255, 255);
// text
if (text->text->text_input != NULL) {
diff --git a/li...
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
...xt_field_movie.c
+++ b/libswfdec/swfdec_text_field_movie.c
@@ -552,8 +552,8 @@ swfdec_text_field_movie_init_movie (SwfdecMovie *movie)
text->format_new->indent = text->text->indent / 20;
text->format_new->leading = text->text->leading / 20;
- text->border_color = SWFDEC_COLOR_COMBINE (0, 0, 0, 255);
- text->background_color = SWFDEC_COLOR_COMBINE (255, 255, 255, 255);
+ text->border_color = SWFDEC_COLOR_COMBINE (0, 0, 0, 0);
+ text->background_color = SWFDEC_COLOR_COMBINE (255, 255, 255, 0);
// text
if (text->text->text_input != NULL) {
diff --git a/li...
2007 Sep 17
0
2 commits - libswfdec/swfdec_bits.c
...ove code dupliction and associated SEGV when reading 0-size RGBA gradients
diff --git a/libswfdec/swfdec_bits.c b/libswfdec/swfdec_bits.c
index 9ec3988..bddef90 100644
--- a/libswfdec/swfdec_bits.c
+++ b/libswfdec/swfdec_bits.c
@@ -598,8 +598,8 @@ swfdec_bits_get_rgba (SwfdecBits * bits)
return SWFDEC_COLOR_COMBINE (r, g, b, a);
}
-SwfdecGradient *
-swfdec_bits_get_gradient (SwfdecBits * bits)
+static inline SwfdecGradient *
+swfdec_bits_do_get_gradient (SwfdecBits *bits, gboolean alpha)
{
SwfdecGradient *grad;
guint i, n_gradients;
@@ -609,7 +609,10 @@ swfdec_bits_get_gradient (SwfdecBits * b...
2007 Oct 17
0
libswfdec/swfdec_text_field.c libswfdec/swfdec_text_field.h libswfdec/swfdec_text_field_movie.c
...= pango_attribute_copy (attr);
- if (attr->klass->type == PANGO_ATTR_FOREGROUND && trans != NULL &&
- !swfdec_color_transform_is_identity (trans))
- {
- SwfdecColor color;
- PangoColor pcolor;
-
- pcolor = ((PangoAttrColor *)attr)->color;
- color = SWFDEC_COLOR_COMBINE (pcolor.red >> 8, pcolor.green >> 8,
- pcolor.blue >> 8, 255);
- color = swfdec_color_apply_transform (color, trans);
- pcolor.red = SWFDEC_COLOR_R (color) << 8;
- pcolor.green = SWFDEC_COLOR_G (color) << 8;
- pcolor.blue = SWFDEC_COLOR_B (color) <&...
2007 Oct 28
0
5 commits - autogen.sh configure.ac libswfdec-gtk/Makefile.am libswfdec/swfdec_codec_audio.c libswfdec/swfdec_codec_video.c libswfdec/swfdec_player.c test/trace
...0100
stop the runtime timer at the beginning
diff --git a/libswfdec/swfdec_player.c b/libswfdec/swfdec_player.c
index 6791094..babd2ad 100644
--- a/libswfdec/swfdec_player.c
+++ b/libswfdec/swfdec_player.c
@@ -1580,6 +1580,7 @@ swfdec_player_init (SwfdecPlayer *player)
player->bgcolor = SWFDEC_COLOR_COMBINE (0xFF, 0xFF, 0xFF, 0xFF);
player->runtime = g_timer_new ();
+ g_timer_stop (player->runtime);
player->invalidations = g_array_new (FALSE, FALSE, sizeof (SwfdecRectangle));
player->mouse_visible = TRUE;
player->mouse_cursor = SWFDEC_MOUSE_CURSOR_NORMAL;
commit 20d682af3...
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
...quot;
#include "swfdec_path.h"
#include "swfdec_pattern.h"
#include "swfdec_stroke.h"
@@ -69,6 +71,9 @@ swfdec_sprite_movie_end_fill (SwfdecMovie *movie, SwfdecDraw *new)
}
}
+#define SWFDEC_COLOR_FROM_COLOR_ALPHA(color, alpha) \
+ (((color) & 0xFFFFFF) | SWFDEC_COLOR_COMBINE (0, 0, 0, CLAMP ((alpha), 0, 100) * 255 / 100))
+
SWFDEC_AS_NATIVE (901, 1, swfdec_sprite_movie_beginFill)
void
swfdec_sprite_movie_beginFill (SwfdecAsContext *cx, SwfdecAsObject *object,
@@ -84,24 +89,175 @@ swfdec_sprite_movie_beginFill (SwfdecAsContext *cx, SwfdecAsObject *object,
if (argc...
2007 Oct 22
0
6 commits - doc/Makefile.am doc/swfdec-sections.txt libswfdec-gtk/swfdec_gtk_player.c libswfdec/swfdec_as_context.c libswfdec/swfdec_as_context.h libswfdec/swfdec_as_internal.h libswfdec/swfdec_player.c libswfdec/swfdec_player.h
...e = swfdec_player_check_continue;
klass->advance = swfdec_player_do_advance;
klass->handle_key = swfdec_player_do_handle_key;
@@ -1488,6 +1513,7 @@ swfdec_player_init (SwfdecPlayer *player)
player->cache = swfdec_cache_new (50 * 1024 * 1024); /* 100 MB */
player->bgcolor = SWFDEC_COLOR_COMBINE (0xFF, 0xFF, 0xFF, 0xFF);
+ player->runtime = g_timer_new ();
player->invalidations = g_array_new (FALSE, FALSE, sizeof (SwfdecRectangle));
player->mouse_visible = TRUE;
player->mouse_cursor = SWFDEC_MOUSE_CURSOR_NORMAL;
@@ -2434,6 +2460,8 @@ swfdec_player_set_alignment (Swf...
2007 Oct 11
0
10 commits - configure.ac doc/Makefile.am doc/swfdec-sections.txt libswfdec/swfdec_buffer.c libswfdec/swfdec_movie_as_drawing.c test/image test/sound
...ject,
guint argc, SwfdecAsValue *argv, SwfdecAsValue *rval)
{
SwfdecMovie *movie;
+ SwfdecDraw *draw;
int color, alpha;
SWFDEC_AS_CHECK (SWFDEC_TYPE_MOVIE, &movie, "|ii", &color, &alpha);
@@ -53,9 +91,9 @@ swfdec_sprite_movie_beginFill (SwfdecAsC
alpha = SWFDEC_COLOR_COMBINE (0, 0, 0, 255);
}
color = color | alpha;
- movie->draw_fill = SWFDEC_DRAW (swfdec_pattern_new_color (color));
- swfdec_path_move_to (&movie->draw_fill->path, movie->draw_x, movie->draw_y);
- movie->draws = g_slist_append (movie->draws, movie->draw_fill);
+ draw...
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
...UEUES; i++) {
- player->actions[i] = swfdec_ring_buffer_new_for_type (SwfdecPlayerAction, 16);
- }
- player->external_actions = swfdec_ring_buffer_new_for_type (SwfdecPlayerExternalAction, 8);
- player->cache = swfdec_cache_new (50 * 1024 * 1024); /* 100 MB */
- player->bgcolor = SWFDEC_COLOR_COMBINE (0xFF, 0xFF, 0xFF, 0xFF);
-
- player->runtime = g_timer_new ();
- g_timer_stop (player->runtime);
- player->max_runtime = 10 * 1000;
- player->invalidations = g_array_new (FALSE, FALSE, sizeof (SwfdecRectangle));
- player->mouse_visible = TRUE;
- player->mouse_cursor = SWFDE...
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
...(r * trans->ra * a / aold >> 8) + trans->rb * a / 255;
+ r = CLAMP (r, 0, a);
+ g = (g * trans->ga * a / aold >> 8) + trans->gb * a / 255;
+ g = CLAMP (g, 0, a);
+ b = (b * trans->ba * a / aold >> 8) + trans->bb * a / 255;
+ b = CLAMP (b, 0, a);
+
+ return SWFDEC_COLOR_COMBINE (r, g, b, a);
+}
+
unsigned int
swfdec_color_apply_transform (unsigned int in, const SwfdecColorTransform * trans)
{
diff --git a/libswfdec/swfdec_color.h b/libswfdec/swfdec_color.h
index 46fdea4..54ce268 100644
--- a/libswfdec/swfdec_color.h
+++ b/libswfdec/swfdec_color.h
@@ -77,6 +77,8 @@ void...
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
...ribute *)iter->data);
+
+ if (attr->klass->type == PANGO_ATTR_FOREGROUND && trans != NULL &&
+ !swfdec_color_transform_is_identity (trans))
+ {
+ SwfdecColor color;
+ PangoColor color_p;
+
+ 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);
+
+ color_p.red = SWFDEC_COLOR_R (color) << 8;
+ color_p.green = SWFDEC_COLOR_G (color) << 8;
+ color_p.blue = SWFDEC_COLOR_B...
2007 Aug 01
0
9 commits - doc/swfdec-sections.txt libswfdec/swfdec_as_frame.c libswfdec/swfdec_loader.c libswfdec/swfdec_loader.h libswfdec/swfdec_loader_internal.h libswfdec/swfdec_loadertarget.c libswfdec/swfdec_loadertarget.h libswfdec/swfdec_movie.c
...direct_hash, g_direct_equal);
player->actions = swfdec_ring_buffer_new_for_type (SwfdecPlayerAction, 16);
+ player->external_actions = swfdec_ring_buffer_new_for_type (SwfdecPlayerAction, 8);
player->cache = swfdec_cache_new (50 * 1024 * 1024); /* 100 MB */
player->bgcolor = SWFDEC_COLOR_COMBINE (0xFF, 0xFF, 0xFF, 0xFF);
diff --git a/libswfdec/swfdec_player_internal.h b/libswfdec/swfdec_player_internal.h
index 84946ff..cc9a384 100644
--- a/libswfdec/swfdec_player_internal.h
+++ b/libswfdec/swfdec_player_internal.h
@@ -106,6 +106,8 @@ struct _SwfdecPlayer
/* iterating */
GList * mo...
2007 Oct 17
0
6 commits - libswfdec/swfdec_as_strings.c libswfdec/swfdec_movie.c libswfdec/swfdec_movie.h libswfdec/swfdec_text_field.c libswfdec/swfdec_text_field.h libswfdec/swfdec_text_field_movie_as.c libswfdec/swfdec_text_field_movie.c
...++ b/libswfdec/swfdec_text_field.c
@@ -83,7 +83,6 @@ static void
swfdec_text_field_init (SwfdecTextField * text)
{
text->scroll = 1;
- text->max_length = G_MAXUINT;
}
SwfdecLayout *
@@ -434,7 +433,9 @@ tag_func_define_edit_text (SwfdecSwfDecoder * s, guint tag)
text->color = SWFDEC_COLOR_COMBINE (255, 255, 255, 255);
}
if (has_max_length) {
- text->max_length = swfdec_bits_get_u16 (b);
+ text->max_chars = swfdec_bits_get_u16 (b);
+ } else {
+ text->max_chars = 0;
}
if (has_layout) {
guint align = swfdec_bits_get_u8 (b);
diff --git a/libswfdec/swfdec_text...
2007 Oct 25
0
6 commits - libswfdec/swfdec_as_interpret.c libswfdec/swfdec_event.c libswfdec/swfdec_event.h libswfdec/swfdec_movie.c libswfdec/swfdec_movie.h libswfdec/swfdec_player.c libswfdec/swfdec_player_internal.h libswfdec/swfdec_resource.c
...UEUES; i++) {
+ player->actions[i] = swfdec_ring_buffer_new_for_type (SwfdecPlayerAction, 16);
+ }
+ player->external_actions = swfdec_ring_buffer_new_for_type (SwfdecPlayerExternalAction, 8);
player->cache = swfdec_cache_new (50 * 1024 * 1024); /* 100 MB */
player->bgcolor = SWFDEC_COLOR_COMBINE (0xFF, 0xFF, 0xFF, 0xFF);
@@ -1529,8 +1584,6 @@ swfdec_player_init (SwfdecPlayer *player)
player->mouse_visible = TRUE;
player->mouse_cursor = SWFDEC_MOUSE_CURSOR_NORMAL;
player->iterate_timeout.callback = swfdec_player_iterate;
- player->init_queue = g_queue_new ();
- play...
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
...player.c
+++ b/libswfdec/swfdec_player.c
@@ -1431,7 +1431,7 @@ swfdec_player_get_audio (SwfdecPlayer *
*
* Returns: the background color as an ARGB value
**/
-unsigned int
+guint
swfdec_player_get_background_color (SwfdecPlayer *player)
{
g_return_val_if_fail (SWFDEC_IS_PLAYER (player), SWFDEC_COLOR_COMBINE (0xFF, 0xFF, 0xFF, 0xFF));
@@ -1448,7 +1448,7 @@ swfdec_player_get_background_color (Swfd
* value to 0. To get a black beackground, use 0xFF000000.
**/
void
-swfdec_player_set_background_color (SwfdecPlayer *player, unsigned int color)
+swfdec_player_set_background_color (SwfdecPlayer *player,...