Options
All
  • Public
  • Public/Protected
  • All
Menu

Describes a shape that can be created on the canvas.

Hierarchy

Index

Properties

Optional arrow-end

arrow-end?: string

Arrowhead on the end of the path. The format for the string is <type>[-<width>[-<length>]].

Possible value for type are:

  • classic
  • block
  • open
  • oval
  • diamond
  • none

Possible value for width are:

  • wide
  • narrow
  • medium

Possible values for length are

  • long
  • short
  • medium

Optional clip-rect

clip-rect?: string

Comma or space separated values: x, y, width and height.

Optional cursor

cursor?: string

CSS type of the cursor.

Optional cx

cx?: number

Horizontal coordinate of the origin of the circle.

Optional cy

cy?: number

Vertical coordinate of the origin of the circle.

Optional fill

fill?: string

Colour, gradient or image.

Optional fill-opacity

fill-opacity?: number

Opacity of the fill color.

Optional font

font?: string

The combined font family and font size, e.g. 10px "Arial".

Optional font-family

font-family?: string

Name of the font family to use.

Optional font-size

font-size?: string | number

Font size in pixels.

Optional font-weight

font-weight?: string

Font weight as a number, usually between 100 to 900. Can also be "bold" etc.

Optional height

height?: number

The height of e.g. a rectangle in pixels.

Optional href

href?: string

URL, if specified element behaves as hyperlink.

Optional opacity

opacity?: number

Opacity of the element, usually between 0 and 1.

Optional path

path?: string

An SVG path string, e.g. M 10 10 L 20 10 Z.

Optional r

r?: number

Radius of the circle in pixels.

Optional rx

rx?: number

Horizontal half-axis of the ellipse in pixels.

Optional ry

ry?: number

Vertical half-axis of the ellipse in pixels.

Optional src

src?: string

Image URL, only works for RaphaelPaper.image elements.

Optional stroke

stroke?: string

CSS stroke color.

Optional stroke-dasharray

stroke-dasharray?: RaphaelDashArrayType

Controls the pattern of dashes and gaps used to form the shape of a path's stroke.

Optional stroke-linecap

stroke-linecap?: RaphaelLineCapType

Specifies the shape to be used at the end of open subpaths when they are stroked, and the shape to be drawn for zero length subpaths whether they are open or closed.

Optional stroke-linejoin

stroke-linejoin?: RaphaelLineJoinType

Specifies the shape to be used at the corners of paths or basic shapes when they are stroked.

Optional stroke-miterlimit

stroke-miterlimit?: number

When two line segments meet at a sharp angle and a value of miter, miter-clip, or arcs has been specified for stroke-linejoin, it is possible for the join to extend far beyond the thickness of the line stroking the path. The stroke-miterlimit imposes a limit on the extent of the line join.

Optional stroke-opacity

stroke-opacity?: number

Opacity of the stroke, usually between 0 and 1.

Optional stroke-width

stroke-width?: number

Width of the stroke in pixels.

Optional target

target?: string

Used with href.

Optional text

text?: string

Contents of the text element.

Optional text-anchor

text-anchor?: RaphaelTextAnchorType

Used to align (start-, middle- or end-alignment) a string of pre-formatted text or auto-wrapped text where the wrapping area is determined from the inline-size property relative to a given point.

Optional title

title?: string

Will create a tooltip with a given text.

Optional transform

The transform property of this element.

type

type: string

Type of the shape, e.g. circle or rect. Could also be a custom plugin shape.

Optional width

width?: number

The width of e.g. a rectangle in pixels.

Optional x

x?: number

The horizontal x coordinate in pixels.

Optional y

y?: number

The vertical y coordinate in pixels.

Generated using TypeDoc