summaryrefslogtreecommitdiffstats
path: root/libass
diff options
context:
space:
mode:
authoreugeni <eugeni@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-08-27 22:15:46 +0000
committereugeni <eugeni@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-08-27 22:15:46 +0000
commit6b65c7c8710f81f98f5c558b1ecb322f678f53c1 (patch)
tree93a9c29861facce0ffa8f85d5fbcb9138151f453 /libass
parenta812aee1e687dedcfea1031ee63ccc815eae7b51 (diff)
downloadmpv-6b65c7c8710f81f98f5c558b1ecb322f678f53c1.tar.bz2
mpv-6b65c7c8710f81f98f5c558b1ecb322f678f53c1.tar.xz
Cosmetics: fix indentation after r19562.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19563 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libass')
-rw-r--r--libass/ass_render.c58
1 files changed, 29 insertions, 29 deletions
diff --git a/libass/ass_render.c b/libass/ass_render.c
index 8af19024e8..fc40b51439 100644
--- a/libass/ass_render.c
+++ b/libass/ass_render.c
@@ -1628,38 +1628,38 @@ int ass_render_event(ass_event_t* event)
MarginV = (event->MarginV) ? event->MarginV : style->MarginV;
if (render_context.evt_type != EVENT_HSCROLL) {
- // calculate max length of a line
- max_text_width = x2scr(frame_context.track->PlayResX - MarginR) - x2scr(MarginL);
-
- // rearrange text in several lines
- wrap_lines_smart(max_text_width);
-
- // align text
- last_break = -1;
- for (i = 1; i < text_info.length + 1; ++i) { // (text_info.length + 1) is the end of the last line
- if ((i == text_info.length) || text_info.glyphs[i].linebreak) {
- int width, shift;
- glyph_info_t* first_glyph = text_info.glyphs + last_break + 1;
- glyph_info_t* last_glyph = text_info.glyphs + i - 1;
-
- while ((last_glyph >= first_glyph) && ((last_glyph->symbol == '\n') || (last_glyph->symbol == 0)))
- last_glyph --;
-
- width = last_glyph->pos.x + last_glyph->bbox.xMax - first_glyph->pos.x - first_glyph->bbox.xMin;
- shift = - first_glyph->bbox.xMin; // now text line starts exactly at 0 (left margin)
- if (halign == HALIGN_LEFT) { // left aligned, no action
- } else if (halign == HALIGN_RIGHT) { // right aligned
- shift = max_text_width - width;
- } else if (halign == HALIGN_CENTER) { // centered
- shift = (max_text_width - width) / 2;
- }
- for (j = last_break + 1; j < i; ++j) {
- text_info.glyphs[j].pos.x += shift;
+ // calculate max length of a line
+ max_text_width = x2scr(frame_context.track->PlayResX - MarginR) - x2scr(MarginL);
+
+ // rearrange text in several lines
+ wrap_lines_smart(max_text_width);
+
+ // align text
+ last_break = -1;
+ for (i = 1; i < text_info.length + 1; ++i) { // (text_info.length + 1) is the end of the last line
+ if ((i == text_info.length) || text_info.glyphs[i].linebreak) {
+ int width, shift;
+ glyph_info_t* first_glyph = text_info.glyphs + last_break + 1;
+ glyph_info_t* last_glyph = text_info.glyphs + i - 1;
+
+ while ((last_glyph >= first_glyph) && ((last_glyph->symbol == '\n') || (last_glyph->symbol == 0)))
+ last_glyph --;
+
+ width = last_glyph->pos.x + last_glyph->bbox.xMax - first_glyph->pos.x - first_glyph->bbox.xMin;
+ shift = - first_glyph->bbox.xMin; // now text line starts exactly at 0 (left margin)
+ if (halign == HALIGN_LEFT) { // left aligned, no action
+ } else if (halign == HALIGN_RIGHT) { // right aligned
+ shift = max_text_width - width;
+ } else if (halign == HALIGN_CENTER) { // centered
+ shift = (max_text_width - width) / 2;
+ }
+ for (j = last_break + 1; j < i; ++j) {
+ text_info.glyphs[j].pos.x += shift;
+ }
+ last_break = i - 1;
}
- last_break = i - 1;
}
}
- }
// determing text bounding box
compute_string_bbox(&text_info, &bbox);