OsDrawPolygon

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
m (Removed 'Template:' prefix from template includings and/or changed external-link into internal-link)
Line 1: Line 1:
{{Quicklinks}}
+
{{osslfunc|
{| width="100%" style="border: thin solid black"
+
threat_level =  
| colspan="2" align="center" style=background:orange | '''{{SUBPAGENAME}}'''
+
|
|- valign="top"
+
function_syntax = <source lang="lsl">
|'''Threat Level''' || <Threat Level goes here>
+
 
+
|- valign="top"
+
|'''Function Syntax''' || <source lang="lsl">
+
 
LSL: string osDrawPolygon( string drawList, list xpoints, list ypoints )
 
LSL: string osDrawPolygon( string drawList, list xpoints, list ypoints )
 
C#: string osDrawPolygon( string drawList, LSL_List xpoints, LSL_List ypoints )
 
C#: string osDrawPolygon( string drawList, LSL_List xpoints, LSL_List ypoints )
 
</source>
 
</source>
|- valign="top"
+
|
|'''Example(s)||<source lang="lsl">
+
ossl_example = <source lang="lsl">
 
// Example of osDrawPolygon
 
// Example of osDrawPolygon
 
default
 
default
Line 34: Line 30:
 
}
 
}
 
</source>
 
</source>
 
+
|  
|}
+
additional_info = Appends a [[Drawing_commands#Polygon|Polygon]] drawing command to the string provided in '''drawList''' and returns the result.
Appends a [[Drawing_commands#Polygon|Polygon]] 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 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.
 
+
|
[[Category:OSSL Functions]]
+
}}
[[Category:OSSL functions without threat level]]
+

Revision as of 13:44, 12 June 2011

LSL: string osDrawPolygon( string drawList, list xpoints, list ypoints )
C#: string osDrawPolygon( string drawList, LSL_List xpoints, LSL_List ypoints )
No descriptions provided
Threat Level No threat level specified
Permissions No permissions specified
Extra Delay No function delay specified
Example(s)
// Example of osDrawPolygon
default
{
    state_entry()
    {
     // Storage for our drawing commands
        string CommandList = ""; 
 
     // Set the pen width to 3 pixels
        CommandList = osSetPenSize( CommandList, 3 );
 
     // Set the pen color to blue
        CommandList = osSetPenColour( CommandList, "Blue" ); 
 
     // You can use either integer, float or string 
        CommandList = osDrawPolygon( CommandList, [50,100,150], ["50",100,150.0] ); 
 
     // Now draw the polygon
        osSetDynamicTextureData( "", "vector", CommandList, "", 0 );
    }
}
Notes
Appends a Polygon 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.


Personal tools
General
About This Wiki