namespace anychart.graphics.vector.primitives Improve this Doc
Namespace for anychart.graphics.vector.primitives. Contains some predefined functions to simply create common paths.
Functions Overview
cross()  Draws a cross set by it's circumscribed circle's center and radius. 
diagonalCross()  Draws a diagonal cross set by it's circumscribed circle's center and radius. 
diamond()  Draws a diamond set by it's circumscribed circle's center and radius. 
donut()  Draws a donut sector with sides. If sweep modulus is larger or equal 360, draws two concentric circles (without sides). 
hLine()  Draws a thick horizontal line set by it's circumscribed circle's center and radius. 
pie()  Draws a pie sector with sides (a curvilinear isosceles triangle with center in (cx, cy)). 
roundedInnerRect()  Draws a rectangle with rounded corners. 
roundedRect()  Draws a rectangle with rounded inner corners. 
star()  Draws multipointed star. 
star10()  Draws a 10spiked star. 
star4()  Draws a 4spiked star. 
star5()  Draws a 5spiked star. 
star6()  Draws a 6spiked star. 
star7()  Draws a 7spiked star. 
triangleDown()  Draws a triangle heading downwards set by it's circumscribed circle's center and radius. 
triangleLeft()  Draws a triangle heading leftwards set by it's circumscribed circle's center and radius. 
triangleRight()  Draws a triangle heading rightwards set by it's circumscribed circle's center and radius. 
triangleUp()  Draws a triangle heading upwards set by it's circumscribed circle's center and radius. 
truncatedRect()  Draws a rectangle with truncated corners. 
vLine()  Draws a thick vertical line set by it's circumscribed circle's center and radius. 
Functions Description
cross
Draws a cross set by it's circumscribed circle's center and radius.
Params:
Name  Type  Description 

stageOrPath  anychart.graphics.vector.Stage  anychart.graphics.vector.Path  Stage to create a path or a Path to append a star. Path is not cleared before star drawing, so you need to clear it manually. 
centerX  number  X coordinate of star center. 
centerY  number  Y coordinate of star center. 
outerRadius  number  Outer star radius. 
Returns:
anychart.graphics.vector.Path  An instance of the class for method chaining.Try it:
diagonalCross
Draws a diagonal cross set by it's circumscribed circle's center and radius.
Params:
Name  Type  Description 

stageOrPath  anychart.graphics.vector.Stage  anychart.graphics.vector.Path  Stage to create a path or a Path to append a star. Path is not cleared before star drawing, so you need to clear it manually. 
centerX  number  X coordinate of star center. 
centerY  number  Y coordinate of star center. 
outerRadius  number  Outer star radius. 
Returns:
anychart.graphics.vector.Path  An instance of the class for method chaining.Try it:
diamond
Draws a diamond set by it's circumscribed circle's center and radius.
Params:
Name  Type  Description 

stageOrPath  anychart.graphics.vector.Stage  anychart.graphics.vector.Path  Stage to create a path or a Path to append a diamond. Path is not cleared before star drawing, so you need to clear it manually. 
centerX  number  X coordinate of diamond circumscribed circle's center. 
centerY  number  Y coordinate of diamond circumscribed circle's center. 
outerRadius  number  Diamond circumscribed circle's radius. 
Returns:
anychart.graphics.vector.Path  An instance of the class for method chaining.Try it:
donut
Draws a donut sector with sides. If sweep modulus is larger or equal 360, draws two concentric circles (without sides).
Detailed description
C(cx, cy) is a center of a circle.
Position of A point is defined by outerR radius and start angle.
Position of B point is defined by innerR rdius and start angle.
Then an arc of sweep length is drawn from A point.
C(cx, cy) is a center of a circle.
Position of A point is defined by outerR radius and start angle.
Position of B point is defined by innerR rdius and start angle.
Then an arc of sweep length is drawn from A point.
Params:
Name  Type  Description 

stageOrPath  anychart.graphics.vector.Stage  anychart.graphics.vector.Path  Stage to create a path or a Path to append a donut. Path is not cleared before star drawing, so you need to clear it manually. 
cx  number  Center x. 
cy  number  Center y. 
outerR  number  Outer radius. 
innerR  number  Inner radius. 
start  number  Start angle in degrees. 
sweep  number  Sweep angle in degrees. 
Returns:
anychart.graphics.vector.Path  An instance of the class for method chaining.Try it:
hLine
Draws a thick horizontal line set by it's circumscribed circle's center and radius.
Params:
Name  Type  Description 

stageOrPath  anychart.graphics.vector.Stage  anychart.graphics.vector.Path  Stage to create a path or a Path to append a star. Path is not cleared before star drawing, so you need to clear it manually. 
centerX  number  X coordinate of star center. 
centerY  number  Y coordinate of star center. 
outerRadius  number  Outer star radius. 
Returns:
anychart.graphics.vector.Path  An instance of the class for method chaining.Try it:
pie
Draws a pie sector with sides (a curvilinear isosceles triangle with center in (cx, cy)).
If sweep modulus is larger or equal 360, draws an ellipse (without sector sides).
Detailed description
C(cx, cy) is a center of a circle.
Position of A point is defined by r radius and start angle start.
Then an arc of sweep length is drawn from A point.
C(cx, cy) is a center of a circle.
Position of A point is defined by r radius and start angle start.
Then an arc of sweep length is drawn from A point.
Params:
Name  Type  Description 

stageOrPath  anychart.graphics.vector.Stage  anychart.graphics.vector.Path  Stage to create a path or a Path to append a pie. Path is not cleared before star drawing, so you need to clear it manually. 
cx  number  Center x. 
cy  number  Center y. 
r  number  Radius. 
start  number  Start angle in degrees. 
sweep  number  Sweep angle in degrees. 
Returns:
anychart.graphics.vector.Path  An instance of the class for method chaining.Try it:
roundedInnerRect
Draws a rectangle with rounded corners.
Params:
Name  Type  Description  

stageOrPath  anychart.graphics.vector.Stage  anychart.graphics.vector.Path  to create a path or a Path to append a rect. Path is not cleared before rect drawing, so you need to clear it manually.  
rect  anychart.graphics.math.Rect  Rect which corners will be truncated.  
var_args  number  Set of param which define corners radius of rectangle:

Returns:
anychart.graphics.vector.Path  An instance of the class for method chaining.Try it:
roundedRect
Draws a rectangle with rounded inner corners.
Params:
Name  Type  Description  

stageOrPath  anychart.graphics.vector.Stage  anychart.graphics.vector.Path  to create a path or a Path to append a rect. Path is not cleared before rect drawing, so you need to clear it manually.  
rect  anychart.graphics.math.Rect  Rect which corners will be truncated.  
var_args  number  Set of param which define corners radius of rectangle:

Returns:
anychart.graphics.vector.Path  An instance of the class for method chaining.Try it:
star
Draws multipointed star.
Detailed description
 Case A: Default star position is marked with blue, rotated  with black.
 Case B: Default smoothing is marked with blue, negative value  with black.
 Case C: Default smoothing is marked with blue, positive value  with black.
Params:
Name  Type  Description 

stageOrPath  anychart.graphics.vector.Stage  anychart.graphics.vector.Path  Stage to create a path or a Path to append a star. Path is not cleared before star drawing, so you need to clear it manually. 
centerX  number  X coordinate of star center. 
centerY  number  Y coordinate of star center.truncatedRect 
outerRadius  number  Outer star radius. 
innerRadius  number  Inner star radius. 
numberOfSpikes  number  Number of star spikes. Should be 2 or higher. 
startDegrees  number  Angle of the first spike in degrees. 
curvature  number  Curvature factor. Scopes from 1 to 1, default is 0. 0 Means that spikes will be drawn as lines, positive values make spikes thicker and negative make spikes thinner. 
Returns:
anychart.graphics.vector.Path  An instance of the class for method chaining.Try it:
star10
Draws a 10spiked star.
Params:
Name  Type  Description 

stageOrPath  anychart.graphics.vector.Stage  anychart.graphics.vector.Path  Stage to create a path or a Path to append a star. Path is not cleared before star drawing, so you need to clear it manually. 
centerX  number  X coordinate of star center. 
centerY  number  Y coordinate of star center. 
outerRadius  number  Outer star radius. 
Returns:
anychart.graphics.vector.Path  An instance of the class for method chaining.Try it:
star4
Draws a 4spiked star.
Params:
Name  Type  Description 

stageOrPath  anychart.graphics.vector.Stage  anychart.graphics.vector.Path  Stage to create a path or a Path to append a star. Path is not cleared before star drawing, so you need to clear it manually. 
centerX  number  X coordinate of star center. 
centerY  number  Y coordinate of star center. 
outerRadius  number  Outer star radius. 
Returns:
anychart.graphics.vector.Path  An instance of the class for method chaining.Try it:
star5
Draws a 5spiked star.
Params:
Name  Type  Description 

stageOrPath  anychart.graphics.vector.Stage  anychart.graphics.vector.Path  Stage to create a path or a Path to append a star. Path is not cleared before star drawing, so you need to clear it manually. 
centerX  number  X coordinate of star center. 
centerY  number  Y coordinate of star center. 
outerRadius  number  Outer star radius. 
Returns:
anychart.graphics.vector.Path  An instance of the class for method chaining.Try it:
star6
Draws a 6spiked star.
Params:
Name  Type  Description 

stageOrPath  anychart.graphics.vector.Stage  anychart.graphics.vector.Path  Stage to create a path or a Path to append a star. Path is not cleared before star drawing, so you need to clear it manually. 
centerX  number  X coordinate of star center. 
centerY  number  Y coordinate of star center. 
outerRadius  number  Outer star radius. 
Returns:
anychart.graphics.vector.Path  An instance of the class for method chaining.Try it:
star7
Draws a 7spiked star.
Params:
Name  Type  Description 

stageOrPath  anychart.graphics.vector.Stage  anychart.graphics.vector.Path  Stage to create a path or a Path to append a star. Path is not cleared before star drawing, so you need to clear it manually. 
centerX  number  X coordinate of star center. 
centerY  number  Y coordinate of star center. 
outerRadius  number  Outer star radius. 
Returns:
anychart.graphics.vector.Path  An instance of the class for method chaining.Try it:
triangleDown
Draws a triangle heading downwards set by it's circumscribed circle's center and radius.
Params:
Name  Type  Description 

stageOrPath  anychart.graphics.vector.Stage  anychart.graphics.vector.Path  Stage to create a path or a Path to append a triangle. Path is not cleared before star drawing, so you need to clear it manually. 
centerX  number  X coordinate of triangle circumscribed circle's center. 
centerY  number  Y coordinate of triangle circumscribed circle's center. 
outerRadius  number  Triangle circumscribed circle's radius. 
Returns:
anychart.graphics.vector.Path  An instance of the class for method chaining.Try it:
triangleLeft
Draws a triangle heading leftwards set by it's circumscribed circle's center and radius.
Params:
Name  Type  Description 

stageOrPath  anychart.graphics.vector.Stage  anychart.graphics.vector.Path  Stage to create a path or a Path to append a triangle. Path is not cleared before star drawing, so you need to clear it manually. 
centerX  number  X coordinate of triangle circumscribed circle's center. 
centerY  number  Y coordinate of triangle circumscribed circle's center. 
outerRadius  number  Triangle circumscribed circle's radius. 
Returns:
anychart.graphics.vector.Path  An instance of the class for method chaining.Try it:
triangleRight
Draws a triangle heading rightwards set by it's circumscribed circle's center and radius.
Params:
Name  Type  Description 

stageOrPath  anychart.graphics.vector.Stage  anychart.graphics.vector.Path  Stage to create a path or a Path to append a triangle. Path is not cleared before star drawing, so you need to clear it manually. 
centerX  number  X coordinate of triangle circumscribed circle's center. 
centerY  number  Y coordinate of triangle circumscribed circle's center. 
outerRadius  number  Triangle circumscribed circle's radius. 
Returns:
anychart.graphics.vector.Path  An instance of the class for method chaining.Try it:
triangleUp
Draws a triangle heading upwards set by it's circumscribed circle's center and radius.
Params:
Name  Type  Description 

stageOrPath  anychart.graphics.vector.Stage  anychart.graphics.vector.Path  Stage to create a path or a Path to append a triangle. Path is not cleared before star drawing, so you need to clear it manually. 
centerX  number  X coordinate of triangle circumscribed circle's center. 
centerY  number  Y coordinate of triangle circumscribed circle's center. 
outerRadius  number  Triangle circumscribed circle's radius. 
Returns:
anychart.graphics.vector.Path  An instance of the class for method chaining.Try it:
truncatedRect
Draws a rectangle with truncated corners.
Params:
Name  Type  Description  

stageOrPath  anychart.graphics.vector.Stage  anychart.graphics.vector.Path  to create a path or a Path to append a rect. Path is not cleared before rect drawing, so you need to clear it manually.  
rect  anychart.graphics.math.Rect  Rect which corners will be truncated.  
var_args  number  Set of param which define corners radius of rectangle.

Returns:
anychart.graphics.vector.Path  An instance of the class for method chaining.Try it:
vLine
Draws a thick vertical line set by it's circumscribed circle's center and radius.
Params:
Name  Type  Description 

stageOrPath  anychart.graphics.vector.Stage  anychart.graphics.vector.Path  Stage to create a path or a Path to append a star. Path is not cleared before star drawing, so you need to clear it manually. 
centerX  number  X coordinate of star center. 
centerY  number  Y coordinate of star center. 
outerRadius  number  Outer star radius. 
Returns:
anychart.graphics.vector.Path  An instance of the class for method chaining.Try it: