jsDraw2DX Graphics Library for JavaScript Please support this project by sharing it with your friends and followers,

Documentation of jsDraw2DX Javascript 2D Graphics Library (for Alpha Version)

  jsDraw2DX is a Javascript library (SVG and VML based) to draw 2D graphics on web pages inside web browser. The library is entirely written in Javascript and does not need any plug-in or additional software to run/execute. Currently this documation is just a stub since we are in process to create detailed documentation.


ClassConstructorProperties Methods
jxGraphicsjxGraphics(graphicsDivElement)origin
scale
coordinateSystem(default,cartecian)
getType()
getDiv()
getSVG()
getVML()
logicalToPhysicalPoint(point<jxPoint>)
draw(shape)
remove(shape)
redrawAll()
getShapesCount()
indexOfShape(shape)
jxColorjxColor()
jxColor(colorName)
jxColor(colorHex)
 getType()
getValue()
Statcic Methods:
rgbToHex(redValue, greenValue, blueValue)
hexToRgb(hexValue)
jxFontjxFont(family, weight, size, style, variant)family
weight
size
style
variant
getType()
jxPenjxPen(color<jxColor>, width, [dashStyle])color<jxColor>
width
dashStyle (ShortDash,ShortDot,
ShortDashDot,ShortDashDotDot,
Dot,Dash,LongDash,
DashDot,LongDashDot, LongDashDotDot)
 
jxBrushjxBrush(color<jxColor>, fillType)color<jxColor>
fillType
color2<jxColor>
getType()
jxPointjxPoint(x, y)x
y
getType()
jxLinejxLine(fromPoint<jxPoint>, toPoint<jxPoint>, [pen<jxPen>])fromPoint<jxPoint>
toPoint<jxPoint>
pen<jxPen>
getType()
addEventListener(eventName<String>, handler<Function>)
draw(graphics<jxGraphics>)
remove()
show()
hide()
jxRect jxRect(point<jxPoint>, width, height, [pen<jxPen>], [brush<jxBrush>]) point<jxPoint>dth
height
pen<jxPen>
brush
getType()dEventListener(eventName<String>, handler<Function>)
draw(graphics<jxGraphics>)
remove()
show()
hide()
jxPolylinejxPolyline(points<jxPoint Array>, [pen<jxPen>], [brush<jxBrush>])points<jxPoint Array>
pen<jxPen>ush
getType()dEventListener(eventName<String>, handler<Function>)
draw(graphics<jxGraphics>)
remove()
show()
hide()
jxPolygonjxPolygon(points<jxPoint Array>, [pen<jxPen>], [brush<jxBrush>])points<jxPoint Array>
pen<jxPen>ush
getType()dEventListener(eventName<String>, handler<Function>)
draw(graphics<jxGraphics>)
remove()
show()
hide()
jxCirclejxCircle(center<jxPoint>, radius, [pen<jxPen>], [brush<jxBrush>])center<jxPoint>
radiusn<jxPen>
brush
getType()dEventListener(eventName<String>, handler<Function>)
draw(graphics<jxGraphics>)
remove()
show()
hide()
jxEllipsejxEllipse(center<jxPoint>, width, height, [pen<jxPen>], [brush<jxBrush>])center<jxPoint>
widthight
pen<jxPen>
brush
getType()dEventListener(eventName<String>, handler<Function>)
draw(graphics<jxGraphics>)
remove()
show()
hide()
jxArcjxArc(center<jxPoint>, width, height, startAngle, arcAngle, [pen<jxPen>], [brush<jxBrush>])center<jxPoint>
widthight
startAngle
arcAngle
pen<jxPen>
brush
getType()dEventListener(eventName<String>, handler<Function>)
draw(graphics<jxGraphics>)
remove()
show()
hide()
jxArcSectorjxArcSector(center<jxPoint>, width, height, startAngle, arcAngle, [pen<jxPen>], [brush<jxBrush>])center<jxPoint>
widthight
startAngle
arcAngle
pen<jxPen>
brush
getType()dEventListener(eventName<String>, handler<Function>)
draw(graphics<jxGraphics>)
remove()
show()
hide()
jxCurve jxCurve(points<jxPoint Array>, [pen<jxPen>], [brush<jxBrush>], [tension])points<jxPoint Array>
pen<jxPen>ushtension
getType()
addEventListener(eventName<String>, handler<Function>)
draw(graphics<jxGraphics>)
remove()
show()
hide()
jxClosedCurvejxClosjxClosedCurve(points<jxPoint Array>, [pen<jxPen>], [brush<jxBrush>], [tension])points<jxPoint Array>
pen<jxPen>ushtension
getType()
addEventListener(eventName<String>, handler<Function>)
draw(graphics<jxGraphics>)
remove()
show()
hide()
jxBezierjxBezier(points<jxPoint Array>, [pen<jxPen>], [brush<jxBrush>])points<jxPoint Array>
pen<jxPen>ush
getType()dEventListener(eventName<String>, handler<Function>)
draw(graphics<jxGraphics>)
remove()
show()
hide()
jxFunctionGraphjxFunctionGraph(fn, xMin, xMax, [pen<jxPen>], [brush<jxBrush>])fnin
xMax
pen<jxPen>
brush
getType()dEventListener(eventName<String>, handler<Function>)
draw(graphics<jxGraphics>)
remove()
show()
hide()
jxText jxText(point<jxPoint>, text, [font<jxFont>], [pen<jxPen>], [brush<jxBrush>], [angle])point<jxPoint Array>
text
font<jxFont>
pen<jxPen>ushangle
getType()
addEventListener(eventName<String>, handler<Function>)
draw(graphics<jxGraphics>)
remove()
show()
hide()
jxImage jxImage(point<jxPoint>, url, width, height, [angle]) point<jxPoint>
urldth
height
angle
getType()
addEventListener(eventName<String>, handler<Function>)
draw(graphics<jxGraphics>)
remove()
show()
hide()