Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Example of osDrawText
- string name;
- integer line;
- string content;
- default
- {
- state_entry()
- {
- line=0; name=llGetInventoryName(INVENTORY_NOTECARD,0);
- content="";
- llGetNotecardLine(name,line);
- }
- dataserver(key id, string str)
- {
- if(str==EOF) state ready;
- content+=str+"\n";
- //llSay(0,str);
- line++;
- llGetNotecardLine(name,line);
- }
- }
- state ready
- {
- state_entry()
- {
- //llSay(0,"content "+content);
- string CommandList = ""; // Storage for our drawing commands
- CommandList = osMovePen( CommandList, 10, 10 ); // Upper left corner at <10,10>
- CommandList = osSetFontName ( CommandList, "Times");
- CommandList = osSetPenColor( CommandList,"Black");
- CommandList = osSetFontSize( CommandList,72);
- CommandList = osSetPenColor( CommandList,"Black");
- CommandList = osDrawText( CommandList,name+"\n");
- CommandList = osMovePen( CommandList, 10, 120 ); // Upper left corner at <10,10>
- CommandList = osSetFontSize( CommandList, 36 );
- CommandList = osDrawText( CommandList, content ); // Place some text
- // Now draw the image
- osSetDynamicTextureData( "", "vector", CommandList, "width:1024,height:1024", 0 );
- }
- touch_start(integer count)
- {
- llResetScript();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement