-
public class HatchFill extends PatternFill
HatchFill is a special pattern fill with predefined set of a primitives. Sets of a primitives does numbered and declared in anychart.graphics.vector.HatchFill.HatchFillType enum. Hatch fill properties will be applied to his children (sets of a primitives). HatchFill is a immutable fill, therefore after rendering his a properties can not be changed.Do not invoke constructor directly. Use hatchFill or hatchFill. See also:hatchFill,hatchFill.
-
-
Method Summary
Modifier and Type Method Description static HatchFillinstantiate()StringgetJsBase()HatchFilladdChild(Element element)Add element to a layer, to the top (maximal index). HatchFilladdChildAt(Element element, Number index)Adds an element to a layer by index. HatchFillappendTransformationMatrix(Number m00, Number m10, Number m01, Number m11, Number m02, Number m12)Combines the current transformation with the given transformation matrix. voidattr(String key)Getter for the attribute. HatchFillattr(String key, String value)Setter for the attribute. Circlecircle(Number cx, Number cy, Number radius)Invokes anychart.graphics.vector. Rectclip()Gets the current clipping rectangle. HatchFillclip(Rect value)Sets the clipping rectangle. HatchFillclip(String value)Sets the clipping rectangle. voidcross()Draws a cross set by its circumscribed circle center and radius. voidcursor()Getter for the current cursor type. HatchFillcursor(Cursor value)Setter for the cursor type. voiddesc()Getter for the element description value. HatchFilldesc(String value)Setter for the element description value. voiddiagonalCross()Draws a diagonal cross set by its circumscribed circle center and radius. voiddiamond()Draws a diamond set by its circumscribed circle center and radius. voiddisablePointerEvents()Gets the current value of the pointer events. HatchFilldisablePointerEvents(Boolean value)Disables the pointer events. voiddisableStrokeScaling()Getter for the current element's vector effect property. HatchFilldisableStrokeScaling(Boolean value)Setter for the element's vector effect property. voiddispose()Disposes element completely. voiddomElement()Returns DOM element if element is rendered. voiddonut()Draws sector as donut chart element. voiddrag()Returns the current state flag. HatchFilldrag(Boolean value)Turns off/on dragging (moving) of an element. HatchFilldrag(Rect value)Turns off/on dragging (moving) of an element. Ellipseellipse(Number cx, Number cy, Number rx, Number ry)Invokes anychart.graphics.vector. RectgetAbsoluteBounds()Gets element bounds in absolute coordinates (root element coordinate system). voidgetAbsoluteHeight()Returns height within root bounds. voidgetAbsoluteWidth()Returns width within root bounds. voidgetAbsoluteX()Returns an absolute X (root element coordinate system). voidgetAbsoluteY()Returns an absolute Y (root element coordinate system). RectgetBounds()Returns the bounds. HatchFillgetChildAt(Number index)Returns element by index. voidgetHeight()Returns the height. voidgetRotationAngle()Returns the current rotation angle in degrees. StagegetStage()Stage object (to which the given element is bound). voidgetTransformationMatrix()Returns the current transformation matrix. voidgetWidth()Returns the width. voidgetX()Returns X in the coordinate system of the parent. voidgetY()Returns Y in the coordinate system of the parent. voidhLine()Draws a thick horizontal line set by its circumscribed circle center and radius. voidhasChild(Element element)Checks if there is such element in children set. voidhasParent()Whether parent element is set. voidid()Gets the current element identifier. HatchFillid(String id)Sets the element identifier. Imageimage(String src, Number x, Number y, Number width, Number height)Invokes anychart.graphics.vector. voidindexOfChild(Element element)Looks for an element in a layer and returns index or -1, if not found. HatchFilllayer()Invokes anychart.graphics.vector. voidnumChildren()Returns the number of children. HatchFillparent()Returns the parent layer. HatchFillparent(Layer parent)Adds element to the given layer. HatchFillparent(Stage parent)Adds element to the given layer. Pathpath()Invokes anychart.graphics.vector. voidpie()Draws sector as pie chart element. Rectrect(Number x, Number y, Number width, Number height)Invokes anychart.graphics.vector. HatchFillremove()Current element removes itself from the parent layer. voidremoveAllListeners(String type)Removes all listeners from this listenable. HatchFillremoveChild(Element element)Removes element from a layer. HatchFillremoveChildAt(Number index)Removes element from a layer by index. voidremoveChildren()Removes all children from a layer. HatchFillrotate(Number degrees, Number cx, Number cy)Rotates a shape around the given rotation point. HatchFillrotateByAnchor(Number degrees, Anchor anchor)Rotates a shape around the given anchor. HatchFillrotateByAnchor(Number degrees, String anchor)Rotates a shape around the given anchor. voidroundedInnerRect()Draws rectangle with corners rounded inside. voidroundedRect()Draws rectangle with rounded corners. HatchFillscale(Number sx, Number sy, Number cx, Number cy)Scales a shape. HatchFillscaleByAnchor(Number sx, Number sy, Anchor anchor)Scales a shape by anchor. HatchFillscaleByAnchor(Number sx, Number sy, String anchor)Scales a shape by anchor. HatchFillsetPosition(Number x, Number y)Sets top left corner of a shape (transformation taken into account) in the coordinate system of the parent. HatchFillsetRotation(Number degrees, Number cx, Number cy)Rotates a shape around the given point. HatchFillsetRotationByAnchor(Number degrees, Anchor anchor)Rotates a shape around the given anchor. HatchFillsetRotationByAnchor(Number degrees, String anchor)Rotates a shape around the given anchor. HatchFillsetTransformationMatrix(Number m00, Number m10, Number m01, Number m11, Number m02, Number m12)Sets the transformation matrix. voidstar()Draws multi-pointed star. voidstar10()Draws ten-pointed star. voidstar4()Draws four-pointed star. voidstar5()Draws five-pointed star. voidstar6()Draws six-pointed star. voidstar7()Draws seven-pointed star. HatchFillswapChildren(Element element1, Element element2)Swaps children. HatchFillswapChildrenAt(Number index1, Number index2)Swaps children by indexes. voidtitle()Getter for the element title value. HatchFilltitle(String value)Setter for the element title value. HatchFilltranslate(Number tx, Number ty)Moves a shape taking an account the current transformation. voidtriangleDown()Draws a triangle heading downwards set by its circumscribed circle center and radius. voidtriangleLeft()Draws a triangle heading leftwards set by its circumscribed circle center and radius. voidtriangleRight()Draws a triangle heading rightwards set by its circumscribed circle center and radius. voidtriangleUp()Draws a triangle heading upwards set by its circumscribed circle center and radius. voidtruncatedRect()Draws rectangle with cut corners. voidsetOnClickListener(ListenersInterface.OnClickListener listener)voidsetOnClickListener(ListenersInterface.OnClickListener listener, String type, String ePath)voidvLine()Draws a thick vertical line set by its circumscribed circle center and radius. voidvisible()Gets the current visibility flag. HatchFillvisible(Boolean isVisible)Hides or shows an element. voidzIndex()Gets the current element's zIndex. HatchFillzIndex(Number value)Sets the element's zIndex. voidunlistenByKey(String key)Removes an event listener which was added with listen() by the key returned by listen(). -
Methods inherited from class com.anychart.graphics.vector.PatternFill
addChild, addChildAt, appendTransformationMatrix, attr, clip, clip, cursor, desc, disablePointerEvents, disableStrokeScaling, drag, drag, getChildAt, id, instantiate, layer, parent, parent, parent, remove, removeChild, removeChildAt, rotate, rotateByAnchor, rotateByAnchor, scale, scaleByAnchor, scaleByAnchor, setPosition, setRotation, setRotationByAnchor, setRotationByAnchor, setTransformationMatrix, swapChildren, swapChildrenAt, title, translate, visible, zIndex -
Methods inherited from class com.anychart.graphics.vector.Layer
addChild, addChildAt, appendTransformationMatrix, attr, clip, clip, cursor, desc, disablePointerEvents, disableStrokeScaling, drag, drag, getChildAt, id, instantiate, layer, parent, parent, parent, remove, removeChild, removeChildAt, rotate, rotateByAnchor, rotateByAnchor, scale, scaleByAnchor, scaleByAnchor, setPosition, setRotation, setRotationByAnchor, setRotationByAnchor, setTransformationMatrix, swapChildren, swapChildrenAt, title, translate, visible, zIndex -
Methods inherited from class com.anychart.graphics.vector.Element
appendTransformationMatrix, attr, clip, clip, cursor, desc, disablePointerEvents, disableStrokeScaling, drag, drag, id, instantiate, parent, parent, remove, rotate, rotateByAnchor, rotateByAnchor, scale, scaleByAnchor, scaleByAnchor, setPosition, setRotation, setRotationByAnchor, setRotationByAnchor, setTransformationMatrix, title, translate, visible, zIndex -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
HatchFill
HatchFill(String jsChart)
-
-
Method Detail
-
instantiate
static HatchFill instantiate()
-
addChild
HatchFill addChild(Element element)
Add element to a layer, to the top (maximal index). All DOM changes will happen instantly, except suspend. Simplified version of addChildAt where element is added to the end.
-
addChildAt
HatchFill addChildAt(Element element, Number index)
Adds an element to a layer by index. Note: the greater index is - the 'higher' element is in a layer top element overlaps bottom elements. All DOM changes will happen instantly, except suspend. Left image shows sequential calls of addChild Right image does the same, but star is added to 0 index.
.addChildAt(star5, 0);(see code of this image in samples).
-
appendTransformationMatrix
HatchFill appendTransformationMatrix(Number m00, Number m10, Number m01, Number m11, Number m02, Number m12)
Combines the current transformation with the given transformation matrix.
-
circle
Circle circle(Number cx, Number cy, Number radius)
Invokes anychart.graphics.vector.Circle class constructor.Note:anychart.graphics.vector.Layer does nothing to delete an object after it is used. You have to take care of used objects yourself. Read more at anychart.graphics.vector.Circle
-
cross
void cross()
Draws a cross set by its circumscribed circle center and radius. Read more at cross
-
cursor
void cursor()
Getter for the current cursor type.
-
desc
void desc()
Getter for the element description value.
-
diagonalCross
void diagonalCross()
Draws a diagonal cross set by its circumscribed circle center and radius. Read more at diagonalCross
-
diamond
void diamond()
Draws a diamond set by its circumscribed circle center and radius. Read more at diamond
-
disablePointerEvents
void disablePointerEvents()
Gets the current value of the pointer events.
-
disablePointerEvents
HatchFill disablePointerEvents(Boolean value)
Disables the pointer events.
-
disableStrokeScaling
void disableStrokeScaling()
Getter for the current element's vector effect property.
-
disableStrokeScaling
HatchFill disableStrokeScaling(Boolean value)
Setter for the element's vector effect property. Learn more by link.
-
dispose
void dispose()
Disposes element completely. Removes it from the parent layer, sets links to null, removes it from DOM.
-
domElement
void domElement()
Returns DOM element if element is rendered. In case of Stage in Suspended state or unbound element - null is returned.
-
donut
void donut()
Draws sector as donut chart element. Read more at donut
-
drag
void drag()
Returns the current state flag.
-
ellipse
Ellipse ellipse(Number cx, Number cy, Number rx, Number ry)
Invokes anychart.graphics.vector.Ellipse class constructor.Note:anychart.graphics.vector.Layer does nothing to delete an object after it is used. You have to take care of used objects yourself. Read more at anychart.graphics.vector.Ellipse
-
getAbsoluteBounds
Rect getAbsoluteBounds()
Gets element bounds in absolute coordinates (root element coordinate system).
-
getAbsoluteHeight
void getAbsoluteHeight()
Returns height within root bounds. See illustrations at getAbsoluteWidth
-
getAbsoluteWidth
void getAbsoluteWidth()
Returns width within root bounds.
-
getAbsoluteX
void getAbsoluteX()
Returns an absolute X (root element coordinate system).
-
getAbsoluteY
void getAbsoluteY()
Returns an absolute Y (root element coordinate system).
-
getChildAt
HatchFill getChildAt(Number index)
Returns element by index.
-
getHeight
void getHeight()
Returns the height.
-
getRotationAngle
void getRotationAngle()
Returns the current rotation angle in degrees.
-
getTransformationMatrix
void getTransformationMatrix()
Returns the current transformation matrix.
-
getWidth
void getWidth()
Returns the width.
-
getX
void getX()
Returns X in the coordinate system of the parent.
-
getY
void getY()
Returns Y in the coordinate system of the parent.
-
hLine
void hLine()
Draws a thick horizontal line set by its circumscribed circle center and radius. Read more at hLine
-
hasParent
void hasParent()
Whether parent element is set.
-
id
void id()
Gets the current element identifier.
-
image
Image image(String src, Number x, Number y, Number width, Number height)
Invokes anychart.graphics.vector.Image class constructor.Note:anychart.graphics.vector.Layer does nothing to delete an object after it is used. You need to take care of used objects yourself.
-
indexOfChild
void indexOfChild(Element element)
Looks for an element in a layer and returns index or -1, if not found.
-
layer
HatchFill layer()
Invokes anychart.graphics.vector.Layer class constructor.Note:anychart.graphics.vector.Layer does nothing to delete an object after it is used. You have to take care of used objects yourself.
-
numChildren
void numChildren()
Returns the number of children.
-
path
Path path()
Invokes anychart.graphics.vector.Path class constructor.Note:anychart.graphics.vector.Layer does nothing to delete an object after it is used. You have to take care of used objects yourself. Read more at: anychart.graphics.vector.Path
-
pie
void pie()
Draws sector as pie chart element. Read more at pie
-
rect
Rect rect(Number x, Number y, Number width, Number height)
Invokes anychart.graphics.vector.Rect class constructor.Note:anychart.graphics.vector.Layer does nothing to delete an object after it is used. You have to take care of used objects yourself.
-
removeAllListeners
void removeAllListeners(String type)
Removes all listeners from this listenable.
-
removeChild
HatchFill removeChild(Element element)
Removes element from a layer. All changes in DOM will happen instantly, except suspend. Note: this method doesn't remove element, it just breaks the link between the element and the layer.This is an extension of removeChildAt method.
-
removeChildAt
HatchFill removeChildAt(Number index)
Removes element from a layer by index. All changes in DOM will happen instantly, except suspend.Note: this method doesn't remove element, it just breaks the link between the element and the layer.
-
removeChildren
void removeChildren()
Removes all children from a layer.
-
rotate
HatchFill rotate(Number degrees, Number cx, Number cy)
Rotates a shape around the given rotation point.
-
rotateByAnchor
HatchFill rotateByAnchor(Number degrees, Anchor anchor)
Rotates a shape around the given anchor.
-
rotateByAnchor
HatchFill rotateByAnchor(Number degrees, String anchor)
Rotates a shape around the given anchor.
-
roundedInnerRect
void roundedInnerRect()
Draws rectangle with corners rounded inside. Read more at roundedInnerRect
-
roundedRect
void roundedRect()
Draws rectangle with rounded corners. Read more at roundedRect
-
scale
HatchFill scale(Number sx, Number sy, Number cx, Number cy)
Scales a shape. Scaling center is set in the coordinate system of the parent.
-
scaleByAnchor
HatchFill scaleByAnchor(Number sx, Number sy, Anchor anchor)
Scales a shape by anchor. Scaling center is set as an anchor.
-
scaleByAnchor
HatchFill scaleByAnchor(Number sx, Number sy, String anchor)
Scales a shape by anchor. Scaling center is set as an anchor.
-
setPosition
HatchFill setPosition(Number x, Number y)
Sets top left corner of a shape (transformation taken into account) in the coordinate system of the parent.
-
setRotation
HatchFill setRotation(Number degrees, Number cx, Number cy)
Rotates a shape around the given point.
-
setRotationByAnchor
HatchFill setRotationByAnchor(Number degrees, Anchor anchor)
Rotates a shape around the given anchor.
-
setRotationByAnchor
HatchFill setRotationByAnchor(Number degrees, String anchor)
Rotates a shape around the given anchor.
-
setTransformationMatrix
HatchFill setTransformationMatrix(Number m00, Number m10, Number m01, Number m11, Number m02, Number m12)
Sets the transformation matrix.
-
star
void star()
Draws multi-pointed star. Read more at star
-
star10
void star10()
Draws ten-pointed star. Read more at star10
-
star4
void star4()
Draws four-pointed star. Read more at star4
-
star5
void star5()
Draws five-pointed star. Read more at star5
-
star6
void star6()
Draws six-pointed star. Read more at star6
-
star7
void star7()
Draws seven-pointed star. Read more at star7
-
swapChildren
HatchFill swapChildren(Element element1, Element element2)
Swaps children.
-
swapChildrenAt
HatchFill swapChildrenAt(Number index1, Number index2)
Swaps children by indexes.
-
title
void title()
Getter for the element title value.
-
translate
HatchFill translate(Number tx, Number ty)
Moves a shape taking an account the current transformation.
-
triangleDown
void triangleDown()
Draws a triangle heading downwards set by its circumscribed circle center and radius. Read more at triangleDown
-
triangleLeft
void triangleLeft()
Draws a triangle heading leftwards set by its circumscribed circle center and radius. Read more at triangleLeft
-
triangleRight
void triangleRight()
Draws a triangle heading rightwards set by its circumscribed circle center and radius. Read more at triangleRight
-
triangleUp
void triangleUp()
Draws a triangle heading upwards set by its circumscribed circle center and radius. Read more at triangleUp
-
truncatedRect
void truncatedRect()
Draws rectangle with cut corners. Read more at truncatedRect
-
setOnClickListener
void setOnClickListener(ListenersInterface.OnClickListener listener)
-
setOnClickListener
void setOnClickListener(ListenersInterface.OnClickListener listener, String type, String ePath)
-
vLine
void vLine()
Draws a thick vertical line set by its circumscribed circle center and radius. Read more at vLine
-
visible
void visible()
Gets the current visibility flag.
-
zIndex
void zIndex()
Gets the current element's zIndex.
-
unlistenByKey
void unlistenByKey(String key)
Removes an event listener which was added with listen() by the key returned by listen().
-
-
-
-