void RectView::GetCorners (Coord* x, Coord* y) { SF_Rect* rect = (SF_Rect*) GetGraphic(); Coord tx[4], ty[4]; Transformer t; rect->GetOriginal(tx[0], ty[0], tx[2], ty[2]); rect->GetOriginal(tx[3], ty[1], tx[1], ty[3]); rect->TotalTransformation(t); t.TransformList((Coord*) tx, (Coord*) ty, 4, x, y); }
void Graphic::transformList ( Coord x[], Coord y[], int n, Coord tx[], Coord ty[], Graphic* g ) { Transformer* t = (g == nil) ? GetTransformer() : g->GetTransformer(); if (t != nil) { t->TransformList(x, y, n, tx, ty); } else { ArrayCopy(x, y, n, tx, ty); } }