setLineCap: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
(Created page with "{{MacroFunction |name=setLineCap |version=1.4.1.9 |trusted=true |description= Sets the eraser setting of the drawing that corresponds to the map and drawing id. If Set to {{co...")
 
No edit summary
Line 4: Line 4:
|trusted=true
|trusted=true
|description=
|description=
Sets the eraser setting of the drawing that corresponds to the map and drawing id. If Set to {{code|false}}({{code|0}}) the drawing will be displayed normally, but if set to {{code|true}}({{code|1}}) the drawing will erase all below.
Sets the line cap setting of the drawing that corresponds to the map and drawing id. If Set to {{code|found}}({{code|0}}) the drawing will display with round line ends, but if set to {{code|square}}({{code|1}}) the drawing display with square line ends and angled corners.
|usage=
|usage=
<source lang="mtmacro" line>
<source lang="mtmacro" line>
Line 12: Line 12:
{{param|mapName|A string containing the name of the map.}}
{{param|mapName|A string containing the name of the map.}}
{{param|drawingId|A string containing the id of the drawing. The easiest way to discover a drawing's Id is via the Draw Explorer interface.}}
{{param|drawingId|A string containing the id of the drawing. The easiest way to discover a drawing's Id is via the Draw Explorer interface.}}
{{param|boolean|The value of the setting to set, {{code|true}}({{code|1}}) or {{code|false}}({{code|0}}).}}
{{param|capType|The value of the setting to set, {{code|round}}({{code|0}}) or {{code|square}}({{code|1}}).}}
|example=
|example=
<source lang="mtmacro" line>
<source lang="mtmacro" line>

Revision as of 15:41, 26 February 2018

setLineCap() Function

 Note: This function can only be used in a Trusted Macro

Introduced in version 1.4.1.9
Sets the line cap setting of the drawing that corresponds to the map and drawing id. If Set to found(0) the drawing will display with round line ends, but if set to square(1) the drawing display with square line ends and angled corners.

Usage

getLineCap(mapName, drawingId, capType)

Parameters

  • mapName - A string containing the name of the map.
  • drawingId - A string containing the id of the drawing. The easiest way to discover a drawing's Id is via the Draw Explorer interface.
  • capType - The value of the setting to set, round(0) or square(1).

Example

[h:setLineCap("Grasslands", "0000000094218C675800000000000000",0)]
[h:refreshDrawing("Grasslands", "0000000094218C675800000000000000")]
[h:setLineCap("Grasslands", "00000000CCF6B567CC00000000000000",1)]
[h:refreshDrawing("Grasslands", "00000000CCF6B567CC00000000000000")]

See Also