mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 13:06:59 -04:00
Added 'symbol_variation' script function
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@101 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -163,6 +163,26 @@ IMPLEMENT_REFLECTION(Symbol) {
|
||||
REFLECT(parts);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------- : Default symbol
|
||||
|
||||
// A default symbol part, a square, moved by d
|
||||
SymbolPartP default_symbol_part(double d) {
|
||||
SymbolPartP part = new_shared<SymbolPart>();
|
||||
part->points.push_back(new_shared2<ControlPoint>(d + .2, d + .2));
|
||||
part->points.push_back(new_shared2<ControlPoint>(d + .2, d + .8));
|
||||
part->points.push_back(new_shared2<ControlPoint>(d + .8, d + .8));
|
||||
part->points.push_back(new_shared2<ControlPoint>(d + .8, d + .2));
|
||||
part->name = _("Square");
|
||||
return part;
|
||||
}
|
||||
|
||||
// A default symbol, a square
|
||||
SymbolP default_symbol() {
|
||||
SymbolP symbol = new_shared<Symbol>();
|
||||
symbol->parts.push_back(default_symbol_part(0));
|
||||
return symbol;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------- : SymbolView
|
||||
|
||||
SymbolView::SymbolView() {}
|
||||
|
||||
Reference in New Issue
Block a user