updated agg-2.4
This commit is contained in:
parent
034298f7dd
commit
f4a64526c3
5 changed files with 18 additions and 13 deletions
|
@ -850,8 +850,8 @@ namespace agg
|
||||||
unsigned num1 = sl1.num_spans();
|
unsigned num1 = sl1.num_spans();
|
||||||
unsigned num2 = sl2.num_spans();
|
unsigned num2 = sl2.num_spans();
|
||||||
|
|
||||||
typename Scanline1::const_iterator span1;
|
typename Scanline1::const_iterator span1;// = sl1.begin();
|
||||||
typename Scanline2::const_iterator span2;
|
typename Scanline2::const_iterator span2;// = sl2.begin();
|
||||||
|
|
||||||
enum invalidation_e
|
enum invalidation_e
|
||||||
{
|
{
|
||||||
|
@ -1046,7 +1046,11 @@ namespace agg
|
||||||
|
|
||||||
// Calculate the union of the bounding boxes
|
// Calculate the union of the bounding boxes
|
||||||
//-----------------
|
//-----------------
|
||||||
rect_i ur = unite_rectangles(r1, r2);
|
rect_i ur(1,1,0,0);
|
||||||
|
if(flag1 && flag2) ur = unite_rectangles(r1, r2);
|
||||||
|
else if(flag1) ur = r1;
|
||||||
|
else if(flag2) ur = r2;
|
||||||
|
|
||||||
if(!ur.is_valid()) return;
|
if(!ur.is_valid()) return;
|
||||||
|
|
||||||
ren.prepare();
|
ren.prepare();
|
||||||
|
@ -1176,7 +1180,7 @@ namespace agg
|
||||||
ren.prepare();
|
ren.prepare();
|
||||||
|
|
||||||
// A fake span2 processor
|
// A fake span2 processor
|
||||||
sbool_add_span_empty<Scanline1, Scanline> add_span2;
|
sbool_add_span_empty<Scanline2, Scanline> add_span2;
|
||||||
|
|
||||||
// The main loop
|
// The main loop
|
||||||
// Here we synchronize the scanlines with
|
// Here we synchronize the scanlines with
|
||||||
|
|
|
@ -196,6 +196,7 @@ namespace agg
|
||||||
const T* covers;
|
const T* covers;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const_iterator() : m_storage(0) {}
|
||||||
const_iterator(const embedded_scanline& sl) :
|
const_iterator(const embedded_scanline& sl) :
|
||||||
m_storage(sl.m_storage),
|
m_storage(sl.m_storage),
|
||||||
m_span_idx(sl.m_scanline.start_span)
|
m_span_idx(sl.m_scanline.start_span)
|
||||||
|
@ -554,6 +555,7 @@ namespace agg
|
||||||
const T* covers;
|
const T* covers;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const_iterator() : m_ptr(0) {}
|
||||||
const_iterator(const embedded_scanline& sl) :
|
const_iterator(const embedded_scanline& sl) :
|
||||||
m_ptr(sl.m_ptr),
|
m_ptr(sl.m_ptr),
|
||||||
m_dx(sl.m_dx)
|
m_dx(sl.m_dx)
|
||||||
|
@ -721,9 +723,8 @@ namespace agg
|
||||||
m_min_y = read_int32() + m_dy;
|
m_min_y = read_int32() + m_dy;
|
||||||
m_max_x = read_int32() + m_dx;
|
m_max_x = read_int32() + m_dx;
|
||||||
m_max_y = read_int32() + m_dy;
|
m_max_y = read_int32() + m_dy;
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
return false;
|
return m_ptr < m_end;
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------
|
//--------------------------------------------------------------------
|
||||||
|
|
|
@ -63,6 +63,7 @@ namespace agg
|
||||||
class const_iterator
|
class const_iterator
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
const_iterator() : m_storage(0) {}
|
||||||
const_iterator(const embedded_scanline& sl) :
|
const_iterator(const embedded_scanline& sl) :
|
||||||
m_storage(sl.m_storage),
|
m_storage(sl.m_storage),
|
||||||
m_span_idx(sl.m_scanline.start_span)
|
m_span_idx(sl.m_scanline.start_span)
|
||||||
|
@ -360,6 +361,7 @@ namespace agg
|
||||||
int32 len;
|
int32 len;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const_iterator() : m_ptr(0) {}
|
||||||
const_iterator(const embedded_scanline& sl) :
|
const_iterator(const embedded_scanline& sl) :
|
||||||
m_ptr(sl.m_ptr),
|
m_ptr(sl.m_ptr),
|
||||||
m_dx(sl.m_dx)
|
m_dx(sl.m_dx)
|
||||||
|
@ -503,9 +505,8 @@ namespace agg
|
||||||
m_min_y = read_int32() + m_dy;
|
m_min_y = read_int32() + m_dy;
|
||||||
m_max_x = read_int32() + m_dx;
|
m_max_x = read_int32() + m_dx;
|
||||||
m_max_y = read_int32() + m_dy;
|
m_max_y = read_int32() + m_dy;
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
return false;
|
return m_ptr < m_end;
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------
|
//--------------------------------------------------------------------
|
||||||
|
|
|
@ -123,7 +123,6 @@ namespace agg
|
||||||
int x_lr = x_hr >> image_subpixel_shift;
|
int x_lr = x_hr >> image_subpixel_shift;
|
||||||
int y_lr = y_hr >> image_subpixel_shift;
|
int y_lr = y_hr >> image_subpixel_shift;
|
||||||
|
|
||||||
unsigned weight;
|
|
||||||
fg = image_subpixel_scale * image_subpixel_scale / 2;
|
fg = image_subpixel_scale * image_subpixel_scale / 2;
|
||||||
|
|
||||||
x_hr &= image_subpixel_mask;
|
x_hr &= image_subpixel_mask;
|
||||||
|
@ -139,7 +138,7 @@ namespace agg
|
||||||
fg += *fg_ptr * (image_subpixel_scale - x_hr) * y_hr;
|
fg += *fg_ptr * (image_subpixel_scale - x_hr) * y_hr;
|
||||||
|
|
||||||
fg_ptr = (const value_type*)base_type::source().next_x();
|
fg_ptr = (const value_type*)base_type::source().next_x();
|
||||||
fg += fg_ptr * x_hr * y_hr;
|
fg += *fg_ptr * x_hr * y_hr;
|
||||||
|
|
||||||
span->v = value_type(fg >> (image_subpixel_shift * 2));
|
span->v = value_type(fg >> (image_subpixel_shift * 2));
|
||||||
span->a = base_mask;
|
span->a = base_mask;
|
||||||
|
|
|
@ -262,9 +262,9 @@ namespace agg
|
||||||
double dx3 = x4 - x3;
|
double dx3 = x4 - x3;
|
||||||
double dy3 = y4 - y3;
|
double dy3 = y4 - y3;
|
||||||
|
|
||||||
double len = sqrt(dx1 * dx1 + dy1 * dy1) +
|
double len = (sqrt(dx1 * dx1 + dy1 * dy1) +
|
||||||
sqrt(dx2 * dx2 + dy2 * dy2) +
|
sqrt(dx2 * dx2 + dy2 * dy2) +
|
||||||
sqrt(dx3 * dx3 + dy3 * dy3) * 0.25 * m_scale;
|
sqrt(dx3 * dx3 + dy3 * dy3)) * 0.25 * m_scale;
|
||||||
|
|
||||||
#if defined(_MSC_VER) && _MSC_VER <= 1200
|
#if defined(_MSC_VER) && _MSC_VER <= 1200
|
||||||
m_num_steps = uround(MSC60_fix_ICE(len));
|
m_num_steps = uround(MSC60_fix_ICE(len));
|
||||||
|
|
Loading…
Add table
Reference in a new issue