mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-08-11 22:03:09 -06:00
Painter20 dasher
git-svn-id: svn://ultimatepp.org/upp/trunk@840 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
68c2a1caaa
commit
068030de69
13 changed files with 231 additions and 505 deletions
|
|
@ -1,14 +1,8 @@
|
|||
#include "ScanLine.h"
|
||||
|
||||
void Rasterizer::Move(double x, double y)
|
||||
{
|
||||
x1 = x;
|
||||
y1 = y;
|
||||
}
|
||||
|
||||
inline int Cv(double x)
|
||||
{
|
||||
return fround(x * 256);
|
||||
return int(x * 256 + 0.5);
|
||||
}
|
||||
|
||||
void Rasterizer::CvLine(double x1, double y1, double x2, double y2)
|
||||
|
|
@ -92,10 +86,14 @@ void Rasterizer::LineClip(double x1, double y1, double x2, double y2)
|
|||
CvLine(x1, y1, x2, y2);
|
||||
}
|
||||
|
||||
void Rasterizer::Line(double x2, double y2)
|
||||
void Rasterizer::Move(const Pointf& p)
|
||||
{
|
||||
p0 = p;
|
||||
}
|
||||
|
||||
void Rasterizer::Line(const Pointf& p)
|
||||
{
|
||||
PAINTER_TIMING("Line");
|
||||
LineClip(x1, y1, x2, y2);
|
||||
x1 = x2;
|
||||
y1 = y2;
|
||||
LineClip(p0.x, p0.y, p.x, p.y);
|
||||
p0 = p;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue