OsSetPenCap

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 3: Line 3:
 
ATTENTION: THIS METHOD WORKS ONLY ON WINDOWS FOR NOW. LIBGDI+ HAS A FAKE IMPLEMENTATION AND WILL NOT DRAW IT.
 
ATTENTION: THIS METHOD WORKS ONLY ON WINDOWS FOR NOW. LIBGDI+ HAS A FAKE IMPLEMENTATION AND WILL NOT DRAW IT.
  
LSL: '''[[string]] osSetPenCap( [[string]] drawList, string direction, string type )'''<br />
+
{|  width="100%" style="border: thin solid black"
C#: '''[[string]] osSetPenCap( [[string]] drawList, string direction, string type )'''
+
| colspan="2" align="center" style=background:orange | '''{{SUBPAGENAME}}'''
 +
|- valign="top"
 +
|'''Threat Level''' || <Threat Level goes here>
  
 
+
|- valign="top"
Appends a [[Drawing_commands#PenCap|PenCap]] drawing command to the string provided in '''drawList''' and returns the result.
+
|'''Function Syntax''' || <source lang="lsl">
 
+
LSL: string osSetPenCap( string drawList, string direction, string type )
This sets the pen's start or/and end cap to either "diamond", "arrow", "round", or default "flat" shape. It can set them in the "end" or "start" of the line, or "both". Possible values are (case insensitive):
+
C#: string osSetPenCap( string drawList, string direction, string type )
<p>Type:<b><br>
+
</source>
"arrow"<br>
+
|- valign="top"
"diamond"<br>
+
|'''Example(s)||<source lang="lsl">
"round"<br>
+
"flat"
+
</b></p>
+
<p>
+
Direction:<br>
+
<b>
+
"start"<br>
+
"end"<br>
+
"both"<br>
+
</b></p>
+
 
+
<p> Example:
+
<source lang="lsl">
+
 
// Example of osSetPenCap
 
// Example of osSetPenCap
  
Line 45: Line 34:
 
</source>
 
</source>
  
 +
|}
 +
 +
Appends a [[Drawing_commands#PenCap|PenCap]] drawing command to the string provided in '''drawList''' and returns the result.
 +
 +
This sets the pen's start or/and end cap to either "diamond", "arrow", "round", or default "flat" shape. It can set them in the "end" or "start" of the line, or "both". Possible values are (case insensitive):
 +
 +
Type:
 +
*"arrow"
 +
*"diamond"
 +
*"round"
 +
*"flat"
 +
 +
Direction:
 +
*"start"
 +
*"end"
 +
*"both"
  
  
[[Category:OSSL]]
+
[[Category:OSSL Functions]]
 
[[Category:OSSL functions without threat level]]
 
[[Category:OSSL functions without threat level]]

Revision as of 11:47, 11 June 2011

ATTENTION: THIS METHOD WORKS ONLY ON WINDOWS FOR NOW. LIBGDI+ HAS A FAKE IMPLEMENTATION AND WILL NOT DRAW IT.

OsSetPenCap
Threat Level <Threat Level goes here>
Function Syntax
LSL: string osSetPenCap( string drawList, string direction, string type )
C#: string osSetPenCap( string drawList, string direction, string type )
Example(s)
// Example of osSetPenCap
 
default
{
    state_entry()
    {
        string CommandList = "";                              // Storage for our drawing commands
        integer i;
 
        CommandList = osSetPenSize( CommandList, 5 );         // Set the pen width to 5 pixels. With 1 pixel, arrow is very hard to see
        CommandList = osSetPenCap("start", "arrow");          // Sets the beggining of the line with an arrow
        CommandList = osMovePen(drawList,50,100);             // Moves pen to 50,100
        CommandList = osLineTo(drawList, 100,150);            // Draws line from 50,100 to 100,150
 
        osSetDynamicTextureData( "", "vector", CommandList, "", 0 );
    }
}

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

This sets the pen's start or/and end cap to either "diamond", "arrow", "round", or default "flat" shape. It can set them in the "end" or "start" of the line, or "both". Possible values are (case insensitive):

Type:

  • "arrow"
  • "diamond"
  • "round"
  • "flat"

Direction:

  • "start"
  • "end"
  • "both"
Personal tools
General
About This Wiki