GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • @maxgraph/core

This view

  • Original page
  • New address

GeezerVison is showing maxgraph.github.io — HexagonShape | @maxgraph/core

  • HexagonShape

Class HexagonShape

Implementation of the hexagon shape.

This shape is registered under hexagon in ShapeRegistry when using Graph or calling registerDefaultShapes.

Hierarchy (View Summary)

  • AbstractPathShape
    • HexagonShape
  • Defined in view/shape/node/HexagonShape.ts:30
Index

Constructors

constructor

Properties

antiAlias boundingBox bounds cursor dialect direction endArrow endSize fill fillOpacity flipH flipV glass gradient gradientDirection image imageSrc indicator indicatorColor indicatorDirection indicatorGradientColor indicatorImageSrc indicatorShape indicatorStrokeColor isDashed isRounded isShadow minSvgStrokeWidth node oldGradients opacity originalPointerEvents outline overlay pointerEvents points preserveImageAspect rotation scale shapePointerEvents spacing startArrow startSize state stencil stencilPointerEvents stroke strokeOpacity strokeWidth style svgPointerEvents svgStrokeTolerance useSvgBoundingBox verticalTextRotation visible

Methods

addPoints afterPaint apply augmentBoundingBox beforePaint checkBounds clear configureCanvas create createBoundingBox createCanvas createSvgCanvas createTransparentSvgRectangle destroy destroyCanvas getArcSize getBaseArcSize getCursor getGradientBounds getLabelBounds getLabelMargins getRotation getShapeRotation getSvgScreenOffset getTextRotation init initStyles isHtmlAllowed isPaintBoundsInverted isRoundable paint paintBackground paintEdgeShape paintForeground paintGlassEffect paintVertexShape redraw redrawHtmlShape redrawPath redrawShape releaseSvgGradients resetStyles setCursor setTransparentBackgroundImage updateBoundingBox updateBoundsFromPoints updateTransform

Constructors

constructor

  • new HexagonShape(
        bounds?: Rectangle | null,
        fill?: string,
        stroke?: string,
        strokeWidth?: number,
    ): HexagonShape

    The renderer never uses this signature: CellRenderer.createShape instantiates a registered shape with new shapeConstructor(), then populates it from the cell style. It only applies to a shape built by hand.

    Parameters

    • bounds: Rectangle | null = null

      the bounds of the shape, stored in Shape.bounds.

    • fill: string = NONE

      the fill color, stored in Shape.fill.

    • stroke: string = NONE

      the stroke color, stored in Shape.stroke.

    • strokeWidth: number = 1

      the stroke width, stored in Shape.strokeWidth.

    Returns HexagonShape

    Inherited from AbstractPathShape.constructor

    • Defined in view/shape/node/AbstractPathShape.ts:57

Properties

antiAlias

antiAlias: boolean = true

Rendering hint for configuring the canvas.

Inherited from AbstractPathShape.antiAlias

  • Defined in view/shape/Shape.ts:187

boundingBox

boundingBox: Rectangle | null = null

Contains the bounding box of the shape, that is, the smallest rectangle that includes all pixels of the shape.

Inherited from AbstractPathShape.boundingBox

  • Defined in view/shape/Shape.ts:223

bounds

bounds: Rectangle | null = null

Holds the Rectangle that specifies the bounds of this shape.

Inherited from AbstractPathShape.bounds

  • Defined in view/shape/Shape.ts:197

cursor

cursor: string = ''

Inherited from AbstractPathShape.cursor

  • Defined in view/shape/Shape.ts:166

dialect

dialect: DialectValue | null = null

Holds the dialect in which the shape is to be painted.

Inherited from AbstractPathShape.dialect

  • Defined in view/shape/Shape.ts:177

direction

direction: DirectionValue = 'east'

Inherited from AbstractPathShape.direction

  • Defined in view/shape/Shape.ts:154

endArrow

endArrow: string = NONE

Inherited from AbstractPathShape.endArrow

  • Defined in view/shape/Shape.ts:152

endSize

endSize: number = 1

Inherited from AbstractPathShape.endSize

  • Defined in view/shape/Shape.ts:148

fill

fill: string = NONE

Inherited from AbstractPathShape.fill

  • Defined in view/shape/Shape.ts:130

fillOpacity

fillOpacity: number = 100

Inherited from AbstractPathShape.fillOpacity

  • Defined in view/shape/Shape.ts:136

flipH

flipH: boolean = false

Inherited from AbstractPathShape.flipH

  • Defined in view/shape/Shape.ts:156

flipV

flipV: boolean = false

Inherited from AbstractPathShape.flipV

  • Defined in view/shape/Shape.ts:158

glass

glass: boolean = false

Inherited from AbstractPathShape.glass

  • Defined in view/shape/Shape.ts:172

gradient

gradient: string = NONE

Inherited from AbstractPathShape.gradient

  • Defined in view/shape/Shape.ts:132

gradientDirection

gradientDirection: DirectionValue = 'east'

Inherited from AbstractPathShape.gradientDirection

  • Defined in view/shape/Shape.ts:134

image

image: ImageBox | null = null

Inherited from AbstractPathShape.image

  • Defined in view/shape/Shape.ts:280

imageSrc

imageSrc: string | null = null

Inherited from AbstractPathShape.imageSrc

  • Defined in view/shape/Shape.ts:282

indicator

indicator: Shape | null = null

Inherited from AbstractPathShape.indicator

  • Defined in view/shape/Shape.ts:123

indicatorColor

indicatorColor: string = NONE

Inherited from AbstractPathShape.indicatorColor

  • Defined in view/shape/Shape.ts:284

indicatorDirection

indicatorDirection: DirectionValue = 'east'

Inherited from AbstractPathShape.indicatorDirection

  • Defined in view/shape/Shape.ts:290

indicatorGradientColor

indicatorGradientColor: string = NONE

Inherited from AbstractPathShape.indicatorGradientColor

  • Defined in view/shape/Shape.ts:288

indicatorImageSrc

indicatorImageSrc: string | null = null

Inherited from AbstractPathShape.indicatorImageSrc

  • Defined in view/shape/Shape.ts:292

indicatorShape

indicatorShape: typeof Shape | null = null

Inherited from AbstractPathShape.indicatorShape

  • Defined in view/shape/Shape.ts:124

indicatorStrokeColor

indicatorStrokeColor: string = NONE

Inherited from AbstractPathShape.indicatorStrokeColor

  • Defined in view/shape/Shape.ts:286

isDashed

isDashed: boolean = false

Inherited from AbstractPathShape.isDashed

  • Defined in view/shape/Shape.ts:128

isRounded

isRounded: boolean = false

Inherited from AbstractPathShape.isRounded

  • Defined in view/shape/Shape.ts:162

isShadow

isShadow: boolean = false

Inherited from AbstractPathShape.isShadow

  • Defined in view/shape/Shape.ts:160

minSvgStrokeWidth

minSvgStrokeWidth: number = 1

Minimum stroke width for SVG output.

Inherited from AbstractPathShape.minSvgStrokeWidth

  • Defined in view/shape/Shape.ts:192

node

node: SVGGElement

Holds the outermost DOM node that represents this shape.

Inherited from AbstractPathShape.node

  • Defined in view/shape/Shape.ts:207

oldGradients

oldGradients: GradientMap = {}

Inherited from AbstractPathShape.oldGradients

  • Defined in view/shape/Shape.ts:170

opacity

opacity: number = 100

See

CellHighlight

Inherited from AbstractPathShape.opacity

  • Defined in view/shape/Shape.ts:127

originalPointerEvents

originalPointerEvents: boolean | null = null

Inherited from AbstractPathShape.originalPointerEvents

  • Defined in view/shape/Shape.ts:242

outline

outline: boolean = false

Specifies if the shape should be drawn as an outline. This disables all fill colors and can be used to disable other drawing states that should not be painted for outlines. Default is false. This should be set before calling .

Inherited from AbstractPathShape.outline

  • Defined in view/shape/Shape.ts:267

overlay

overlay: CellOverlay | null = null

Inherited from AbstractPathShape.overlay

  • Defined in view/shape/Shape.ts:122

pointerEvents

pointerEvents: boolean = true

Specifies if pointer events should be handled. Default is true.

Inherited from AbstractPathShape.pointerEvents

  • Defined in view/shape/Shape.ts:240

points

points: (Point | null)[] = []

Holds the array of that specify the points of this shape.

Inherited from AbstractPathShape.points

  • Defined in view/shape/Shape.ts:202

preserveImageAspect

preserveImageAspect: boolean = false

Switch to preserve image aspect.

Default

false

Inherited from AbstractPathShape.preserveImageAspect

  • Defined in view/shape/Shape.ts:121

rotation

rotation: number = 0

Inherited from AbstractPathShape.rotation

  • Defined in view/shape/Shape.ts:164

scale

scale: number = 1

Holds the scale in which the shape is being painted.

Inherited from AbstractPathShape.scale

  • Defined in view/shape/Shape.ts:182

shapePointerEvents

shapePointerEvents: boolean = false

Specifies if pointer events outside of shape should be handled. Default is false.

Inherited from AbstractPathShape.shapePointerEvents

  • Defined in view/shape/Shape.ts:253

spacing

spacing: number = 0

Inherited from AbstractPathShape.spacing

  • Defined in view/shape/Shape.ts:144

startArrow

startArrow: string = NONE

Inherited from AbstractPathShape.startArrow

  • Defined in view/shape/Shape.ts:150

startSize

startSize: number = 1

Inherited from AbstractPathShape.startSize

  • Defined in view/shape/Shape.ts:146

state

state: CellState | null = null

Optional reference to the corresponding .

Inherited from AbstractPathShape.state

  • Defined in view/shape/Shape.ts:212

stencil

stencil: StencilShape | null = null

Holds the StencilShape that defines the shape.

Inherited from AbstractPathShape.stencil

  • Defined in view/shape/Shape.ts:228

stencilPointerEvents

stencilPointerEvents: boolean = false

Specifies if pointer events outside of stencils should be handled. Default is false. Set this to true for backwards compatibility with the 1.x branch.

Inherited from AbstractPathShape.stencilPointerEvents

  • Defined in view/shape/Shape.ts:259

stroke

stroke: string = NONE

Inherited from AbstractPathShape.stroke

  • Defined in view/shape/Shape.ts:140

strokeOpacity

strokeOpacity: number = 100

Inherited from AbstractPathShape.strokeOpacity

  • Defined in view/shape/Shape.ts:138

strokeWidth

strokeWidth: number = 1

Inherited from AbstractPathShape.strokeWidth

  • Defined in view/shape/Shape.ts:142

style

style: CellStateStyle | null = null

Optional reference to the style of the corresponding .

Inherited from AbstractPathShape.style

  • Defined in view/shape/Shape.ts:217

svgPointerEvents

svgPointerEvents: string = 'all'

Specifies if pointer events should be handled. Default is true.

Inherited from AbstractPathShape.svgPointerEvents

  • Defined in view/shape/Shape.ts:247

svgStrokeTolerance

svgStrokeTolerance: number = 8

Event-tolerance for SVG strokes (in px). This is only passed to the canvas in createSvgCanvas if pointerEvents is true.

Default

8

Inherited from AbstractPathShape.svgStrokeTolerance

  • Defined in view/shape/Shape.ts:235

useSvgBoundingBox

useSvgBoundingBox: boolean = true

Allows to use the SVG bounding box in SVG. Default is false for performance reasons.

Inherited from AbstractPathShape.useSvgBoundingBox

  • Defined in view/shape/Shape.ts:278

verticalTextRotation

verticalTextRotation: number = 0

Inherited from AbstractPathShape.verticalTextRotation

  • Defined in view/shape/Shape.ts:168

visible

visible: boolean = true

Specifies if the shape is visible. Default is true.

Inherited from AbstractPathShape.visible

  • Defined in view/shape/Shape.ts:272

Methods

addPoints

  • addPoints(
        c: AbstractCanvas2D,
        pts: Point[],
        rounded?: boolean,
        arcSize: number,
        close?: boolean,
        exclude?: number[],
        initialMove?: boolean,
    ): void

    Paints the given points with rounded corners.

    Parameters

    • c: AbstractCanvas2D
    • pts: Point[]
    • rounded: boolean = false
    • arcSize: number
    • close: boolean = false
    • exclude: number[] = []
    • initialMove: boolean = true

    Returns void

    Inherited from AbstractPathShape.addPoints

    • Defined in view/shape/Shape.ts:839

afterPaint

  • afterPaint(c: AbstractCanvas2D): void

    Invokes after paint was called.

    Parameters

    • c: AbstractCanvas2D

    Returns void

    Inherited from AbstractPathShape.afterPaint

    • Defined in view/shape/Shape.ts:589

apply

  • apply(state: CellState): void

    Applies the style of the given to the shape. This implementation assigns the following styles to local fields:

    • <'fillColor'> => fill
    • <'gradientColor'> => gradient
    • <'gradientDirection'> => gradientDirection
    • <'opacity'> => opacity
    • Constants#STYLE_FILL_OPACITY => fillOpacity
    • Constants#STYLE_STROKE_OPACITY => strokeOpacity
    • <'strokeColor'> => stroke
    • <'strokeWidth'> => strokewidth
    • <'shadow'> => isShadow
    • <'dashed'> => isDashed
    • <'spacing'> => spacing
    • <'startSize'> => startSize
    • <'endSize'> => endSize
    • <'rounded'> => isRounded
    • <'startArrow'> => startArrow
    • <'endArrow'> => endArrow
    • <'rotation'> => rotation
    • <'direction'> => direction
    • <'glass'> => glass

    This keeps a reference to the

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.