mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
New rotation system (see forum thread).
Major changes: - when rotating, the top left corner of the rectangle stays in place. - ValueViewers get a dc that is pre-rotated/translated for them, i.e. (0,0) is the top-left of the viewer (with ValueViewer::getRotation). - moved 'angle' from individual Styles to the Style base class. - any rotation angle is now possible. angle is still an int for now. This warrants a version bump git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@782 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -20,8 +20,8 @@ DECLARE_TYPEOF_COLLECTION(SymbolVariationP);
|
||||
void SymbolValueViewer::draw(RotatedDC& dc) {
|
||||
drawFieldBorder(dc);
|
||||
// draw checker background
|
||||
draw_checker(dc, style().getRect());
|
||||
double wh = min(style().width, style().height);
|
||||
draw_checker(dc, style().getInternalRect());
|
||||
double wh = min(dc.getWidth(), dc.getHeight());
|
||||
// try to load symbol
|
||||
if (symbols.empty() && !value().filename.empty()) {
|
||||
try {
|
||||
@@ -45,7 +45,7 @@ void SymbolValueViewer::draw(RotatedDC& dc) {
|
||||
int x = 0;
|
||||
for (size_t i = 0 ; i < symbols.size() ; ++i) {
|
||||
// todo : labels?
|
||||
dc.DrawBitmap(symbols[i], style().getPos() + RealSize(x, 0));
|
||||
dc.DrawBitmap(symbols[i], RealPoint(x, 0));
|
||||
x += symbols[i].GetWidth() + 2;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user