OsMovePen

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
(Page created.)
 
m (Correct formatting error)
Line 3: Line 3:
  
  
LSL: '''[[string]] osMovePen( [[string]] drawList, [[integer]] x, [[integer]] y )'''
+
LSL: '''[[string]] osMovePen( [[string]] drawList, [[integer]] x, [[integer]] y )'''<br />
 
LSL: '''[[string]] osMovePen( [[string]] drawList, [[int]] x, [[int]] y )'''
 
LSL: '''[[string]] osMovePen( [[string]] drawList, [[int]] x, [[int]] y )'''
  

Revision as of 16:37, 27 July 2009

Technical Reference -> Terms -> Status Page -> OSSL Implemented Functions -> Dynamic textures -> osMovePen


LSL: string osMovePen( string drawList, integer x, integer y )
LSL: string osMovePen( string drawList, int x, int y )


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

Example:

// 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 );
    }
}
Personal tools
General
About This Wiki