# HG changeset patch # User kyberneticist@gmail.com # Date 1350682045 0 # Node ID 9c815950568d4249a72a2b1235c5269fedc23563 # Parent 3d03892b7545f5a025e2fb15299cff3125d42411 Edited wiki page LuaDrawing through web user interface. diff -r 3d03892b7545 -r 9c815950568d LuaDrawing.wiki --- a/LuaDrawing.wiki Fri Oct 19 21:20:47 2012 +0000 +++ b/LuaDrawing.wiki Fri Oct 19 21:27:25 2012 +0000 @@ -10,7 +10,7 @@ First, a couple of convenience functions for drawing to the map. PointsBuffer = '' -- A string to accumulate points in -function AddPoint(x, y, size, erase) +function AddPoint(x, y, width, erase) PointsBuffer = PointsBuffer .. string.char(band(x,0xff00) / 256 , band(x,0xff) , band(y,0xff00) / 256 , band(y,0xff)) if size then size = bor(size,0x80) @@ -33,7 +33,7 @@ end end -AddPoint takes an x and y location for the point, a size (required to start a line) and erase (whether the line is erasing from the map). The size is the "width" value from [[DrawnMapFormat]]. +AddPoint takes an x and y location for the point, a width (indicates the start of a new line) and erase (whether the line is erasing from the map). The width calculation is described in [DrawnMapFormat]. FlushPoints writes out any values from PointsBuffer that have not already been sent to the engine. It would be called at the end of a drawing session. @@ -82,5 +82,6 @@ for i = 500,3500,1000 do AddPoint(i,1000,63,true) end + FlushPoints() This one fills the map with solid land, and draws 3 circular erased points in it. \ No newline at end of file