search for: render_offset_x

Displaying 7 results from an estimated 7 matches for "render_offset_x".

2007 Oct 17
0
libswfdec/swfdec_text_field.c libswfdec/swfdec_text_field.h libswfdec/swfdec_text_field_movie.c
...dex_; - } else { - length = paragraphs[i].text_length - block->index_; - } - - if (skip > length) { - skip -= length; - continue; - } - - // create layout - playout = layout.layout = pango_cairo_create_layout (cr); - - // set rendering position - layout.render_offset_x = block->left_margin + block->block_indent; - width = SWFDEC_GRAPHIC (text)->extents.x1 - - SWFDEC_GRAPHIC (text)->extents.x0 - block->left_margin - - block->right_margin - block->block_indent; - - if (block->index_ == 0 && paragraphs[i].indent < 0) { -...
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
..., NULL, &rect); pango_extents_to_pixels (NULL, &rect); - if (y + rect.y + rect.height < limit.y0) - continue; - if (y + rect.y > limit.y1 || y + rect.y + rect.height > SWFDEC_GRAPHIC (text)->extents.y1) break; - cairo_rel_move_to (cr, layout->render_offset_x, + if (y + rect.y + rect.height < limit.y0 || + x + layout->render_offset_x + rect.x > limit.x1 || + x + layout->render_offset_x + rect.x + rect.width < limit.x0) + continue; + + cairo_rel_move_to (cr, layout->render_offset_x + rect.x, pango_layout_iter_get_basel...
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
...y; - if (y + rect.y > limit.y1 || + if (!first && y + rect.y + rect.height > SWFDEC_GRAPHIC (text)->extents.y1) break; + first = FALSE; + + if (y + rect.y > limit.y1) + break; + if (y + rect.y + rect.height < limit.y0 || x + layout->render_offset_x + rect.x > limit.x1 || x + layout->render_offset_x + rect.x + rect.width < limit.x0) commit 971e4423bd5d8656d1be8b8d6ba70a15a325a1d6 Author: Pekka Lampila <pekka.lampila at iki.fi> Date: Mon Oct 15 11:07:28 2007 +0300 More TextField code cleanup diff --git a/libswfdec/swf...
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
...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 leftMargin + blockIndent + int indent = MAX (paragraphs[i].indent / PANGO_SCALE, + -(block->left_margin + block->block_indent)); + layout->render_offset_x +=...
2007 Oct 14
1
libswfdec/swfdec_text_field.c
...ts (SwfdecTextField *text, cairo_t *cr, } else { + if (block->align != PANGO_ALIGN_LEFT) { + int line_width; + pango_layout_get_pixel_size (playout, &line_width, 0); + if (line_width < width) { + if (block->align == PANGO_ALIGN_RIGHT) { + layout->render_offset_x += width - line_width; + } else if (block->align == PANGO_ALIGN_CENTER) { + layout->render_offset_x += (width - line_width) / 2; + } else { + g_assert_not_reached (); + } + } + } + skip = 0; }
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
...EXT_FIELD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SWFDEC_TYPE_TEXT_FIELD, SwfdecTextField)) #define SWFDEC_TEXT_FIELD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SWFDEC_TYPE_TEXT_FIELD, SwfdecTextFieldClass)) -typedef struct { - PangoLayout * layout; - int render_offset_x; - int height; - int width; -} SwfdecLayout; - -typedef struct { - guint index_; - - PangoAlignment align; - gboolean justify; - int leading; - int block_indent; - int left_margin; - int right_margin; - PangoTabArray * tab_stops; -} SwfdecBlock; - -typedef struct { - const...
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
...*block; block = (SwfdecBlock *)iter->data; if (iter->next != NULL) { @@ -415,7 +405,7 @@ swfdec_text_field_movie_get_layouts (SwfdecTextFieldMovie *text, int *num, playout = layout.layout = pango_cairo_create_layout (cr); // set rendering position - layout.render_offset_x = block->left_margin + block->block_indent; + layout.offset_x = block->left_margin + block->block_indent; width = SWFDEC_MOVIE (text)->original_extents.x1 - SWFDEC_MOVIE (text)->original_extents.x0 - block->left_margin - block->right_margin - block->block_...