mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-11 05:07:00 -04:00
Removed last of the BeginDrawing/EndDrawing calls;
Added english_number_ordinal script function; Working on symbols with a different aspect ratio (i.e. wider/smaller symbols) git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@558 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -27,10 +27,13 @@ void SymbolValueViewer::draw(RotatedDC& dc) {
|
||||
try {
|
||||
// load symbol
|
||||
SymbolP symbol = getSet().readFile<SymbolP>(value().filename);
|
||||
// aspect ratio
|
||||
double ar = symbol->aspectRatio();
|
||||
ar = min(style().max_aspect_ratio, max(style().min_aspect_ratio, ar));
|
||||
// render and filter variations
|
||||
FOR_EACH(variation, style().variations) {
|
||||
Image img = render_symbol(symbol, *variation->filter, variation->border_radius);
|
||||
Image resampled((int) wh, (int) wh, false);
|
||||
Image img = render_symbol(symbol, *variation->filter, variation->border_radius, 100 * ar, 100);
|
||||
Image resampled((int) (wh * ar), (int) wh, false);
|
||||
resample(img, resampled);
|
||||
symbols.push_back(Bitmap(resampled));
|
||||
}
|
||||
@@ -39,9 +42,11 @@ void SymbolValueViewer::draw(RotatedDC& dc) {
|
||||
}
|
||||
}
|
||||
// draw image, if any
|
||||
int x = 0;
|
||||
for (size_t i = 0 ; i < symbols.size() ; ++i) {
|
||||
// todo : labels?
|
||||
dc.DrawBitmap(symbols[i], style().getPos() + RealSize(i * (wh + 2), 0));
|
||||
dc.DrawBitmap(symbols[i], style().getPos() + RealSize(x, 0));
|
||||
x += symbols[i].GetWidth() + 2;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user