Class: DVText

DVText

new DVText(args)

A DVisual graph element indicate a text
Parameters:
Name Type Description
args Array.<Object> a array contain arguments below
Properties
Name Type Attributes Default Description
x double the x value of the dot
y double the y value of the dot,0 in default
text string the text content you want to draw
font string <optional>
"8px Arial" the text's font
color DVColor <optional>
new DVColor() the color of the dot,black in default
style string <optional>
'fill' the style of this dot,should be one of 'fill','stroke'
shadow boolean <optional>
true whether draw text's shadow.
maxwidth double <optional>
-1 the limited width of printed text,-1 means no limit
textAlign string <optional>
'left' the text align of printed text position
direction string <optional>
'horizontal' the direction of text:horizontal or vertical
lineWidth double <optional>
'1' the lineWidth of text
rotate double <optional>
0 the lineWidth of text
Source:
Example
new DVDot({'x':100,'y':100,'font'="13px Arial"});

Methods

draw(dv)

draw the text on dv's canvas
Parameters:
Name Type Description
dv DVisual the Dvisual instance you want to draw
Source: