search for: cairo_t

Displaying 20 results from an estimated 56 matches for "cairo_t".

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
...visible line, even if it doesn't 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_generat...
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
...lines that are not horizontally inside invalid area diff --git 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);...
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
...rties compatibility fixes diff --git a/libswfdec/swfdec_text_field_movie.c b/libswfdec/swfdec_text_field_movie.c index 4a91792..5cfc7dd 100644 --- a/libswfdec/swfdec_text_field_movie.c +++ b/libswfdec/swfdec_text_field_movie.c @@ -679,7 +679,8 @@ swfdec_text_field_movie_render (SwfdecMovie *movie, cairo_t *cr, } void -swfdec_text_field_movie_update_scroll (SwfdecTextFieldMovie *text) +swfdec_text_field_movie_update_scroll (SwfdecTextFieldMovie *text, + gboolean check_limits) { SwfdecLayout *layouts; int i, num, y, visible, all, height; @@ -729,11 +730,16 @@ swfdec_text_field_movie_upda...
2007 Oct 14
1
libswfdec/swfdec_text_field.c
...TextField lines even when wordWrap is off diff --git a/libswfdec/swfdec_text_field.c b/libswfdec/swfdec_text_field.c index 2f38d85..96284a8 100644 --- a/libswfdec/swfdec_text_field.c +++ b/libswfdec/swfdec_text_field.c @@ -150,6 +150,8 @@ swfdec_text_field_generate_layouts (SwfdecTextField *text, cairo_t *cr, if (text->word_wrap) { pango_layout_set_wrap (playout, PANGO_WRAP_WORD_CHAR); pango_layout_set_width (playout, width * PANGO_SCALE); + pango_layout_set_alignment (playout, block->align); + pango_layout_set_justify (playout, block->justify); } else { pango_layout_se...
2007 Nov 07
0
2 commits - libswfdec/swfdec_resource.c libswfdec/swfdec_text_field_movie.c
...+ text->input->str[start_index + length - 1] == '\r') { + paragraph->newline = TRUE; + } else { + paragraph->newline = FALSE; + } paragraph->blocks = NULL; paragraph->attrs = NULL; @@ -748,7 +753,8 @@ swfdec_text_field_movie_render (SwfdecMovie *movie, cairo_t *cr, first = TRUE; linenum = 0; - x = movie->original_extents.x0 + EXTRA_MARGIN + text_movie->hscroll; + x = movie->original_extents.x0 + EXTRA_MARGIN + + MIN (text_movie->hscroll, text_movie->hscroll_max); y = movie->original_extents.y0 + EXTRA_MARGIN; for (i...
2006 Nov 12
1
[PATCH] Annotate shapes, text and dbus support
...DISPLAY_OPTION_LINE_WIDTH 6 +#define ANNO_DISPLAY_OPTION_STROKE_WIDTH 7 +#define ANNO_DISPLAY_OPTION_TOOL 8 +#define ANNO_DISPLAY_OPTION_NUM 9 typedef struct _AnnoDisplay { int screenPrivateIndex; @@ -68,6 +92,12 @@ cairo_surface_t *surface; cairo_t *cairo; Bool content; + + double startX; + double startY; + + Bool eraseMode; + } AnnoScreen; #define GET_ANNO_DISPLAY(d) \ @@ -85,6 +115,8 @@ #define NUM_OPTIONS(s) (sizeof ((s)->opt) / sizeof (CompOption)) +#define NUM_TOOLS (sizeof (tools) / sizeo...
2007 Oct 17
0
libswfdec/swfdec_text_field.c libswfdec/swfdec_text_field.h libswfdec/swfdec_text_field_movie.c
....h" #endif -#include <pango/pangocairo.h> #include <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 !...
2007 Nov 04
0
7 commits - libswfdec/swfdec_text_field_movie.c libswfdec/swfdec_text_field_movie.h libswfdec/swfdec_text_field_movie_html.c
...angoLayoutIter not freed) diff --git a/libswfdec/swfdec_text_field_movie.c b/libswfdec/swfdec_text_field_movie.c index b130da2..36b3596 100644 --- a/libswfdec/swfdec_text_field_movie.c +++ b/libswfdec/swfdec_text_field_movie.c @@ -789,6 +789,8 @@ swfdec_text_field_movie_render (SwfdecMovie *movie, cairo_t *cr, y += layout->height - skipped; skipped = 0; } + + pango_layout_iter_free (iter_line); } swfdec_text_field_movie_free_layouts (layouts); commit 5f3abe827c99cca6b067b90c0ee88eddfb8c9242 Author: Pekka Lampila <pekka.lampila at iki.fi> Date: Sat Nov 3 19:09...
2007 Apr 07
3
GWD button drawing prob-- any Cairo pro have insights?
...273/m1kecook/Compiz/?action=view&current=gwd-button-prob.flv The following patch seems to work around the problem (but only if I set the alpha less than 1.0): --- gtk/window-decorator/gtk-window-decorator.c +++ gtk/window-decorator/gtk-window-decorator.c @@ -943,7 +943,7 @@ button_state_paint (cairo_t *cr, cairo_stroke_preserve (cr); if (state & IN_EVENT_WINDOW) - cairo_set_source_rgb (cr, 1.0, 1.0, 1.0); + cairo_set_source_rgba (cr, 1.0, 1.0, 1.0, 0.99); else cairo_set_source_rgba (cr, color->r, color->g, color->b, 0.95);...
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
...ern.c index 8a2bda7..5efac10 100644 --- a/libswfdec/swfdec_pattern.c +++ b/libswfdec/swfdec_pattern.c @@ -74,24 +74,24 @@ struct _SwfdecColorPatternClass G_DEFINE_TYPE (SwfdecColorPattern, swfdec_color_pattern, SWFDEC_TYPE_PATTERN); -static void -swfdec_color_pattern_paint (SwfdecPattern *pat, cairo_t *cr, const cairo_path_t *path, +static cairo_pattern_t * +swfdec_color_pattern_get_pattern (SwfdecPattern *pat, const SwfdecColorTransform *trans, guint ratio) { SwfdecColorPattern *pattern = SWFDEC_COLOR_PATTERN (pat); SwfdecColor color; - cairo_append_path (cr, (cairo_path_t *) pa...
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
2010 Jul 20
1
Building rattle on Solaris 10u7 X86
...;cairoDevice.h", line 7: cannot find include file: <cairo-pdf.h> "cairoDevice.h", line 8: cannot find include file: <cairo-ps.h> "cairoDevice.h", line 9: cannot find include file: <cairo-svg.h> "cairoDevice.h", line 38: syntax error before or at: cairo_t "cairoDevice.c", line 71: improper member use: pixmap "cairoDevice.c", line 72: improper member use: pixmap "cairoDevice.c", line 74: improper member use: drawing "cairoDevice.c", line 75: improper member use: drawing "cairoDevice.c", line 77: impro...
2007 Oct 14
0
5 commits - libswfdec/swfdec_html_parser.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_xml.c libswfdec/swfdec_xml.h
...in TextField that goes over the left edge diff --git a/libswfdec/swfdec_text_field.c b/libswfdec/swfdec_text_field.c index b6a97a3..fabddb2 100644 --- a/libswfdec/swfdec_text_field.c +++ b/libswfdec/swfdec_text_field.c @@ -138,8 +138,11 @@ swfdec_text_field_generate_layouts (SwfdecTextField *text, cairo_t *cr, block->right_margin - block->block_indent; if (block->index_ == 0 && paragraphs[i].indent < 0) { - layout->render_offset_x += paragraphs[i].indent / PANGO_SCALE; - width += -paragraphs[i].indent / PANGO_SCALE; + // limit negative indent to not go over leftMarg...
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
..._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/libswfde...
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
...int * width, int * height); +unsigned int swfdec_player_get_background_color + (SwfdecPlayer * player); +void swfdec_player_set_background_color + (SwfdecPlayer * player, + unsigned int color); void swfdec_player_render (SwfdecPlayer * player, cairo_t * cr, diff --git a/libswfdec/swfdec_player_internal.h b/libswfdec/swfdec_player_internal.h index 2d2c6f9..be548b4 100644 --- a/libswfdec/swfdec_player_internal.h +++ b/libswfdec/swfdec_player_internal.h @@ -1,5 +1,5 @@ /* Swfdec - * Copyright (C) 2006 Benjamin Otte <otte@gnome.org> + * Copyr...
2007 Nov 01
0
2 commits - libswfdec/swfdec_text_field_movie.c test/image
...order or background color diff --git a/libswfdec/swfdec_text_field_movie.c b/libswfdec/swfdec_text_field_movie.c index 2780b7e..979580e 100644 --- a/libswfdec/swfdec_text_field_movie.c +++ b/libswfdec/swfdec_text_field_movie.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_s...
2010 Jan 17
1
screenshot of swf file
...ve.com/swfdec at lists.freedesktop.org/msg00821.html. #include <stdlib.h> #include <stdio.h> #include <swfdec/swfdec.h> #include <cairo.h> void swfdec_player_save (SwfdecPlayer *player, guint width, guint height, const char *filename) { cairo_surface_t *surface; cairo_t *cr; surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, width, height); cr = cairo_create (surface); swfdec_player_render (player, cr); cairo_destroy (cr); cairo_surface_write_to_png (surface, filename); cairo_surface_destroy (surface); } int main(int argc, c...
2007 Dec 05
0
4 commits - libswfdec/swfdec_as_object.c libswfdec/swfdec_movie.c libswfdec/swfdec_policy_loader.c libswfdec/swfdec_text_field_movie.c libswfdec/swfdec_text_format.c
...cairo_move_to always diff --git a/libswfdec/swfdec_text_field_movie.c b/libswfdec/swfdec_text_field_movie.c index 1f88654..db37d98 100644 --- a/libswfdec/swfdec_text_field_movie.c +++ b/libswfdec/swfdec_text_field_movie.c @@ -807,8 +807,6 @@ swfdec_text_field_movie_render (SwfdecMovie *movie, cairo_t *cr, cairo_fill (cr); } - cairo_move_to (cr, x, y); - skipped = 0; do { if (++linenum < MIN (text_movie->scroll, text_movie->scroll_max)) @@ -833,21 +831,18 @@ swfdec_text_field_movie_render (SwfdecMovie *movie, cairo_t *cr, x + layout->offset_x + r...
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
...dth; /* width of line */ - SwfdecColor end_color; /* color to paint with */ -}; - -struct _SwfdecStrokePatternClass -{ - SwfdecPatternClass pattern_class; -}; - -G_DEFINE_TYPE (SwfdecStrokePattern, swfdec_stroke_pattern, SWFDEC_TYPE_PATTERN); - -static void -swfdec_pattern_append_path_snapped (cairo_t *cr, const cairo_path_t *path) -{ - cairo_path_data_t *data; - double x, y; - int i; - - data = path->data; - for (i = 0; i < path->num_data; i++) { - switch (data[i].header.type) { - case CAIRO_PATH_MOVE_TO: - i++; - x = data[i].point.x; - y = data[i].point.y; - cairo_user_to...
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
...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) + return 0; + +...