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:
twanvl
2007-07-10 18:57:41 +00:00
parent 7676c0b6b6
commit 8833d07c4a
20 changed files with 229 additions and 142 deletions
+9 -5
View File
@@ -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;