DrawUtils

Methods

(static) _BezierEllipse(context, x, y, a, b, h)

Source:

draw a ellipse

Parameters:
Name Type Description
context Object

canvas's context

x Number
y Number
a Number
b Number
h Number

(static) _clearRect(context, xx, yy, ww, hh)

Source:

clear rect

Parameters:
Name Type Description
context Object

canvas's context

xx Number
yy Number
ww Number
hh Number

(static) _drawBegin(context, clr)

Source:

start draw line

Parameters:
Name Type Description
context Object

canvas's context

clr String

(static) _drawCircle(context, x, y, r)

Source:

draw circle

Parameters:
Name Type Description
context Object

canvas's context

x Number
y Number
r Number

(static) _drawDashLine(context, x1, y1, x2, y2, dashLen)

Source:

draw dash line

Parameters:
Name Type Description
context Object

canvas's context

x1 Number
y1 Number
x2 Number
y2 Number
dashLen Number

(static) _drawEnd(context)

Source:

end draw

Parameters:
Name Type Description
context Object

canvas's context

(static) _drawHline(context, xx1, xx2, yy)

Source:

draw horizontal line

Parameters:
Name Type Description
context Object

canvas's context

xx1 Number
xx2 Number
yy Number

(static) _drawKBar(context, config, item)

Source:

draw kbar

Parameters:
Name Type Description
context Object

canvas's context

config Object
item Object

(static) _drawline(context, xx1, yy1, xx2, yy2)

Source:

draw line

Parameters:
Name Type Description
context Object

canvas's context

xx1 Number
yy1 Number
xx2 Number
yy2 Number

(static) _drawLineAlone(context, xx, yy, xx1, yy1, clr)

Source:

draw a alone lien

Parameters:
Name Type Description
context Object

canvas's context

xx Number
yy Number
xx1 Number
yy1 Number
clr String

(static) _drawlineTo(context, xx, yy)

Source:

draw line to

Parameters:
Name Type Description
context Object

canvas's context

xx Number
yy Number
Source:

draw logo

Parameters:
Name Type Description
context any
xx any
yy any
size any

(static) _drawmoveTo(context, xx, yy)

Source:

move to position

Parameters:
Name Type Description
context Object

canvas's context

xx Number
yy Number

(static) _drawRect(context, xx, yy, ww, hh)

Source:

draw empty rect

Parameters:
Name Type Description
context Object

canvas's context

xx Number
yy Number
ww Number
hh Number

(static) _drawSignCircle(context, x, y, Arc1, Arc2, Arc3)

Source:

draw sign circle

Parameters:
Name Type Description
context Object

canvas's context

x Number
y Number
Arc1 Object
Arc2 Object
Arc3 Object

(static) _drawSignHLine(context, config, item)

Source:

draw sing horizontal line

Parameters:
Name Type Description
context Object

canvas's context

config Object
item Object

(static) _drawSignPlot(context, x, y, Arc1, Arc2)

Source:

draw sign plot

Parameters:
Name Type Description
context Object

canvas's context

x Number
y Number
Arc1 Object
Arc2 Object

(static) _drawSignVLine(context, config, item)

Source:

draw sign vertical line

Parameters:
Name Type Description
context Object

canvas's context

config Object
item Object

(static) _drawTxt(context, xx, yy, txt, font, pixel, clr, pos)

Source:

draw text

Parameters:
Name Type Description
context Object

canvas's context

xx Number
yy Number
txt String
font String
pixel Number
clr String
pos Object

(static) _drawTxtRect(context, xx, yy, txt, config)

Source:

draw text rect

Parameters:
Name Type Description
context Object

canvas's context

xx Number
yy Number
txt String
config Object

(static) _drawVBar(context, config, value)

Source:

draw volume bar

Parameters:
Name Type Description
context Object

canvas's context

config Object
value Object

(static) _drawVline(context, xx, yy1, yy2)

Source:

draw vertical line

Parameters:
Name Type Description
context Object

canvas's context

xx Number
yy1 Number
yy2 Number

(static) _fill(context, fillclr)

Source:

fill by color

Parameters:
Name Type Description
context Object

canvas's context

fillclr String

(static) _fillRect(context, xx, yy, ww, hh, fillclr)

Source:

draw fill rect

Parameters:
Name Type Description
context Object

canvas's context

xx Number
yy Number
ww Number
hh Number
fillclr String

(static) _getImageData(context, xx, yy, ww, hh) → {Object}

Source:

get image data

Parameters:
Name Type Description
context Object

canvas's context

xx Number
yy Number
ww Number
hh Number
Returns:
Type
Object

(static) _getLineWidth(context) → {Number}

Source:

get line width

Parameters:
Name Type Description
context Object

canvas's context

Returns:

line width

Type
Number

(static) _getTxtWidth(context, txt, font, pixel) → {Number}

Source:

get text width

Parameters:
Name Type Description
context Object

canvas's context

txt String
font String
pixel Number
Returns:

string width

Type
Number

(static) _putImageData(context, img, xx, yy)

Source:

put image data

Parameters:
Name Type Description
context Object

canvas's context

img Object
xx Number
yy Number

(static) _setFontSize(context, font, pixel)

Source:

set font size

Parameters:
Name Type Description
context Object

canvas's context

font String
pixel Number

(static) _setLineWidth(context, l)

Source:

set line width

Parameters:
Name Type Description
context Object

canvas's context

l Number

line width

(static) _setTransColor(scolor, trans, style) → {String}

Source:

transfer color to rgba

Parameters:
Name Type Description
scolor String
trans Number
style String
Returns:
Type
String

(inner) __getTxtRect(context, txt, config) → {Object}

Source:

get text bound rect

Parameters:
Name Type Description
context Object

canvas's context

txt String
config Object
Returns:
Type
Object

(inner) _drawCircleAndFilled(context, x, y, r, clr)

Source:

draw circle center point

Parameters:
Name Type Description
context Object

canvas's context

x Number
y Number
r Number
clr String

(inner) getTxtWith(charMap, txt, fontSize) → {Number}

Source:

get text width from charmap by fontsize

Parameters:
Name Type Description
charMap Object
txt String
fontSize Number
Returns:
Type
Number