pw::Note

Database note type

Derives From

pw::Object pw::Entity pw::DatabaseEntity

Summary
pw::NoteDatabase note type
Static Actions
createThis action creates a new database note object.
Instance Actions
setTextThis command specifies the text for the note.
getTextThis command returns the text associated with the note.
setPositionThis command specifies the lower left corner for the first character of the first line of text for the note.
getPositionThis command returns the position of the lower left corner of the first character.
setFontThis command specifies the font for the note.
getFontThis command returns the font used by the note.
setStyleThis command specifies the font style for the note.
getStyleThis command returns the style associated with the note.
setSizeThis command specifies the local font size of the text before it is transformed.
getSizeThis command returns the font size of the note as measured by the height of the letter ‘M’.
setHorizontalThis command controls whether the text is written left to right or top to bottom.
isHorizontalThis command returns a true value if the text is written from left to right and a false value if the text is written from top to bottom.
setCharacterSlantThis command specifies the angle of slant for each character.
getCharacterSlantThis command returns the angle each character is slanted as measured from the baseline (90 degrees is the default representing no slant).
setTransformationThis command specifies how the text is transformed from its local XY plane into global coordinates.
getTransformationThis command returns the transformation matrix used to transform the text from its local XY plane into global coordinates.

Static Actions

create

pw::Note create

This action creates a new database note object.

Parameters

none

Returns

This action retruns a new pw::Note object.

Instance Actions

setText

$note setText $text

This command specifies the text for the note.  Multiple lines can be specified by using the carriage return character.

Parameters

textThis parameter is the text string for the note.

Returns

This command returns nothing.

getText

$note getText

This command returns the text associated with the note.

Parameters

None

Returns

This command returns a text string.

setPosition

$note setPosition point

This command specifies the lower left corner for the first character of the first line of text for the note.

Parameters

positionThis parameter is the starting point of the text.

Returns

This command returns nothing.

getPosition

$note getPosition

This command returns the position of the lower left corner of the first character.

Parameters

None

Returns

This command returns a point.

setFont

$note setFont < SansSerif | Serif | Fixed >

This command specifies the font for the note.

Parameters

optionThis parameter specifies the font type to use.  Valid options are SansSerif, Serif, or Fixed.

Returns

This command returns nothing.

getFont

$note getFont

This command returns the font used by the note.

Parameters

None

Returns

This command returns a string.

setStyle

$note setStyle options

This command specifies the font style for the note.

Parameters

optionsThis parameter specifies the list of styles to apply.  An empty list removes all styles.  The valid style types are Bold, Underline, and Italic.  The list can contain any combination of the values.

Returns

This command returns nothing.

getStyle

$note getStyle

This command returns the style associated with the note.

Parameters

None

Returns

This command returns a list of string values.  An empty list indicates no special style values.

setSize

$note setSize size

This command specifies the local font size of the text before it is transformed.  If the transformation contains a scaling component, the end size of the font will be different.

Parameters

sizeThis parameter is the size of the font, as measured by the letter ‘M’.

Returns

This command returns nothing.

getSize

$note getSize

This command returns the font size of the note as measured by the height of the letter ‘M’.  Note that this is the size of the text before it is transformed by the note’s transformation matrix.

Parameters

None

Returns

This command returns a real value.

setHorizontal

$note setHorizontal value

This command controls whether the text is written left to right or top to bottom.

Parameters

valueIf the value is true, the text will be written left to right.  If the value is false, the text will be written from top to bottom.

Returns

This command returns nothing.

isHorizontal

$note isHorizontal

This command returns a true value if the text is written from left to right and a false value if the text is written from top to bottom.

Parameters

None

Returns

This command returns a boolean value.

setCharacterSlant

This command specifies the angle of slant for each character.

Parameters

textThis parameter is angle of slant in degrees from the character’s local X-axis measured counter-clockwise.  The default value is 90 and the range is (0, 180);

Returns

This command returns nothing.

getCharacterSlant

This command returns the angle each character is slanted as measured from the baseline (90 degrees is the default representing no slant).

Parameters

None

Returns

This command returns a real value indicating the slant angle in degrees.

setTransformation

$note setTransformation xform

This command specifies how the text is transformed from its local XY plane into global coordinates.  Normally it should be a pure rotation matrix such as specified by the rotation command of pwu::Transform, but any matrix is supported.  The transformation is applied before the text is translated to its starting position.  Note that if the transformation has a scaling component, the size value of the note will not be the true size of the font.  If the transformation has a translation component, the start position of the text will be updated to reflect the true start position.

Parameters

xformThis parameter is transformation of the note from local XY space into global coordinate space.  It is applied about before the note is translated by its starting position.

Returns

This command returns nothing.

getTransformation

$note getTransformation

This command returns the transformation matrix used to transform the text from its local XY plane into global coordinates.

Parameters

None

Returns

This command returns a transformation matrix.

pw::Note create
This action creates a new database note object.
$note setText $text
This command specifies the text for the note.
$note getText
This command returns the text associated with the note.
$note setPosition point
This command specifies the lower left corner for the first character of the first line of text for the note.
$note getPosition
This command returns the position of the lower left corner of the first character.
$note setFont < SansSerif | Serif | Fixed >
This command specifies the font for the note.
$note getFont
This command returns the font used by the note.
$note setStyle options
This command specifies the font style for the note.
$note getStyle
This command returns the style associated with the note.
$note setSize size
This command specifies the local font size of the text before it is transformed.
$note getSize
This command returns the font size of the note as measured by the height of the letter ‘M’.
$note setHorizontal value
This command controls whether the text is written left to right or top to bottom.
$note isHorizontal
This command returns a true value if the text is written from left to right and a false value if the text is written from top to bottom.
$note setTransformation xform
This command specifies how the text is transformed from its local XY plane into global coordinates.
$note getTransformation
This command returns the transformation matrix used to transform the text from its local XY plane into global coordinates.
Base type for all glyph types
Entity type
Base type for all database entities
Database note type
Close