Differences

This shows you the differences between two versions of the page.

Link to this comparison view

fuss:ossl [2017/02/22 18:30] (current)
Line 1: Line 1:
 +====== Display a List on a Primitive ======
 +
 +The following function formats a command string that can be passed to ''​osSetDynamicTextureData''​ in order to display the contents of the list ''​input''​ with a spacing of ''​spacing''​ pixels.
 +
 +Example call:
 +<code lsl2>
 +osSetDynamicTextureData("",​ "​vector",​ wasTextDisplayList(["​hi",​ "​there",​ "​how",​ "​are",​ "​you"​],​ 20), "​width:​256,​height:​256",​ 0);
 +</​code>​
 +
 +<code lsl2>
 +///////////////////////////////////////////////////////////////////////////​
 +//    Copyright (C) 2013 Wizardry and Steamworks - License: GNU GPLv3    //
 +///////////////////////////////////////////////////////////////////////////​
 +string wasTextDisplayList(list input, integer spacing) {
 +    string c = "";​
 +    integer p = 0;
 +    do {
 +        string in = llList2String(input,​ 0);
 +        c = osMovePen(c,​ 0, p);
 +        p += spacing;
 +        c = osDrawText(c,​ in);
 +        input = llDeleteSubList(input,​ 0, 0);
 +    } while(llGetListLength(input));​
 +    return c;
 +}
 +</​code>​
  

fuss/ossl.txt ยท Last modified: 2017/02/22 18:30 (external edit)

Access website using Tor Access website using i2p


For the copyright, license, warranty and privacy terms for the usage of this website please see the license, privacy and plagiarism pages.