Top
You are looking at an outdated 7.8.0 version of this document. Switch to the 8.0.1 version to see the up to date information.

namespace anychart.graphics.vector Improve this Doc

A namespace for working with vector graphics.

Functions Overview

normalizeFill()Normalizes stroke params. Look at vector.Shape.fill() params for details.
normalizeHatchFill()Normalize hatch fill.
normalizeStroke()Normalizes stroke params. Look at vector.Shape.stroke() params for details.

Classes Overview

anychart.graphics.vector.CircleCircle Class. Inherited from Ellipse.
anychart.graphics.vector.ClipClass representing independent clip, that can be applied to any element.
anychart.graphics.vector.ElementAbstract class for all vector elements, such as groups and primitives.
anychart.graphics.vector.EllipseEllipse Class.
anychart.graphics.vector.HatchFillHatchFill is a special pattern fill with predefined set of a primitives. Sets of a primitives does numbered and
anychart.graphics.vector.ImageImage primitive.
anychart.graphics.vector.LayerLayer class. Used to group elements.
anychart.graphics.vector.PathPath class.
anychart.graphics.vector.PatternFillPattern fill class.
anychart.graphics.vector.RectRectangle class
anychart.graphics.vector.ShapeBase class for all vector elements.
anychart.graphics.vector.StageThis class provide tools for cross-browser display with the single interface for
anychart.graphics.vector.TextText class.

Functions Description

normalizeFill

Normalizes stroke params. Look at vector.Shape.fill() params for details.

Params:

Name Type Description
fillOrColorOrKeys anychart.graphics.vector.Fill | !Array.<(anychart.graphics.vector.GradientKey|string)> | null Fill settings or Color or Gradient keys.
opacityOrAngleOrCx number Opacity or Angle or x-coord of center.
modeOrCy number | boolean | anychart.graphics.math.Rect | Object Mode settings or y-coord of center.
opacityOrMode number | anychart.graphics.math.Rect | Object | null Opacity settings or Mode settings.
opacity number Opacity settings.
fx number Focal x-coord settings.
fy number Focal y-coord settings.

normalizeHatchFill

Normalize hatch fill.

Params:

Name Type Description
patternFillOrType anychart.graphics.vector.HatchFill | anychart.graphics.vector.PatternFill | anychart.graphics.vector.HatchFill.HatchFillType | string | Object | null
color string
thickness string | number
size string | number

normalizeStroke

Normalizes stroke params. Look at vector.Shape.stroke() params for details.

Params:

Name Type Description
strokeOrFill anychart.graphics.vector.Stroke | anychart.graphics.vector.ColoredFill | string | null Stroke fill, if used as setter.
thickness number Line thickness. Defaults to 1.
dashpattern string Controls the pattern of dashes and gaps used to stroke paths. Dash array contains a list of comma and/or white space separated lengths and percentages that specify the lengths of alternating dashes and gaps. If an odd number of values is provided, then the list of values is repeated to yield an even number of values. Thus, stroke dashpattern: 5,3,2 is equivalent to dashpattern: 5,3,2,5,3,2.
lineJoin anychart.graphics.vector.StrokeLineJoin Line join style.
lineCap anychart.graphics.vector.StrokeLineCap Line cap style.