Moved mask to Style and mask related drawing to ValueViewer.

Used the same mask also for TextStyles.
To keep the text selectable (since the mask is now also used for containsPoint), the future sight cost masks needed to be updated.

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1183 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2008-08-30 23:49:12 +00:00
parent a183ecc9a6
commit a2af3211a4
28 changed files with 105 additions and 214 deletions
+2 -2
View File
@@ -661,10 +661,10 @@ bool TextViewer::prepareLinesScale(RotatedDC& dc, const vector<CharInfo>& chars,
}
double TextViewer::lineLeft(RotatedDC& dc, const TextStyle& style, double y) const {
return style.mask.rowLeft(y, dc.getInternalSize()) + style.padding_left;
return style.mask.getFromCache().rowLeft(y, dc.getInternalSize()) + style.padding_left;
}
double TextViewer::lineRight(RotatedDC& dc, const TextStyle& style, double y) const {
return style.mask.rowRight(y, dc.getInternalSize()) - style.padding_right;
return style.mask.getFromCache().rowRight(y, dc.getInternalSize()) - style.padding_right;
}