Implemented export functions;

Choice viewer uses font when rendering text.

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@433 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2007-06-25 20:40:22 +00:00
parent 5c6cb41458
commit 11b8242816
5 changed files with 84 additions and 26 deletions
+9 -3
View File
@@ -57,9 +57,15 @@ void ChoiceValueViewer::draw(RotatedDC& dc) {
}
if (style().render_style & RENDER_TEXT) {
// draw text
dc.DrawText(tr(*viewer.stylesheet, value().value(), capitalize(value().value())),
align_in_rect(ALIGN_MIDDLE_LEFT, RealSize(0, dc.GetCharHeight()), style().getRect()) + RealSize(margin, 0)
);
dc.SetFont(style().font, 1.0);
String text = tr(*viewer.stylesheet, value().value(), capitalize(value().value()));
RealPoint pos = align_in_rect(ALIGN_MIDDLE_LEFT, RealSize(0, dc.GetCharHeight()), style().getRect()) + RealSize(margin, 0);
if (style().font.hasShadow()) {
dc.SetTextForeground(style().font.shadow_color);
dc.DrawText(text, pos + style().font.shadow_displacement);
}
dc.SetTextForeground(style().font.color());
dc.DrawText(text, pos);
}
}