OsDrawFilledPolygon

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
Line 1: Line 1:
 
{{Template:Quicklinks}}
 
{{Template:Quicklinks}}
 
+
{|  width="100%" style="border: thin solid black"
LSL: '''[[string]] osDrawFilledPolygon( [[string]] drawList, [[list]] xpoints, [[list]] ypoints )'''<br />
+
| colspan="2" align="center" style=background:orange | '''{{SUBPAGENAME}}'''
C#: '''[[string]] osDrawFilledPolygon( [[string]] drawList, [[LSL_List]] xpoints, [[LSL_List]] ypoints )'''
+
|- valign="top"
 
+
|'''Threat Level''' || <Threat Level goes here>
 
+
|- valign="top"
Appends a [[Drawing_commands#FillPolygon|FillPolygon]] drawing command to the string provided in '''drawList''' and returns the result.
+
|'''Function Syntax''' || <source lang="lsl">
 
+
LSL: string osDrawFilledPolygon( string drawList, list xpoints, list ypoints )
The polygon is drawn with the current pen size and color on the x,y point pairs that comes from LSL list. So (x[0],y[0]),(x[1],y[1]),(x[2],y[2]) would be an example of a polygon. The polygon created is filled with the selected pen color as well.
+
C# : string osDrawFilledPolygon( string drawList, LSL_List xpoints, LSL_List ypoints )
 
+
</source>
Example:
+
|- valign="top"
<source lang="lsl">
+
|'''Example(s)||<source lang="lsl">
 
// Example of osDrawFilledPolygon
 
// Example of osDrawFilledPolygon
 
default
 
default
Line 27: Line 27:
 
}
 
}
 
</source>
 
</source>
 +
|}
 +
Appends a [[Drawing_commands#FillPolygon|FillPolygon]] drawing command to the string provided in '''drawList''' and returns the result.
  
 +
The polygon is drawn with the current pen size and color on the x,y point pairs that comes from LSL list. So (x[0],y[0]),(x[1],y[1]),(x[2],y[2]) would be an example of a polygon. The polygon created is filled with the selected pen color as well.
  
 +
[[Category:OSSL Functions]]
 
[[Category:OSSL]]
 
[[Category:OSSL]]
 
[[Category:OSSL functions without threat level]]
 
[[Category:OSSL functions without threat level]]

Revision as of 14:49, 8 June 2011

OsDrawFilledPolygon
Threat Level <Threat Level goes here>
Function Syntax
LSL: string osDrawFilledPolygon( string drawList, list xpoints, list ypoints )
C# : string osDrawFilledPolygon( string drawList, LSL_List xpoints, LSL_List ypoints )
Example(s)
// Example of osDrawFilledPolygon
default
{
    state_entry()
    {
        string CommandList = ""; // Storage for our drawing commands
 
        CommandList = osSetPenSize( CommandList, 3 );         // Set the pen width to 3 pixels
        CommandList = osSetPenColour( CommandList, "Blue" );  // Set the pen color to blue
        CommandList = osDrawFilledPolygon( CommandList, [50,100,150], ["50",100,150.0] ); // You can use either integer, float or string 
 
        // Now draw the polygon
        osSetDynamicTextureData( "", "vector", CommandList, "", 0 );
    }
}

Appends a FillPolygon drawing command to the string provided in drawList and returns the result.

The polygon is drawn with the current pen size and color on the x,y point pairs that comes from LSL list. So (x[0],y[0]),(x[1],y[1]),(x[2],y[2]) would be an example of a polygon. The polygon created is filled with the selected pen color as well.

Personal tools
General
About This Wiki