|
Shodo | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Object | +--Shodo.Font
| Method Summary | |
void
|
disableVML()
Disable VML rendering (for Internet Explorer only). |
void
|
drawAbove(<String> string, <Number> x, <Number> y, <Number> offset, <Number> linespacing)
Draw the specified string center aligned above the specified point (plus any specified vertical offset). |
void
|
drawAlignedTo(<String> string, <Number> x, <Number> y, <Number> linespacing, <Number> angle)
Draw the specified string aligned to the specified point in the canvas. |
void
|
drawBelow(<String> string, <Number> x, <Number> y, <Number> offset, <Number> linespacing)
Draw the specified string center aligned below the specified point (plus any specified vertical offset). |
void
|
drawLeftOf(<String> string, <Number> x, <Number> y, <Number> offset, <Number> linespacing)
Draw the specified string right aligned and vertically centered to the left of the specified point (plus any specified horizontal offset). |
void
|
drawRightOf(<String> string, <Number> x, <Number> y, <Number> offset, <Number> linespacing)
Draw the specified string left aligned and vertically centered to the right of the specified point (plus any specified horizontal offset). |
void
|
drawString(<String> string, <Number> x, <Number> y, <Number> linespacing, <String> align, <Number> angle)
Draw the specified string into the font's canvas. |
void
|
enableVML()
Enable VML rendering (for Internet Explorer only). |
Array
|
getBounds(<String> string, <Number> x, <Number> y, <Number> linespacing, <Number> angle)
Compute the bounding box of the specified string drawn using the specified font/size/color, linespacing, and rotation angle. |
Number
|
getHeight()
Returns the Height property (in pixels) of this font. |
| Method Detail |
void disableVML()
void drawAbove(<String> string, <Number> x, <Number> y, <Number> offset, <Number> linespacing)
string - string to be drawn. May include newlines, but must otherwise only contain characters from the mapped character set
x - left horizontal coordinate where the string is to be drawn
y - top vertical coordinate where the string is to be drawn
offset - optional number of pixels to offset between bottom of string and the specified (x, y) coordinate); default 0
linespacing - optional number of pixels between successive lines of text. Default is 4.
void drawAlignedTo(<String> string, <Number> x, <Number> y, <Number> linespacing, <Number> angle)
string - string to be drawn. May include newlines, but must otherwise only contain characters from the mapped character set
x - left horizontal coordinate where the string is to be drawn
y - top vertical coordinate where the string is to be drawn
linespacing - optional number of pixels between successive lines of text. Default is 4.
angle - optional rotation angle in degrees for the rendered text; default 0. All rotation angles are computed using the upper left corner of the text bounding box as the origin. Positive angles are clockwise, negative angles are counter clockwise.
void drawBelow(<String> string, <Number> x, <Number> y, <Number> offset, <Number> linespacing)
string - string to be drawn. May include newlines, but must otherwise only contain characters from the mapped character set
x - left horizontal coordinate where the string is to be drawn
y - top vertical coordinate where the string is to be drawn
offset - optional number of pixels to offset between top of string and the specified (x, y) coordinate); default 0
linespacing - optional number of pixels between successive lines of text. Default is 4.
void drawLeftOf(<String> string, <Number> x, <Number> y, <Number> offset, <Number> linespacing)
string - string to be drawn. May include newlines, but must otherwise only contain characters from the mapped character set
x - left horizontal coordinate where the string is to be drawn
y - top vertical coordinate where the string is to be drawn
offset - optional number of pixels to offset between right end of string and the specified (x, y) coordinate); default 0
linespacing - optional number of pixels between successive lines of text. Default is 4.
void drawRightOf(<String> string, <Number> x, <Number> y, <Number> offset, <Number> linespacing)
string - string to be drawn. May include newlines, but must otherwise only contain characters from the mapped character set
x - left horizontal coordinate where the string is to be drawn
y - top vertical coordinate where the string is to be drawn
offset - optional number of pixels to offset between left end of string and the specified (x, y) coordinate); default 0
linespacing - optional number of pixels between successive lines of text. Default is 4.
void drawString(<String> string, <Number> x, <Number> y, <Number> linespacing, <String> align, <Number> angle)
string - string to be drawn. May include newlines, but must otherwise only contain characters from the mapped character set
x - left horizontal coordinate where the string is to be drawn
y - top vertical coordinate where the string is to be drawn
linespacing - optional number of pixels between successive lines of text. Default is 4.
align - optional horizontal alignment of text within total bounding box: 'left', 'right', or 'center', default 'left'
angle - optional rotation angle in degrees for the rendered text; default 0. All rotation angles are computed using the upper left corner of the text bounding box as the origin. Positive angles are clockwise, negative angles are counter clockwise.
void enableVML()
Array getBounds(<String> string, <Number> x, <Number> y, <Number> linespacing, <Number> angle)
string - string to be drawn. May include newlines, but must otherwise only contain characters from the mapped character set
x - left horizontal coordinate where the string is to be drawn
y - top vertical coordinate where the string is to be drawn
linespacing - optional number of pixels between successive lines of text. Default is 4.
angle - optional rotation angle in degrees for the rendered text; default 0. All rotation angles are computed using the upper left corner of the text bounding box as the origin. Positive angles are clockwise, negative angles are counter clockwise.
Number getHeight()
|
Shodo | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||