mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
Added 'filter' support to position function; Made sure sort script can depend on the value of the field itself.
Cleaned up some things, why is a blank image not thread safe? git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@548 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -50,7 +50,11 @@ typedef shared_ptr<wxMemoryDC> MemoryDCP;
|
||||
// Return a temporary DC with the same size as the parameter
|
||||
MemoryDCP getTempDC(DC& dc) {
|
||||
wxSize s = dc.GetSize();
|
||||
Bitmap buffer(s.GetWidth(), s.GetHeight(), 24);
|
||||
#ifdef __WXMSW__
|
||||
Bitmap buffer(s.GetWidth(), s.GetHeight(), 1);
|
||||
#else
|
||||
Bitmap buffer(s.GetWidth(), s.GetHeight(), 24);
|
||||
#endif
|
||||
MemoryDCP newDC(new wxMemoryDC);
|
||||
newDC->SelectObject(buffer);
|
||||
clearDC(*newDC, *wxBLACK_BRUSH);
|
||||
@@ -161,10 +165,10 @@ void SymbolViewer::combineSymbolPart(DC& dc, const SymbolPart& part, bool& paint
|
||||
// Matrix2D rot(cos(a),-sin(a), sin(a),cos(a));
|
||||
//
|
||||
// ref * rot
|
||||
// /cos b sin b\ /cos a -sin a\;
|
||||
// = \sin b -cos b/ \sin a cos a/;s
|
||||
// = /cos(a+b) sin(a+b)\;
|
||||
// \sin(a+b) -cos(a+b)/;
|
||||
// [ cos b sin b ! [ cos a -sin a !
|
||||
// = ! sin b -cos b ] ! sin a cos a ]
|
||||
// = [ cos(a+b) sin(a+b) !
|
||||
// ! sin(a+b) -cos(a+b) ]
|
||||
Matrix2D rot(cos(a+b),sin(a+b), sin(a+b),-cos(a+b));
|
||||
multiply.mx = rot.mx * old_m;
|
||||
multiply.my = rot.my * old_m;
|
||||
|
||||
Reference in New Issue
Block a user