mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-21 06:45:39 -06:00
Radial gradient precission fix
git-svn-id: svn://ultimatepp.org/upp/trunk@796 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
022c240842
commit
ae51d46157
5 changed files with 33 additions and 6 deletions
|
|
@ -158,7 +158,14 @@ inline Painter& Painter::EvenOdd(bool evenodd)
|
|||
|
||||
inline Painter& Painter::Dash(const Vector<double>& dash, double start)
|
||||
{
|
||||
DashOp(dash, start);
|
||||
if(dash.GetCount() & 1) {
|
||||
Vector<double> dash1;
|
||||
dash1.Append(dash);
|
||||
dash1.Append(dash);
|
||||
DashOp(dash1, start);
|
||||
}
|
||||
else
|
||||
DashOp(dash, start);
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -167,10 +167,9 @@ struct UppRadialSpan {
|
|||
interpolator.coordinates(&x, &y);
|
||||
int h;
|
||||
if(focus) {
|
||||
x >>= 8;
|
||||
y >>= 8;
|
||||
double dx = x - cx - fx;
|
||||
double dy = y - cy - fy;
|
||||
const double q256 = 1 / 256.0;
|
||||
double dx = q256 * x - cx - fx;
|
||||
double dy = q256 * y - cy - fy;
|
||||
if(dx == 0 && dy == 0)
|
||||
h = 0;
|
||||
else {
|
||||
|
|
|
|||
|
|
@ -378,6 +378,7 @@ namespace agg
|
|||
template<class Clip>
|
||||
void rasterizer_scanline_aa<Clip>::line_to(int x, int y)
|
||||
{
|
||||
RTIMING("line_to");
|
||||
m_clipper.line_to(m_outline,
|
||||
conv_type::downscale(x),
|
||||
conv_type::downscale(y));
|
||||
|
|
@ -399,6 +400,7 @@ namespace agg
|
|||
template<class Clip>
|
||||
void rasterizer_scanline_aa<Clip>::line_to_d(double x, double y)
|
||||
{
|
||||
RTIMING("line_to_d");
|
||||
m_clipper.line_to(m_outline,
|
||||
conv_type::upscale(x),
|
||||
conv_type::upscale(y));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue