OsMovePen

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}}
 
{{Quicklinks}}
 +
{|  width="100%" style="border: thin solid black"
 +
| colspan="2" align="center" style=background:orange | '''{{SUBPAGENAME}}'''
 +
|- valign="top"
 +
|'''Threat Level''' || <Threat Level goes here>
  
LSL: '''[[string]] osMovePen( [[string]] drawList, [[integer]] x, [[integer]] y )'''<br />
+
|- valign="top"
C#: '''[[string]] osMovePen( [[string]] drawList, [[int]] x, [[int]] y )'''
+
|'''Function Syntax''' || <source lang="lsl">
 
+
LSL: string osMovePen( string drawList, integer x, integer y )
 
+
C#: string osMovePen( string drawList, int x, int y )
Appends a [[Drawing_commands#MoveTo|MoveTo]] drawing command to the string provided in '''drawList''' and returns the result.
+
</source>
 
+
|- valign="top"
This moves the pen's location to the coordinates specified by the '''x''' and '''y''' parameters, without drawing anything.
+
|'''Example(s)||<source lang="lsl">
 
+
Example:
+
<source lang="lsl">
+
 
// Example of osMovePen
 
// Example of osMovePen
 
default
 
default
Line 34: Line 35:
 
</source>
 
</source>
  
 +
|}
 +
 +
Appends a [[Drawing_commands#MoveTo|MoveTo]] drawing command to the string provided in '''drawList''' and returns the result.
 +
 +
This moves the pen's location to the coordinates specified by the '''x''' and '''y''' parameters, without drawing anything.
  
[[Category:OSSL]]
+
[[Category:OSSL Functions]]
 
[[Category:OSSL functions without threat level]]
 
[[Category:OSSL functions without threat level]]

Revision as of 10:55, 11 June 2011

OsMovePen
Threat Level <Threat Level goes here>
Function Syntax
LSL: string osMovePen( string drawList, integer x, integer y )
C#: string osMovePen( string drawList, int x, int y )
Example(s)
// Example of osMovePen
default
{
    state_entry()
    {
        string CommandList = ""; // Storage for our drawing commands
        integer i;
 
        CommandList = osSetPenSize( CommandList, 3 );              // Set the pen width to 3 pixels
        CommandList = osSetPenColour( CommandList, "Blue" );       // Set the pen color to blue
 
        for (i = 0; i < 256; i += 20)
        {
          CommandList = osMovePen( CommandList, 255, i );          // Move to the right side
          CommandList = osDrawLine( CommandList, 0, i+20 );        // Draw left and slightly down
        }
 
        // Now draw the lines
        osSetDynamicTextureData( "", "vector", CommandList, "width:256,height:256", 0 );
    }
}

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

This moves the pen's location to the coordinates specified by the x and y parameters, without drawing anything.

Personal tools
General
About This Wiki