# HG changeset patch # User Wuzzy # Date 1525304653 -3600 # Node ID 23cc8581c0da1f5d9df72708457920bdf931e0b6 # Parent 8d095c221b3d217e7000fdf024f319c294028955 LuaDrawing: formatting fixes diff -r 8d095c221b3d -r 23cc8581c0da LuaDrawing.wiki --- a/LuaDrawing.wiki Thu May 03 00:42:33 2018 +0100 +++ b/LuaDrawing.wiki Thu May 03 00:44:13 2018 +0100 @@ -4,7 +4,7 @@ == Overview == Starting in 0.9.18 it is possible to reliably use drawn map mode to draw maps with scripts. -A simple example is given below. Note that Drawn maps use an area of 4096x2048. The examples below are static, but obviously this could be used for a random map variation - for example, simulating the Cave map by doing the fill below, then drawing random tunnels using circles that shift their course smoothly. +A simple example is given below. Note that Drawn maps use an area of 4096Ă—2048. The examples below are static, but obviously this could be used for a random map variationâ€”for example, simulating the Cave map by doing the fill below, then drawing random tunnels using circles that shift their course smoothly. == Details == First, a couple of convenience functions for drawing to the map. @@ -33,9 +33,9 @@ end end -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]. +`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. +`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. A simple example below. @@ -70,13 +70,13 @@ FlushPoints() end -The first set of AddPoints draws a large X and erases the centre. +The first set of `AddPoint`s draws a large X and erases the centre. The following loop draws a set of nested points, alternating erasure and fill, which results in a set of concentric circles. -The 2nd loop draws a web of lines and frames it using some final AddPoints. +The 2nd loop draws a web of lines and frames it using some final `AddPoint`s. screenshot here -Another brief example. +Another brief example: ``` for i = 200,2000,600 do AddPoint(1,i,63) ```