|
QScriptValue | backdrops (String &group) |
| Returns the backdrops of a group. More...
|
|
bool | setBackdrops (String &group, QScriptValue &backdrops) |
| Sets the backdrops for the specified group. More...
|
|
QScriptValue | addBackdrop (String &groupPath, QScriptValue &backdrop) |
| Adds a single backdrop. The new backdrop is displayed on top of all the others. More...
|
|
bool | removeBackdrop (QScriptValue &backdrop) |
| Removes a single backdrop. More...
|
|
bool | removeBackdrop (String &groupPath, uint idx) |
| Removes a single backdrop. More...
|
|
QScriptValue | nodes (QScriptValue &backdrop) |
| Provides a list of all nodes contained within a backdrop. More...
|
|
bool | contains (QScriptValue &backdrop, QScriptValue &node) |
| Returns true if a node is contained in the backdrop. More...
|
|
The Backdrop JavaScript global object. Get, set and add backdrops.
The Backdrop methods sometimes use backdrop JavaScript objects which are described as follows:
{
"position" : {"x":-1030, "y":-1191, "w":376, "h":284},
"title" : {"text":"HAIR", "color":4278190080,"size":14, "font":"Arial"},
"description" : {"text":"This backdrop include all the modules of hair.\n", "color":4278190080, "size":14, "font":"Arial"},
"color" : 4286859713
}
Color is a integer representation of a RGBA value. It can be obtained with the following computation.
function fromRGBAtoInt(r, g, b, a)
{
return ((a & 0xff) << 24) | ((r & 0xff) << 16) | ((g & 0xff) << 8) | (b & 0xff);
}
Here's an example demonstrating how to customize a backdrop
var myGroupPath = "Top/MyGroup";
for(var i=0; i<myBackdrops.length; i++)
{
if(myBackdrops[i].title.text == "MyBackdrop")
{
myBackdrops[i].color = fromRGBAtoInt(0, 0, 255, 255);
}
}