%%PageItemTitle%%

VectorDraw Web Library

JsPropertiesExtractor Send comments on this topic.
newvertex Method
See Also  Example
vdWebLibrary Namespace > vdgeo Class : newvertex Method
x
A numerical value representing the x value of the vertex.
y
A numerical value representing the y value of the vertex.
z
A numerical value representing the z value of the vertex.
bulge
A numerical value representing the bulge of the vertex.
Creates and returns a new 4 sized Array object. The first element of the Array represents the x value of the vertex, the second element the y vertex, the third the z vertex and the fourth the bulge of the vertex.

Syntax

JScript 
public function newvertex( 
   x : double,
   y : double,
   z : double,
   bulge : double
) : Object;

Parameters

x
A numerical value representing the x value of the vertex.
y
A numerical value representing the y value of the vertex.
z
A numerical value representing the z value of the vertex.
bulge
A numerical value representing the bulge of the vertex.

Return Value

A 4 sized Array object containing the x, y, z, bulge values of the vertex.

Example

C#Copy Code
function AddPolyline() { 
    var vdcanvas = vdmanager.vdrawObject('canvas'); 
    var vertexes = [vdgeo.newvertex(-20, -20, 0 , 0),vdgeo.newvertex(-20, 10, 0 , 0.5), vdgeo.newvertex(30, 15, 0 , 0), vdgeo.newvertex(30, 0, 0 , 0)]; 
    var vdPolyline = vdcanvas.AddPolyline(vertexes, false); 
    vdPolyline.Flag = 1; 
    vdcanvas.zoomExtents(); 
    vdcanvas.redraw(); 

See Also