Icon-O-Matic: Add perspective transformations
As part of adding perspective transformations, agg_trans_perspective.h was patched to fix a multiple definitions error. This change has been submitted for review to the "upstream" repositories at [1], [2], and [3]. Also includes various other improvements such as VertexSource being split into its own file, code style improvements, and documentation improvements. [1] https://sourceforge.net/p/agg/patches/6/ [2] https://github.com/ghaerr/agg-2.6/pull/9 [3] https://github.com/aggeom/agg-2.6/pull/7 Change-Id: I4bffd2f87354bde10155e23145a232a925be6ff3 Reviewed-on: https://review.haiku-os.org/c/haiku/+/6801 Reviewed-by: Adrien Destugues <[email protected]>
This commit is contained in:
committed by
Adrien Destugues
parent
a1c86e7ada
commit
c6c2c04284
@@ -502,7 +502,7 @@ namespace agg
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
const trans_perspective&
|
||||
inline const trans_perspective&
|
||||
trans_perspective::multiply_inv(const trans_perspective& m)
|
||||
{
|
||||
trans_perspective t = m;
|
||||
@@ -511,7 +511,7 @@ namespace agg
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
const trans_perspective&
|
||||
inline const trans_perspective&
|
||||
trans_perspective::multiply_inv(const trans_affine& m)
|
||||
{
|
||||
trans_affine t = m;
|
||||
@@ -520,7 +520,7 @@ namespace agg
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
const trans_perspective&
|
||||
inline const trans_perspective&
|
||||
trans_perspective::premultiply_inv(const trans_perspective& m)
|
||||
{
|
||||
trans_perspective t = m;
|
||||
@@ -529,7 +529,7 @@ namespace agg
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
const trans_perspective&
|
||||
inline const trans_perspective&
|
||||
trans_perspective::premultiply_inv(const trans_affine& m)
|
||||
{
|
||||
trans_perspective t(m);
|
||||
@@ -697,14 +697,14 @@ namespace agg
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
void trans_perspective::translation(double* dx, double* dy) const
|
||||
inline void trans_perspective::translation(double* dx, double* dy) const
|
||||
{
|
||||
*dx = tx;
|
||||
*dy = ty;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
void trans_perspective::scaling(double* x, double* y) const
|
||||
inline void trans_perspective::scaling(double* x, double* y) const
|
||||
{
|
||||
double x1 = 0.0;
|
||||
double y1 = 0.0;
|
||||
@@ -719,7 +719,7 @@ namespace agg
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
void trans_perspective::scaling_abs(double* x, double* y) const
|
||||
inline void trans_perspective::scaling_abs(double* x, double* y) const
|
||||
{
|
||||
*x = std::sqrt(sx * sx + shx * shx);
|
||||
*y = std::sqrt(shy * shy + sy * sy);
|
||||
|
||||
Reference in New Issue
Block a user