mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 21:06:59 -04:00
Changed all resources to .png files;
Added 'snap to grid' to symbol editor git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@207 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -220,6 +220,10 @@ SymbolP import_symbol(Image& img) {
|
||||
if (is_mse1_symbol(img)) {
|
||||
Image img2 = img.GetSubImage(wxRect(20,0,40,40));
|
||||
symbol = image_to_symbol(img2);
|
||||
} else if (img.GetWidth() > 100 || img.GetHeight() > 100) {
|
||||
// 100x100 ought to be enough, we trow out most afterwards data anyway
|
||||
Image resampled = img.Rescale(100,100);
|
||||
symbol = image_to_symbol(resampled);
|
||||
} else {
|
||||
symbol = image_to_symbol(img);
|
||||
}
|
||||
@@ -387,7 +391,7 @@ void remove_point(SymbolPart& part, int i);
|
||||
* stop when the cost becomes too high
|
||||
*/
|
||||
void remove_points(SymbolPart& part) {
|
||||
const double treshold = 0.002; // maximum cost
|
||||
const double treshold = 0.0002; // maximum cost
|
||||
while (true) {
|
||||
// Find the point with the lowest cost of removal
|
||||
int best = -1;
|
||||
|
||||
Reference in New Issue
Block a user