mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-29 06:12:18 -06:00
reorganizing repo
git-svn-id: svn://ultimatepp.org/upp/trunk@9206 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
7d17505cfe
commit
e3e8d627f5
3840 changed files with 0 additions and 1161578 deletions
|
|
@ -1,78 +0,0 @@
|
|||
#include "ScanLine.h"
|
||||
|
||||
struct RecScan : Rasterizer::Target {
|
||||
ScanLine sl;
|
||||
byte *t;
|
||||
int x;
|
||||
|
||||
virtual void Render(int val);
|
||||
virtual void Render(int val, int len);
|
||||
virtual void Start(int x, int len);
|
||||
void Finish();
|
||||
};
|
||||
|
||||
void RecScan::Start(int xmin, int xmax)
|
||||
{
|
||||
sl.data.Alloc((xmax - xmin + 1) * 2);
|
||||
t = ~sl.data;
|
||||
sl.xmin = 0;
|
||||
}
|
||||
|
||||
void RecScan::Render(int val)
|
||||
{
|
||||
if(val == 0) {
|
||||
*t++ = 0;
|
||||
*t++ = 0;
|
||||
}
|
||||
else
|
||||
if(val == 256) {
|
||||
*t++ = 0;
|
||||
*t++ = 0;
|
||||
}
|
||||
else
|
||||
*t++ = val;
|
||||
x++;
|
||||
}
|
||||
|
||||
void RecScan::Render(int val, int len)
|
||||
{
|
||||
x += len;
|
||||
if(val == 256) {
|
||||
while(len > 0) {
|
||||
int n = min(len, 128);
|
||||
*t++ = 0;
|
||||
*t++ = 128 + n - 1;
|
||||
len -= n;
|
||||
}
|
||||
return;
|
||||
}
|
||||
if(val == 0) {
|
||||
while(len > 0) {
|
||||
int n = min(len, 128);
|
||||
*t++ = 0;
|
||||
*t++ = n - 1;
|
||||
len -= n;
|
||||
}
|
||||
return;
|
||||
}
|
||||
while(len--)
|
||||
*t++ = val;
|
||||
}
|
||||
/*
|
||||
void RecScan::Finish(int cx)
|
||||
{
|
||||
cx = cx - x;
|
||||
while(cx > 0) {
|
||||
int n = min(cx, 128);
|
||||
*t++ = 0;
|
||||
*t++ = n - 1;
|
||||
cx -= n;
|
||||
}
|
||||
sl.datalen = t - ~sl.data;
|
||||
}
|
||||
|
||||
void RecScan::Shrink()
|
||||
{
|
||||
if(sl.datalen + 30 <
|
||||
}
|
||||
*/
|
||||
Loading…
Add table
Add a link
Reference in a new issue