OsDrawTranslationTransform

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
(Add exemple)
 
(One intermediate revision by one user not shown)
Line 5: Line 5:
 
|function_syntax=string osDrawTranslationTransform(string drawList, float x, float y)
 
|function_syntax=string osDrawTranslationTransform(string drawList, float x, float y)
 
|ossl_example=<source lang="lsl">
 
|ossl_example=<source lang="lsl">
// Example of osDrawTranslationTransform
+
//
 +
// osDrawTranslationTransform Script Exemple
 +
// Author: djphil
 +
//
  
 
default
 
default
Line 11: 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.0
+
|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