OsDrawScaleTransform

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
(Add exemple)
 
Line 3: Line 3:
 
|function_syntax=string osDrawScaleTransform(string drawList, float x, float y)
 
|function_syntax=string osDrawScaleTransform(string drawList, float x, float y)
 
|ossl_example=<source lang="lsl">
 
|ossl_example=<source lang="lsl">
// Example of osDrawScaleTransform
+
//
 +
// osDrawScaleTransform Script Exemple
 +
// Author: djphil
 +
//
  
 
default
 
default
Line 9: Line 12:
 
     state_entry()
 
     state_entry()
 
     {
 
     {
         ...
+
         llSay(PUBLIC_CHANNEL, "Touch to see osDrawScaleTransform usage.");
 +
    }
 +
   
 +
    touch_start(integer number)
 +
    {
 +
        string CommandList = "";
 +
        CommandList = osSetFontName(CommandList, "Courier New");
 +
        CommandList = osSetFontSize(CommandList, 15);
 +
        CommandList = osMovePen(CommandList, 10, 20);
 +
 
 +
        integer i;
 +
       
 +
        for(i = 0; i < 12; ++i)
 +
        {
 +
            CommandList = osDrawScaleTransform(CommandList, 1.25, 1.25);
 +
            CommandList = osDrawText(CommandList, "☺☻");
 +
        }
 +
 
 +
        CommandList = osDrawResetTransform(CommandList);
 +
        CommandList = osMovePen(CommandList, 10, 10);
 +
        CommandList = osDrawText(CommandList, "Hello World!");
 +
        osSetDynamicTextureData("", "vector", CommandList, "width:512,height:512", 0);
 
     }
 
     }
 
}
 
}

Latest revision as of 07:23, 28 November 2020

string osDrawScaleTransform(string drawList, float x, float y)
...
Threat Level None
Permissions No permissions specified
Extra Delay No function delay specified
Example(s)
//
// osDrawScaleTransform Script Exemple
// Author: djphil
//
 
default
{
    state_entry()
    {
        llSay(PUBLIC_CHANNEL, "Touch to see osDrawScaleTransform usage.");
    }
 
    touch_start(integer number)
    {
        string CommandList = "";
        CommandList = osSetFontName(CommandList, "Courier New");
        CommandList = osSetFontSize(CommandList, 15);
        CommandList = osMovePen(CommandList, 10, 20);
 
        integer i;
 
        for(i = 0; i < 12; ++i)
        {
            CommandList = osDrawScaleTransform(CommandList, 1.25, 1.25);
            CommandList = osDrawText(CommandList, "☺☻");
        }
 
        CommandList = osDrawResetTransform(CommandList);
        CommandList = osMovePen(CommandList, 10, 10);
        CommandList = osDrawText(CommandList, "Hello World!");
        osSetDynamicTextureData("", "vector", CommandList, "width:512,height:512", 0);
    }
}
Notes
This function was added in 0.9.0.1
Personal tools
General
About This Wiki