equal
deleted
inserted
replaced
11 <code lang="lua"> |
11 <code lang="lua"> |
12 PointsBuffer = '' -- A string to accumulate points in |
12 PointsBuffer = '' -- A string to accumulate points in |
13 function AddPoint(x, y, width, erase) |
13 function AddPoint(x, y, width, erase) |
14 PointsBuffer = PointsBuffer .. string.char(band(x,0xff00) / 256 , band(x,0xff) , band(y,0xff00) / 256 , band(y,0xff)) |
14 PointsBuffer = PointsBuffer .. string.char(band(x,0xff00) / 256 , band(x,0xff) , band(y,0xff00) / 256 , band(y,0xff)) |
15 if width then |
15 if width then |
16 width = bor(size,0x80) |
16 width = bor(width,0x80) |
17 if erase then |
17 if erase then |
18 width = bor(size,0x40) |
18 width = bor(width,0x40) |
19 end |
19 end |
20 PointsBuffer = PointsBuffer .. string.char(width) |
20 PointsBuffer = PointsBuffer .. string.char(width) |
21 else |
21 else |
22 PointsBuffer = PointsBuffer .. string.char(0) |
22 PointsBuffer = PointsBuffer .. string.char(0) |
23 end |
23 end |