summaryrefslogtreecommitdiff
path: root/agg/inc/agg_span_image_resample_rgb.h
diff options
context:
space:
mode:
Diffstat (limited to 'agg/inc/agg_span_image_resample_rgb.h')
-rwxr-xr-xagg/inc/agg_span_image_resample_rgb.h66
1 files changed, 33 insertions, 33 deletions
diff --git a/agg/inc/agg_span_image_resample_rgb.h b/agg/inc/agg_span_image_resample_rgb.h
index de25dd4b382b..aff4f622b486 100755
--- a/agg/inc/agg_span_image_resample_rgb.h
+++ b/agg/inc/agg_span_image_resample_rgb.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,9 +24,9 @@ namespace agg
//=========================================span_image_resample_rgb_affine
template<class ColorT,
- class Order,
- class Allocator = span_allocator<ColorT> >
- class span_image_resample_rgb_affine :
+ class Order,
+ class Allocator = span_allocator<ColorT> >
+ class span_image_resample_rgb_affine :
public span_image_resample_affine<ColorT, Allocator>
{
public:
@@ -49,18 +49,18 @@ namespace agg
//--------------------------------------------------------------------
span_image_resample_rgb_affine(alloc_type& alloc,
- const rendering_buffer& src,
+ const rendering_buffer& src,
const color_type& back_color,
interpolator_type& inter,
const image_filter_lut& filter) :
- base_type(alloc, src, back_color, inter, filter)
+ base_type(alloc, src, back_color, inter, filter)
{}
//--------------------------------------------------------------------
color_type* generate(int x, int y, unsigned len)
{
- base_type::interpolator().begin(x + base_type::filter_dx_dbl(),
+ base_type::interpolator().begin(x + base_type::filter_dx_dbl(),
y + base_type::filter_dy_dbl(), len);
long_type fg[4];
@@ -90,13 +90,13 @@ namespace agg
fg[0] = fg[1] = fg[2] = fg[3] = image_filter_size / 2;
int y_lr = y >> image_subpixel_shift;
- int y_hr = ((image_subpixel_mask - (y & image_subpixel_mask)) *
- base_type::m_ry_inv) >>
+ int y_hr = ((image_subpixel_mask - (y & image_subpixel_mask)) *
+ base_type::m_ry_inv) >>
image_subpixel_shift;
int total_weight = 0;
int x_lr_ini = x >> image_subpixel_shift;
- int x_hr_ini = ((image_subpixel_mask - (x & image_subpixel_mask)) *
- base_type::m_rx_inv) >>
+ int x_hr_ini = ((image_subpixel_mask - (x & image_subpixel_mask)) *
+ base_type::m_rx_inv) >>
image_subpixel_shift;
do
{
@@ -109,8 +109,8 @@ namespace agg
base_type::source_image().row(y_lr) + x_lr * 3;
do
{
- int weight = (weight_y * weight_array[x_hr] +
- image_filter_size / 2) >>
+ int weight = (weight_y * weight_array[x_hr] +
+ image_filter_size / 2) >>
downscale_shift;
if(x_lr >= 0 && x_lr <= maxx)
@@ -138,8 +138,8 @@ namespace agg
{
do
{
- int weight = (weight_y * weight_array[x_hr] +
- image_filter_size / 2) >>
+ int weight = (weight_y * weight_array[x_hr] +
+ image_filter_size / 2) >>
downscale_shift;
total_weight += weight;
@@ -191,10 +191,10 @@ namespace agg
//===============================================span_image_resample_rgb
template<class ColorT,
- class Order,
- class Interpolator,
+ class Order,
+ class Interpolator,
class Allocator = span_allocator<ColorT> >
- class span_image_resample_rgb :
+ class span_image_resample_rgb :
public span_image_resample<ColorT, Interpolator, Allocator>
{
public:
@@ -213,13 +213,13 @@ namespace agg
};
//--------------------------------------------------------------------
- span_image_resample_rgb(alloc_type& alloc) :
+ span_image_resample_rgb(alloc_type& alloc) :
base_type(alloc)
{}
//--------------------------------------------------------------------
span_image_resample_rgb(alloc_type& alloc,
- const rendering_buffer& src,
+ const rendering_buffer& src,
const color_type& back_color,
interpolator_type& inter,
const image_filter_lut& filter) :
@@ -230,7 +230,7 @@ namespace agg
color_type* generate(int x, int y, unsigned len)
{
color_type* span = base_type::allocator().span();
- base_type::interpolator().begin(x + base_type::filter_dx_dbl(),
+ base_type::interpolator().begin(x + base_type::filter_dx_dbl(),
y + base_type::filter_dy_dbl(), len);
long_type fg[4];
value_type back_r = base_type::background_color().r;
@@ -261,7 +261,7 @@ namespace agg
}
else
{
- if(rx > image_subpixel_size * base_type::m_scale_limit)
+ if(rx > image_subpixel_size * base_type::m_scale_limit)
{
rx = image_subpixel_size * base_type::m_scale_limit;
}
@@ -274,7 +274,7 @@ namespace agg
}
else
{
- if(ry > image_subpixel_size * base_type::m_scale_limit)
+ if(ry > image_subpixel_size * base_type::m_scale_limit)
{
ry = image_subpixel_size * base_type::m_scale_limit;
}
@@ -292,13 +292,13 @@ namespace agg
fg[0] = fg[1] = fg[2] = fg[3] = image_filter_size / 2;
int y_lr = y >> image_subpixel_shift;
- int y_hr = ((image_subpixel_mask - (y & image_subpixel_mask)) *
- ry_inv) >>
+ int y_hr = ((image_subpixel_mask - (y & image_subpixel_mask)) *
+ ry_inv) >>
image_subpixel_shift;
int total_weight = 0;
int x_lr_ini = x >> image_subpixel_shift;
- int x_hr_ini = ((image_subpixel_mask - (x & image_subpixel_mask)) *
- rx_inv) >>
+ int x_hr_ini = ((image_subpixel_mask - (x & image_subpixel_mask)) *
+ rx_inv) >>
image_subpixel_shift;
do
@@ -312,8 +312,8 @@ namespace agg
base_type::source_image().row(y_lr) + x_lr * 3;
do
{
- int weight = (weight_y * weight_array[x_hr] +
- image_filter_size / 2) >>
+ int weight = (weight_y * weight_array[x_hr] +
+ image_filter_size / 2) >>
downscale_shift;
if(x_lr >= 0 && x_lr <= maxx)
@@ -341,8 +341,8 @@ namespace agg
{
do
{
- int weight = (weight_y * weight_array[x_hr] +
- image_filter_size / 2) >>
+ int weight = (weight_y * weight_array[x_hr] +
+ image_filter_size / 2) >>
downscale_shift;
total_weight += weight;
@@ -384,7 +384,7 @@ namespace agg
} while(--len);
return base_type::allocator().span();
}
-
+
};
}