Displaying 11 results from an estimated 11 matches for "pango_scale".
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
...out *playout)
+{
+ int baseline;
+ PangoLayoutIter *iter;
+
+ g_return_val_if_fail (playout != NULL, 0);
+
+ iter = pango_layout_get_iter (playout);
+ while (!pango_layout_iter_at_last_line (iter))
+ pango_layout_iter_next_line (iter);
+
+ baseline = pango_layout_iter_get_baseline (iter) / PANGO_SCALE;
+
+ pango_layout_iter_free (iter);
+
+ return baseline;
+}
+
+static void
+swfdec_text_field_movie_attr_list_get_ascent_descent (PangoAttrList *attr_list,
+ guint pos, int *ascent, int *descent)
+{
+ PangoAttrIterator *attr_iter;
+ PangoFontDescription *desc;
+ PangoFontMap *fontmap;
+ Pa...
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
...ect.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_baseline (iter_line) / PANGO_SCALE);
line = pango_layout_iter_get_line_readonly (iter_line);
pango_cairo_show_layout_line (cr, line);
- cairo_rel_move_to (cr, -layout->render_offset_x,
+ cairo_rel_move_to (cr, -(layout->render_offset_x + rect.x),
-pango_layout_iter_get_baseline (iter_line) / PANGO_S...
2007 Oct 17
0
libswfdec/swfdec_text_field.c libswfdec/swfdec_text_field.h libswfdec/swfdec_text_field_movie.c
...WFDEC_GRAPHIC (text)->extents.x0 - block->left_margin -
- block->right_margin - block->block_indent;
-
- if (block->index_ == 0 && paragraphs[i].indent < 0) {
- // 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 += indent;
- width += -indent;
- }
-
- if (text->word_wrap) {
- pango_layout_set_wrap (playout, PANGO_WRAP_WORD_CHAR);
- pango_layout_set_width (playout, width * PANGO_SCALE);
- pango_layout_set_alignme...
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
...dec/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 += indent;
+ width += -indent;
}...
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
...rect.width < limit.x0)
continue;
+ cairo_move_to (cr, x, y);
+
if (pango_layout_iter_at_last_line (iter_line))
cairo_rel_move_to (cr, 0, layout->last_line_offset_y);
cairo_rel_move_to (cr, layout->offset_x + rect.x,
pango_layout_iter_get_baseline (iter_line) / PANGO_SCALE - skipped);
+
line = pango_layout_iter_get_line_readonly (iter_line);
pango_cairo_show_layout_line (cr, line);
- cairo_rel_move_to (cr, -(layout->offset_x + rect.x),
- -(pango_layout_iter_get_baseline (iter_line) / PANGO_SCALE -
- skipped));
- if (pango_layout_iter_...
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
...text)->extents.x0 - block->left_margin -
block->right_margin - block->block_indent;
@@ -143,7 +140,7 @@ swfdec_text_field_generate_layouts (SwfdecTextField *text, cairo_t *cr,
// 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 += indent;
+ layout.render_offset_x += indent;
width += -indent;
}
@@ -240,9 +237,9 @@ swfdec_text_field_generate_layouts (SwfdecTextField *text, cairo_t *cr,
pango_layout_get_pixel_size (playout,...
2007 Oct 14
1
libswfdec/swfdec_text_field.c
...44
--- 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_set_width (playout, -1);
}
@@ -163,8 +165,6 @@ swfdec_text_field_generate_layouts (SwfdecTextField *text, cairo_t *cr,
}
// set b...
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
...387,7 +427,7 @@ swfdec_text_field_movie_generate_layouts (SwfdecTextField *text, cairo_t *cr,
width += -indent;
}
- if (text->word_wrap) {
+ if (text->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);
@@ -458,7 +498,7 @@ swfdec_text_field_movie_generate_layouts (SwfdecTextField *text, cairo_t *cr,
paragraphs[i].text + block->index_ + skip,
paragraphs[i].text_length - block->index_ - skip);
- if (iter->next != NULL...
2007 Oct 13
0
5 commits - libswfdec/swfdec_html_parser.c libswfdec/swfdec_text_field.c libswfdec/swfdec_text_field_movie_as.c libswfdec/swfdec_text_field_movie.c libswfdec/swfdec_xml.c test/trace
..._movie_generate_paragra
attr_letter_spacing->end_index = index_ - start_index;
swfdec_text_paragraph_add_attribute (paragraph, attr_letter_spacing);
- // FIXME: correct scaling?
attr_letter_spacing = pango_attr_letter_spacing_new (
format->letter_spacing * 20 * PANGO_SCALE);
attr_letter_spacing->start_index = index_ - start_index;
diff --git a/libswfdec/swfdec_text_field_movie_as.c b/libswfdec/swfdec_text_field_movie_as.c
index a4ecd5c..8d7389a 100644
--- a/libswfdec/swfdec_text_field_movie_as.c
+++ b/libswfdec/swfdec_text_field_movie_as.c
@@ -437,6 +437,9...
2007 Nov 08
0
configure.ac libswfdec-gtk/swfdec_gtk_widget.c libswfdec-gtk/swfdec_playback_alsa.c libswfdec/swfdec_as_date.c libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_types.c libswfdec/swfdec_audio_flv.c libswfdec/swfdec_audio_flv.h
...xt_field_movie.c
@@ -102,6 +102,8 @@ swfdec_text_paragraph_add_block (SwfdecParagraph *paragraph, int index_,
block->align = PANGO_ALIGN_LEFT;
block->justify = TRUE;
break;
+ default:
+ g_assert_not_reached ();
}
block->leading = format->leading * 20 * PANGO_SCALE;
block->block_indent = format->block_indent * 20;
@@ -1007,8 +1009,9 @@ swfdec_text_field_movie_auto_size (SwfdecTextFieldMovie *text)
graphic->extents.x0 += floor (diff / 2.0);
graphic->extents.x1 = graphic->extents.x0 + width;
break;
+ case SWFDEC_AUTO_SIZE_NONE:...
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
...= start_index;
+ ((SwfdecFormatIndex *)(iter->next->data))->index_ <= start_index;
iter = iter->next);
index_ = start_index;
@@ -140,7 +138,7 @@ swfdec_text_field_movie_generate_paragraph (SwfdecTextFieldMovie *text,
paragraph->indent = format->indent * 20 * PANGO_SCALE;
// Add new block
- swfdec_text_paragraph_add_block_attributes (paragraph, 0, format);
+ swfdec_text_paragraph_add_block (paragraph, 0, format);
// Open attributes
attr_bold = pango_attr_weight_new (
@@ -173,11 +171,11 @@ swfdec_text_field_movie_generate_paragraph (SwfdecTextFieldMov...