summaryrefslogtreecommitdiff
path: root/agg/inc/agg_span_interpolator_persp.h
diff options
context:
space:
mode:
Diffstat (limited to 'agg/inc/agg_span_interpolator_persp.h')
-rwxr-xr-xagg/inc/agg_span_interpolator_persp.h60
1 files changed, 30 insertions, 30 deletions
diff --git a/agg/inc/agg_span_interpolator_persp.h b/agg/inc/agg_span_interpolator_persp.h
index 632a56449f28..0c01c2e30e09 100755
--- a/agg/inc/agg_span_interpolator_persp.h
+++ b/agg/inc/agg_span_interpolator_persp.h
@@ -2,8 +2,8 @@
// Anti-Grain Geometry - Version 2.3
// 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.
+// Permission to copy, use, modify, sell and distribute this software
+// is granted provided this copyright notice appears in all copies.
// This software is provided "as is" without express or implied
// warranty, and with no claim as to its suitability for any purpose.
//
@@ -24,7 +24,7 @@ namespace agg
//===========================================span_interpolator_persp_exact
- template<unsigned SubpixelShift = 8>
+ template<unsigned SubpixelShift = 8>
class span_interpolator_persp_exact
{
public:
@@ -41,24 +41,24 @@ namespace agg
//--------------------------------------------------------------------
// Arbitrary quadrangle transformations
- span_interpolator_persp_exact(const double* src, const double* dst)
+ span_interpolator_persp_exact(const double* src, const double* dst)
{
quad_to_quad(src, dst);
}
//--------------------------------------------------------------------
- // Direct transformations
- span_interpolator_persp_exact(double x1, double y1,
- double x2, double y2,
+ // Direct transformations
+ span_interpolator_persp_exact(double x1, double y1,
+ double x2, double y2,
const double* quad)
{
rect_to_quad(x1, y1, x2, y2, quad);
}
//--------------------------------------------------------------------
- // Reverse transformations
- span_interpolator_persp_exact(const double* quad,
- double x1, double y1,
+ // Reverse transformations
+ span_interpolator_persp_exact(const double* quad,
+ double x1, double y1,
double x2, double y2)
{
quad_to_rect(quad, x1, y1, x2, y2);
@@ -74,7 +74,7 @@ namespace agg
//--------------------------------------------------------------------
// Set the direct transformations, i.e., rectangle -> quadrangle
- void rect_to_quad(double x1, double y1, double x2, double y2,
+ void rect_to_quad(double x1, double y1, double x2, double y2,
const double* quad)
{
double src[8];
@@ -88,7 +88,7 @@ namespace agg
//--------------------------------------------------------------------
// Set the reverse transformations, i.e., quadrangle -> rectangle
- void quad_to_rect(const double* quad,
+ void quad_to_rect(const double* quad,
double x1, double y1, double x2, double y2)
{
double dst[8];
@@ -152,11 +152,11 @@ namespace agg
//----------------------------------------------------------------
void resynchronize(double xe, double ye, unsigned len)
{
- // Assume x1,y1 are equal to the ones at the previous end point
+ // Assume x1,y1 are equal to the ones at the previous end point
int sx1 = m_scale_x.y();
int sy1 = m_scale_y.y();
- // Calculate transformed coordinates at x2,y2
+ // Calculate transformed coordinates at x2,y2
double xt = xe;
double yt = ye;
m_trans_dir.transform(&xt, &yt);
@@ -215,7 +215,7 @@ namespace agg
{
m_trans_dir.transform(x, y);
}
-
+
private:
trans_type m_trans_dir;
trans_type m_trans_inv;
@@ -235,7 +235,7 @@ namespace agg
//============================================span_interpolator_persp_lerp
- template<unsigned SubpixelShift = 8>
+ template<unsigned SubpixelShift = 8>
class span_interpolator_persp_lerp
{
public:
@@ -251,24 +251,24 @@ namespace agg
//--------------------------------------------------------------------
// Arbitrary quadrangle transformations
- span_interpolator_persp_lerp(const double* src, const double* dst)
+ span_interpolator_persp_lerp(const double* src, const double* dst)
{
quad_to_quad(src, dst);
}
//--------------------------------------------------------------------
- // Direct transformations
- span_interpolator_persp_lerp(double x1, double y1,
- double x2, double y2,
+ // Direct transformations
+ span_interpolator_persp_lerp(double x1, double y1,
+ double x2, double y2,
const double* quad)
{
rect_to_quad(x1, y1, x2, y2, quad);
}
//--------------------------------------------------------------------
- // Reverse transformations
- span_interpolator_persp_lerp(const double* quad,
- double x1, double y1,
+ // Reverse transformations
+ span_interpolator_persp_lerp(const double* quad,
+ double x1, double y1,
double x2, double y2)
{
quad_to_rect(quad, x1, y1, x2, y2);
@@ -284,7 +284,7 @@ namespace agg
//--------------------------------------------------------------------
// Set the direct transformations, i.e., rectangle -> quadrangle
- void rect_to_quad(double x1, double y1, double x2, double y2,
+ void rect_to_quad(double x1, double y1, double x2, double y2,
const double* quad)
{
double src[8];
@@ -298,7 +298,7 @@ namespace agg
//--------------------------------------------------------------------
// Set the reverse transformations, i.e., quadrangle -> rectangle
- void quad_to_rect(const double* quad,
+ void quad_to_rect(const double* quad,
double x1, double y1, double x2, double y2)
{
double dst[8];
@@ -316,7 +316,7 @@ namespace agg
//----------------------------------------------------------------
void begin(double x, double y, unsigned len)
{
- // Calculate transformed coordinates at x1,y1
+ // Calculate transformed coordinates at x1,y1
double xt = x;
double yt = y;
m_trans_dir.transform(&xt, &yt);
@@ -343,7 +343,7 @@ namespace agg
dy -= y;
int sy1 = int(subpixel_size/sqrt(dx*dx + dy*dy)) >> subpixel_shift;
- // Calculate transformed coordinates at x2,y2
+ // Calculate transformed coordinates at x2,y2
x += len;
xt = x;
yt = y;
@@ -378,13 +378,13 @@ namespace agg
//----------------------------------------------------------------
void resynchronize(double xe, double ye, unsigned len)
{
- // Assume x1,y1 are equal to the ones at the previous end point
+ // Assume x1,y1 are equal to the ones at the previous end point
int x1 = m_coord_x.y();
int y1 = m_coord_y.y();
int sx1 = m_scale_x.y();
int sy1 = m_scale_y.y();
- // Calculate transformed coordinates at x2,y2
+ // Calculate transformed coordinates at x2,y2
double xt = xe;
double yt = ye;
m_trans_dir.transform(&xt, &yt);
@@ -447,7 +447,7 @@ namespace agg
{
m_trans_dir.transform(x, y);
}
-
+
private:
trans_type m_trans_dir;
trans_type m_trans_inv;