OsDrawFilledPolygon

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
m (some format conversions)
Line 1: Line 1:
{{osslfunc|
+
{{osslfunc
threat_level = None
+
|threat_level=None
|
+
|function_syntax=LSL: string osDrawFilledPolygon( string drawList, list xpoints, list ypoints )
function_syntax = <source lang="lsl">
+
 
LSL: string osDrawFilledPolygon( string drawList, list xpoints, list ypoints )
+
 
C# : string osDrawFilledPolygon( string drawList, LSL_List xpoints, LSL_List ypoints )
 
C# : string osDrawFilledPolygon( string drawList, LSL_List xpoints, LSL_List ypoints )
</source>
+
|ossl_example=<source lang="lsl">
|
+
ossl_example = <source lang="lsl">
+
 
// Example of osDrawFilledPolygon
 
// Example of osDrawFilledPolygon
 
default
 
default
Line 30: Line 27:
 
}
 
}
 
</source>
 
</source>
|  
+
|description=Appends a [[Drawing_commands#FillPolygon|FillPolygon]] drawing command to the string provided in '''drawList''' and returns the result.
additional_info = 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.
 
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.
 
|
 
|
 
}}
 
}}

Revision as of 20:31, 1 July 2011

LSL: string osDrawFilledPolygon( string drawList, list xpoints, list ypoints )

C# : string osDrawFilledPolygon( string drawList, LSL_List xpoints, LSL_List ypoints )

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.

Threat Level None
Permissions No permissions specified
Extra Delay No function delay specified
Example(s)
// Example of osDrawFilledPolygon
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 = osDrawFilledPolygon( CommandList, [50,100,150], ["50",100,150.0] ); 
 
    // Now draw the polygon
        osSetDynamicTextureData( "", "vector", CommandList, "", 0 );
    }
}
Personal tools
General
About This Wiki