no way to compare when less than two revisions

Differences

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


fuss:ossl [2022/04/19 08:28] (current) – created - external edit 127.0.0.1
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: 2022/04/19 08:28 by 127.0.0.1

Access website using Tor Access website using i2p Wizardry and Steamworks PGP Key


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