OsDrawTranslationTransform

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
m (Added permissions and delay information)
(Add exemple)
 
(5 intermediate revisions by 2 users not shown)
Line 3: Line 3:
 
|permissions=true
 
|permissions=true
 
|delay=0
 
|delay=0
|function_syntax=string osDrawTranslationTransform(string drawList, LSL_Float x, LSL_Float y)
+
|function_syntax=string osDrawTranslationTransform(string drawList, float x, float y)
|csharp_syntax=string osDrawTranslationTransform(string drawList, LSL_Float x, LSL_Float y)
+
 
|ossl_example=<source lang="lsl">
 
|ossl_example=<source lang="lsl">
// Example of osDrawTranslationTransform
+
//
 +
// osDrawTranslationTransform Script Exemple
 +
// Author: djphil
 +
//
  
 
default
 
default
Line 12: Line 14:
 
     state_entry()
 
     state_entry()
 
     {
 
     {
         ...
+
         llSay(PUBLIC_CHANNEL, "Touch to see osDrawTranslationTransform usage.");
 +
    }
 +
   
 +
    touch_start(integer number)
 +
    {
 +
        string CommandList = "";
 +
        CommandList = osSetFontName(CommandList, "Courier New");
 +
        CommandList = osSetFontSize(CommandList, 10);
 +
        CommandList = osSetPenSize( CommandList, 5);
 +
 
 +
        integer i;
 +
       
 +
        for(i = 0; i < 50; ++i)
 +
        {
 +
            CommandList = osDrawLine(CommandList, -300, 10, 0, 10);
 +
            CommandList = osDrawLine(CommandList, 105, 10, 520, 10);
 +
            CommandList = osMovePen(CommandList, 0, 0);
 +
            CommandList = osDrawText(CommandList, "Hello World!");
 +
            CommandList = osDrawTranslationTransform(CommandList, 0.25 * i, 10);
 +
        }
 +
 
 +
        CommandList = osDrawResetTransform(CommandList);
 +
        osSetDynamicTextureData("", "vector", CommandList, "width:512,height:512", 0);
 
     }
 
     }
 
}
 
}
 
</source>
 
</source>
 
|description=...
 
|description=...
|
+
|additional_info=This function was added in 0.9.0.1
 
}}
 
}}

Latest revision as of 07:23, 28 November 2020

string osDrawTranslationTransform(string drawList, float x, float y)
...
Threat Level This function does not do a threat level check
Permissions Use of this function is always allowed by default
Extra Delay 0 seconds
Example(s)
//
// osDrawTranslationTransform Script Exemple
// Author: djphil
//
 
default
{
    state_entry()
    {
        llSay(PUBLIC_CHANNEL, "Touch to see osDrawTranslationTransform usage.");
    }
 
    touch_start(integer number)
    {
        string CommandList = "";
        CommandList = osSetFontName(CommandList, "Courier New");
        CommandList = osSetFontSize(CommandList, 10);
        CommandList = osSetPenSize( CommandList, 5);
 
        integer i;
 
        for(i = 0; i < 50; ++i)
        {
            CommandList = osDrawLine(CommandList, -300, 10, 0, 10);
            CommandList = osDrawLine(CommandList, 105, 10, 520, 10);
            CommandList = osMovePen(CommandList, 0, 0);
            CommandList = osDrawText(CommandList, "Hello World!");
            CommandList = osDrawTranslationTransform(CommandList, 0.25 * i, 10);
        }
 
        CommandList = osDrawResetTransform(CommandList);
        osSetDynamicTextureData("", "vector", CommandList, "width:512,height:512", 0);
    }
}
Notes
This function was added in 0.9.0.1


Personal tools
General
About This Wiki