void do_draw ( Painter* painter, Canvas* canvas, float rotate, float scalex, float scaley ) { Transformer* oldt = painter->GetTransformer(); Transformer t; t.Rotate(rotate); t.Scale(scalex, scaley); painter->SetTransformer(&t); painter->FillPolygon(canvas, poly1_x, poly1_y, poly1_count); painter->FillPolygon(canvas, poly2_x, poly2_y, poly2_count); painter->SetTransformer(oldt); }
void Logo::DrawBitmap () { Transformer* oldt = output->GetTransformer(); Transformer t; t.Scale(float(xmax+1)/bitmap->Width(), float(ymax+1)/bitmap->Height()); output->SetTransformer(&t); output->Stencil( canvas, -bitmap->Left(), -bitmap->Bottom(), bitmap, bitmap ); output->SetTransformer(oldt); output->SetOrigin(0, 0); }