aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJorge Arellano Cid <jcid@dillo.org>2009-02-08 18:22:24 -0300
committerJorge Arellano Cid <jcid@dillo.org>2009-02-08 18:22:24 -0300
commit3c7fc8d4e2d5bee18291b05f71a409e5c136c0ed (patch)
tree00146bf821b91fc5db9a1c2273556eef54881b61
parentdf4f62fd3b9c044cdeb4e3c4d4b860ac2b5b725c (diff)
parent87f10ba24d97f5f3ead5404030d4c5fdf44e3dcd (diff)
merge
-rw-r--r--dw/textblock.cc39
1 files changed, 21 insertions, 18 deletions
diff --git a/dw/textblock.cc b/dw/textblock.cc
index 2f242f86..62d6d4ce 100644
--- a/dw/textblock.cc
+++ b/dw/textblock.cc
@@ -1299,20 +1299,22 @@ void Textblock::drawLine (Line *line, core::View *view, core::Rectangle *area)
/* strike-through */
if (word->style->textDecoration
& core::style::TEXT_DECORATION_LINE_THROUGH)
- view->drawLine (color, core::style::Color::SHADING_NORMAL,
- xWorld,
- yWorldBase - word->size.ascent / 2 + diff,
- xWorld + word->size.width - 1,
- yWorldBase - word->size.ascent / 2 + diff);
+ view->drawRectangle (
+ color, core::style::Color::SHADING_NORMAL,
+ true, xWorld,
+ yWorldBase + (diff + word->size.descent - word->size.ascent)/2,
+ word->size.width,
+ 1 + word->style->font->xHeight / 10);
if (wordIndex + 1 < line->lastWord &&
(word->spaceStyle->textDecoration
& core::style::TEXT_DECORATION_LINE_THROUGH))
- view->drawLine (word->spaceStyle->color,
- core::style::Color::SHADING_NORMAL,
- xWorld + word->size.width,
- yWorldBase - word->size.ascent / 2 + diff,
- xWorld + word->size.width + word->effSpace - 1,
- yWorldBase - word->size.ascent / 2 + diff);
+ view->drawRectangle (
+ word->spaceStyle->color,
+ core::style::Color::SHADING_NORMAL,
+ true, xWorld + word->size.width,
+ yWorldBase + (diff + word->size.descent - word->size.ascent)/2,
+ word->effSpace,
+ 1 + word->style->font->xHeight / 10);
for (layer = 0; layer < core::HIGHLIGHT_NUM_LAYERS; layer++) {
if (hlStart[layer].index <= wordIndex &&
@@ -1373,13 +1375,14 @@ void Textblock::drawLine (Line *line, core::View *view, core::Rectangle *area)
yWorldBase + 1 + diff);
if (word->style->textDecoration
& core::style::TEXT_DECORATION_LINE_THROUGH)
- view->drawLine (color,
- core::style::Color::SHADING_INVERSE,
- startHL,
- yWorldBase - word->size.ascent / 2 + diff,
- startHL + widthHL - 1,
- yWorldBase - word->size.ascent / 2
- + diff);
+ view->drawRectangle (
+ color,
+ core::style::Color::SHADING_INVERSE,
+ true, startHL,
+ yWorldBase + (diff + word->size.descent -
+ word->size.ascent) / 2,
+ widthHL,
+ 1 + word->style->font->xHeight / 10);
}
}
}