Harmony
Scripting Interface Documentation
PenstyleManager Class Reference

The PenstyleManager JavaScript global object. Query/modify the current penstyle and list of penstyles. More...

Public Slots

int getNumberOfPenstyles ()
 Gets the number of penstyles. More...
 
String getPenstyleName (int index)
 Gets the name of the penstyle. More...
 
int getCurrentPenstyleIndex ()
 Gets the index of the current penstyle. More...
 
String getCurrentPenstyleName ()
 Gets the name of the current penstyle. More...
 
void setCurrentPenstyleByName (String name)
 sets the current penstyle More...
 
void setCurrentPenstyleByIndex (int index)
 sets the current penstyle More...
 
void changeCurrentPenstyleMinimumSize (double minimum)
 set the current penstyle minimum size More...
 
void changeCurrentPenstyleMaximumSize (double maximum)
 set the current penstyle maximum size More...
 
void changeCurrentPenstyleOutlineSmoothness (double smooth)
 set the current penstyle outline smoothness More...
 
void changeCurrentPenstyleCenterlineSmoothness (double smooth)
 set the current penstyle centreline smoothness More...
 
double getCurrentPenstyleMinimumSize ()
 Gets the current penstyle minimum size. More...
 
double getCurrentPenstyleMaximumSize ()
 Gets the current penstyle maximum size. More...
 
double getCurrentPenstyleOutlineSmoothness ()
 Gets the current penstyle outline smoothness. More...
 
double getCurrentPenstyleCenterlineSmoothness ()
 Gets the current penstyle center line smoothness. More...
 
bool getCurrentPenstyleEraserFlag ()
 Gets the current penstyle eraser flag. More...
 
String exportPenstyleToString (int index)
 Create a string representing the penstyle which can be used to store the penstyle and import it later. More...
 
String exportPenstyleListToString ()
 Formats the penstyle list into a string, which can be used to store the penstyle list and import it later. More...
 
void importPenstyleListFromString (String str)
 Imports a penstyle list from a previously formatted penstyle string. More...
 
void savePenstyles ()
 Saves the penstyles. More...
 

Detailed Description

The PenstyleManager JavaScript global object. Query/modify the current penstyle and list of penstyles.

This set of functions is used to query/modify the current penstyle and list of penstyles. The list of penstyles includes the brush, pencil and texture styles.

function queryPenstyles()
{
for ( var i =0 ; i < num ; ++i )
{
System.println( "penstyle name is " + PenstyleManager.getPenstyleName(i) );
}
System.println("The current penstyle has min size of " + PenstyleManager.getCurrentPenstyleMinimumSize() +
" and maximum size of " + PenstyleManager.getCurrentPenstyleMaximumSize());
}

Member Function Documentation

◆ changeCurrentPenstyleCenterlineSmoothness

void PenstyleManager::changeCurrentPenstyleCenterlineSmoothness ( double  smooth)
slot

set the current penstyle centreline smoothness

Parameters
smooth- new smoothness value

◆ changeCurrentPenstyleMaximumSize

void PenstyleManager::changeCurrentPenstyleMaximumSize ( double  maximum)
slot

set the current penstyle maximum size

Parameters
maximum- new maximum size

◆ changeCurrentPenstyleMinimumSize

void PenstyleManager::changeCurrentPenstyleMinimumSize ( double  minimum)
slot

set the current penstyle minimum size

Parameters
minimum- new minimum size

◆ changeCurrentPenstyleOutlineSmoothness

void PenstyleManager::changeCurrentPenstyleOutlineSmoothness ( double  smooth)
slot

set the current penstyle outline smoothness

Parameters
smooth- new smoothness value

◆ exportPenstyleListToString

String PenstyleManager::exportPenstyleListToString ( )
slot

Formats the penstyle list into a string, which can be used to store the penstyle list and import it later.

Returns
string representing penstyle list

◆ exportPenstyleToString

String PenstyleManager::exportPenstyleToString ( int  index)
slot

Create a string representing the penstyle which can be used to store the penstyle and import it later.

Parameters
index- index of penstyle
Returns
string representing penstyle

◆ getCurrentPenstyleCenterlineSmoothness

double PenstyleManager::getCurrentPenstyleCenterlineSmoothness ( )
slot

Gets the current penstyle center line smoothness.

Returns
center line smoothness

◆ getCurrentPenstyleEraserFlag

bool PenstyleManager::getCurrentPenstyleEraserFlag ( )
slot

Gets the current penstyle eraser flag.

Returns
eraser flag

◆ getCurrentPenstyleIndex

int PenstyleManager::getCurrentPenstyleIndex ( )
slot

Gets the index of the current penstyle.

Returns
index of penstyle

◆ getCurrentPenstyleMaximumSize

double PenstyleManager::getCurrentPenstyleMaximumSize ( )
slot

Gets the current penstyle maximum size.

Returns
maximum size

◆ getCurrentPenstyleMinimumSize

double PenstyleManager::getCurrentPenstyleMinimumSize ( )
slot

Gets the current penstyle minimum size.

Returns
minimum size

◆ getCurrentPenstyleName

String PenstyleManager::getCurrentPenstyleName ( )
slot

Gets the name of the current penstyle.

Returns
name of penstyle

◆ getCurrentPenstyleOutlineSmoothness

double PenstyleManager::getCurrentPenstyleOutlineSmoothness ( )
slot

Gets the current penstyle outline smoothness.

Returns
outline smoothness

◆ getNumberOfPenstyles

int PenstyleManager::getNumberOfPenstyles ( )
slot

Gets the number of penstyles.

Returns
number of penstyles

◆ getPenstyleName

String PenstyleManager::getPenstyleName ( int  index)
slot

Gets the name of the penstyle.

Parameters
index- index of style withing list
Returns
name of penstyle

◆ importPenstyleListFromString

void PenstyleManager::importPenstyleListFromString ( String  str)
slot

Imports a penstyle list from a previously formatted penstyle string.

Parameters
str- formatted penstyle list ( created from a previous call to exportPenstyleToString or exportPenstyleListToString )

◆ savePenstyles

void PenstyleManager::savePenstyles ( )
slot

Saves the penstyles.

◆ setCurrentPenstyleByIndex

void PenstyleManager::setCurrentPenstyleByIndex ( int  index)
slot

sets the current penstyle

Parameters
index- index of penstyle

◆ setCurrentPenstyleByName

void PenstyleManager::setCurrentPenstyleByName ( String  name)
slot

sets the current penstyle

Parameters
name- name of penstyle