* long overdue update to AGG 2.4

* removed the useless parts of AGG (which are only needed for the
  interactive examples)
* make sure to jam -a libagg.a to solve any linking issues


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17838 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus
2006-06-14 14:30:17 +00:00
parent a58450492a
commit e39da397f5
229 changed files with 23117 additions and 18461 deletions
+46 -2
View File
@@ -1,6 +1,6 @@
//----------------------------------------------------------------------------
// Anti-Grain Geometry - Version 2.2
// Copyright (C) 2002-2004 Maxim Shemanarev (http://www.antigrain.com)
// Anti-Grain Geometry - Version 2.4
// Copyright (C) 2002-2005 Maxim Shemanarev (http://www.antigrain.com)
//
// Permission to copy, use, modify, sell and distribute this software
// is granted provided this copyright notice appears in all copies.
@@ -138,6 +138,50 @@ namespace agg
*y = (m_mtx[3][0] + m_mtx[4][0] * tx + m_mtx[5][0] * ty) * d;
}
//--------------------------------------------------------------------
class iterator_x
{
double den;
double den_step;
double nom_x;
double nom_x_step;
double nom_y;
double nom_y_step;
public:
double x;
double y;
iterator_x() {}
iterator_x(double tx, double ty, double step, const double m[8][1]) :
den(m[6][0] * tx + m[7][0] * ty + 1.0),
den_step(m[6][0] * step),
nom_x(m[0][0] + m[1][0] * tx + m[2][0] * ty),
nom_x_step(m[1][0] * step),
nom_y(m[3][0] + m[4][0] * tx + m[5][0] * ty),
nom_y_step(m[4][0] * step),
x(nom_x / den),
y(nom_y / den)
{
}
void operator ++ ()
{
den += den_step;
nom_x += nom_x_step;
nom_y += nom_y_step;
double d = 1.0 / den;
x = nom_x * d;
y = nom_y * d;
}
};
//--------------------------------------------------------------------
iterator_x begin(double x, double y, double step) const
{
return iterator_x(x, y, step, m_mtx);
}
private:
double m_mtx[8][1];
bool m_valid;