mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-08-24 06:12:52 -06:00
SDraw dashes
git-svn-id: svn://ultimatepp.org/upp/trunk@725 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
3cb711b605
commit
7af4ea01e7
29 changed files with 181062 additions and 697 deletions
32
uppdev/SDraw/Matrix2D.cpp
Normal file
32
uppdev/SDraw/Matrix2D.cpp
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
#include "SDraw.h"
|
||||
|
||||
NAMESPACE_UPP
|
||||
|
||||
Matrix2D Translate2D(double x, double y)
|
||||
{
|
||||
Matrix2D m;
|
||||
m.tx = x;
|
||||
m.ty = y;
|
||||
return m;
|
||||
}
|
||||
|
||||
Matrix2D Rotate2D(double angle)
|
||||
{
|
||||
Matrix2D m;
|
||||
*(agg::trans_affine *)&m = agg::trans_affine_rotation(angle);
|
||||
return m;
|
||||
}
|
||||
|
||||
Matrix2D Scale2D(double scalex, double scaley)
|
||||
{
|
||||
Matrix2D m;
|
||||
*(agg::trans_affine *)&m = agg::trans_affine_scaling(scalex, scaley);
|
||||
return m;
|
||||
}
|
||||
|
||||
Matrix2D Scale2D(double scale)
|
||||
{
|
||||
return Scale2D(scale, scale);
|
||||
}
|
||||
|
||||
END_UPP_NAMESPACE
|
||||
Loading…
Add table
Add a link
Reference in a new issue