API Reference
@univerjs
@univerjs/engine-render
classes
Path

@univerjs/engine-render v0.4.2Docs


Class: Path

Extends

Constructors

new Path()

new Path(key?, props?): Path

Parameters

ParameterType
key?string
props?IPathProps

Returns

Path

Overrides

Shape.constructor

Defined in

submodules/univer/packages/engine-render/src/shape/path.ts:63 (opens in a new tab)

Properties

PropertyModifierTypeDefault valueInherited fromDefined in
_dirtyprotectedbooleantrueShape._dirtysubmodules/univer/packages/engine-render/src/base-object.ts:88 (opens in a new tab)
_disposedprotectedbooleanfalseShape._disposedsubmodules/univer/packages/core/src/shared/lifecycle.ts:93 (opens in a new tab)
_forceDirtyprotectedbooleantrueShape._forceDirtysubmodules/univer/packages/engine-render/src/base-object.ts:89 (opens in a new tab)
_oKeyprotectedstringundefinedShape._oKeysubmodules/univer/packages/engine-render/src/base-object.ts:86 (opens in a new tab)
groupKey?publicstringundefinedShape.groupKeysubmodules/univer/packages/engine-render/src/base-object.ts:59 (opens in a new tab)
isInGrouppublicbooleanfalseShape.isInGroupsubmodules/univer/packages/engine-render/src/base-object.ts:60 (opens in a new tab)
objectTypepublicObjectTypeObjectType.SHAPEShape.objectTypesubmodules/univer/packages/engine-render/src/shape/shape.ts:140 (opens in a new tab)
onDblclick$publicEventSubject<IMouseEvent | IPointerEvent>undefinedShape.onDblclick$submodules/univer/packages/engine-render/src/base-object.ts:74 (opens in a new tab)
onDispose$publicEventSubject<BaseObject>undefinedShape.onDispose$submodules/univer/packages/engine-render/src/base-object.ts:84 (opens in a new tab)
onDragEnter$publicEventSubject<IMouseEvent | IDragEvent>undefinedShape.onDragEnter$submodules/univer/packages/engine-render/src/base-object.ts:80 (opens in a new tab)
onDragLeave$publicEventSubject<IMouseEvent | IDragEvent>undefinedShape.onDragLeave$submodules/univer/packages/engine-render/src/base-object.ts:78 (opens in a new tab)
onDragOver$publicEventSubject<IMouseEvent | IDragEvent>undefinedShape.onDragOver$submodules/univer/packages/engine-render/src/base-object.ts:79 (opens in a new tab)
onDrop$publicEventSubject<IMouseEvent | IDragEvent>undefinedShape.onDrop$submodules/univer/packages/engine-render/src/base-object.ts:81 (opens in a new tab)
onIsAddedToParent$publicEventSubject<any>undefinedShape.onIsAddedToParent$submodules/univer/packages/engine-render/src/base-object.ts:83 (opens in a new tab)
onMouseWheel$publicEventSubject<IWheelEvent>undefinedShape.onMouseWheel$submodules/univer/packages/engine-render/src/base-object.ts:76 (opens in a new tab)
onPointerDown$publicEventSubject<IMouseEvent | IPointerEvent>undefinedShape.onPointerDown$submodules/univer/packages/engine-render/src/base-object.ts:66 (opens in a new tab)
onPointerEnter$publicEventSubject<IMouseEvent | IPointerEvent>undefinedShape.onPointerEnter$submodules/univer/packages/engine-render/src/base-object.ts:72 (opens in a new tab)
onPointerLeave$publicEventSubject<IMouseEvent | IPointerEvent>undefinedShape.onPointerLeave$submodules/univer/packages/engine-render/src/base-object.ts:71 (opens in a new tab)
onPointerMove$publicEventSubject<IMouseEvent | IPointerEvent>undefinedShape.onPointerMove$submodules/univer/packages/engine-render/src/base-object.ts:67 (opens in a new tab)
onPointerOut$publicEventSubject<IMouseEvent | IPointerEvent>undefinedShape.onPointerOut$submodules/univer/packages/engine-render/src/base-object.ts:69 (opens in a new tab)
onPointerOver$publicEventSubject<IMouseEvent | IPointerEvent>undefinedShape.onPointerOver$submodules/univer/packages/engine-render/src/base-object.ts:70 (opens in a new tab)
onPointerUp$publicEventSubject<IMouseEvent | IPointerEvent>undefinedShape.onPointerUp$submodules/univer/packages/engine-render/src/base-object.ts:68 (opens in a new tab)
onTransformChange$publicEventSubject<ITransformChangeState>undefinedShape.onTransformChange$submodules/univer/packages/engine-render/src/base-object.ts:64 (opens in a new tab)
onTripleClick$publicEventSubject<IMouseEvent | IPointerEvent>undefinedShape.onTripleClick$submodules/univer/packages/engine-render/src/base-object.ts:75 (opens in a new tab)

Accessors

ancestorGroup

get ancestorGroup(): Nullable<BaseObject>

Returns

Nullable<BaseObject>

Inherited from

Shape.ancestorGroup

Defined in

submodules/univer/packages/engine-render/src/base-object.ts:251 (opens in a new tab)


ancestorLeft

get ancestorLeft(): any

Returns

any

Inherited from

Shape.ancestorLeft

Defined in

submodules/univer/packages/engine-render/src/base-object.ts:235 (opens in a new tab)


ancestorScaleX

get ancestorScaleX(): number

Returns

number

Inherited from

Shape.ancestorScaleX

Defined in

submodules/univer/packages/engine-render/src/base-object.ts:225 (opens in a new tab)


ancestorScaleY

get ancestorScaleY(): number

Returns

number

Inherited from

Shape.ancestorScaleY

Defined in

submodules/univer/packages/engine-render/src/base-object.ts:230 (opens in a new tab)


ancestorTop

get ancestorTop(): any

Returns

any

Inherited from

Shape.ancestorTop

Defined in

submodules/univer/packages/engine-render/src/base-object.ts:239 (opens in a new tab)


ancestorTransform

get ancestorTransform(): any

Returns

any

Inherited from

Shape.ancestorTransform

Defined in

submodules/univer/packages/engine-render/src/base-object.ts:243 (opens in a new tab)


angle

get angle(): number
set angle(angle): void

Parameters

ParameterType
anglenumber

Returns

number

Inherited from

Shape.angle

Defined in

submodules/univer/packages/engine-render/src/base-object.ts:213 (opens in a new tab)


classType

get classType(): RENDER_CLASS_TYPE

Returns

RENDER_CLASS_TYPE

Inherited from

Shape.classType

Defined in

submodules/univer/packages/engine-render/src/base-object.ts:189 (opens in a new tab)


cursor

get cursor(): CURSOR_TYPE
set cursor(val): void

Parameters

ParameterType
valCURSOR_TYPE

Returns

CURSOR_TYPE

Inherited from

Shape.cursor

Defined in

submodules/univer/packages/engine-render/src/base-object.ts:303 (opens in a new tab)


dataArray

get dataArray(): IPathDataArray[]

Returns

IPathDataArray[]

Defined in

submodules/univer/packages/engine-render/src/shape/path.ts:131 (opens in a new tab)


debounceParentDirty

get debounceParentDirty(): boolean
set debounceParentDirty(state): void

Parameters

ParameterType
stateboolean

Returns

boolean

Inherited from

Shape.debounceParentDirty

Defined in

submodules/univer/packages/engine-render/src/base-object.ts:299 (opens in a new tab)


evented

get evented(): boolean
set evented(state): void

Parameters

ParameterType
stateboolean

Returns

boolean

Inherited from

Shape.evented

Defined in

submodules/univer/packages/engine-render/src/base-object.ts:291 (opens in a new tab)


fill

get fill(): Nullable<string | CanvasGradient>

Returns

Nullable<string | CanvasGradient>

Inherited from

Shape.fill

Defined in

submodules/univer/packages/engine-render/src/shape/shape.ts:176 (opens in a new tab)


fillAfterStrokeEnabled

get fillAfterStrokeEnabled(): boolean

Returns

boolean

Inherited from

Shape.fillAfterStrokeEnabled

Defined in

submodules/univer/packages/engine-render/src/shape/shape.ts:180 (opens in a new tab)


fillRule

get fillRule(): string

Returns

string

Inherited from

Shape.fillRule

Defined in

submodules/univer/packages/engine-render/src/shape/shape.ts:156 (opens in a new tab)


flipX

get flipX(): boolean
set flipX(flipX): void

Parameters

ParameterType
flipXboolean

Returns

boolean

Inherited from

Shape.flipX

Defined in

submodules/univer/packages/engine-render/src/base-object.ts:271 (opens in a new tab)


flipY

get flipY(): boolean
set flipY(flipY): void

Parameters

ParameterType
flipYboolean

Returns

boolean

Inherited from

Shape.flipY

Defined in

submodules/univer/packages/engine-render/src/base-object.ts:275 (opens in a new tab)


globalCompositeOperation

get globalCompositeOperation(): string

Returns

string

Inherited from

Shape.globalCompositeOperation

Defined in

submodules/univer/packages/engine-render/src/shape/shape.ts:160 (opens in a new tab)


height

get height(): number
set height(num): void

Parameters

ParameterType
numstring | number

Returns

number

Inherited from

Shape.height

Defined in

submodules/univer/packages/engine-render/src/base-object.ts:205 (opens in a new tab)


heightOrigin

get heightOrigin(): string | number

Returns

string | number

Inherited from

Shape.heightOrigin

Defined in

submodules/univer/packages/engine-render/src/base-object.ts:185 (opens in a new tab)


hitStrokeWidth

get hitStrokeWidth(): string | number

Returns

string | number

Inherited from

Shape.hitStrokeWidth

Defined in

submodules/univer/packages/engine-render/src/shape/shape.ts:184 (opens in a new tab)


hoverCursor

get hoverCursor(): Nullable<string>

Returns

Nullable<string>

Inherited from

Shape.hoverCursor

Defined in

submodules/univer/packages/engine-render/src/shape/shape.ts:148 (opens in a new tab)


layer

get layer(): Nullable<Layer>
set layer(layer): void

Parameters

ParameterType
layerLayer

Returns

Nullable<Layer>

Inherited from

Shape.layer

Defined in

submodules/univer/packages/engine-render/src/base-object.ts:307 (opens in a new tab)


left

get left(): number
set left(num): void

Parameters

ParameterType
numstring | number

Returns

number

Inherited from

Shape.left

Defined in

submodules/univer/packages/engine-render/src/base-object.ts:197 (opens in a new tab)


leftOrigin

get leftOrigin(): string | number

Returns

string | number

Inherited from

Shape.leftOrigin

Defined in

submodules/univer/packages/engine-render/src/base-object.ts:177 (opens in a new tab)


maxZIndex

get maxZIndex(): number

Returns

number

Inherited from

Shape.maxZIndex

Defined in

submodules/univer/packages/engine-render/src/base-object.ts:399 (opens in a new tab)


moveCursor

get moveCursor(): null | string

Returns

null | string

Inherited from

Shape.moveCursor

Defined in

submodules/univer/packages/engine-render/src/shape/shape.ts:152 (opens in a new tab)


oKey

get oKey(): string

Returns

string

Inherited from

Shape.oKey

Defined in

submodules/univer/packages/engine-render/src/base-object.ts:283 (opens in a new tab)


paintFirst

get paintFirst(): PaintFirst

Returns

PaintFirst

Inherited from

Shape.paintFirst

Defined in

submodules/univer/packages/engine-render/src/shape/shape.ts:164 (opens in a new tab)


parent

get parent(): any
set parent(o): void

Parameters

ParameterType
oany

Returns

any

Inherited from

Shape.parent

Defined in

submodules/univer/packages/engine-render/src/base-object.ts:279 (opens in a new tab)


printable

get printable(): boolean

Returns

boolean

Inherited from

Shape.printable

Defined in

submodules/univer/packages/engine-render/src/base-object.ts:169 (opens in a new tab)


scaleX

get scaleX(): number
set scaleX(scaleX): void

Parameters

ParameterType
scaleXnumber

Returns

number

Inherited from

Shape.scaleX

Defined in

submodules/univer/packages/engine-render/src/base-object.ts:217 (opens in a new tab)


scaleY

get scaleY(): number
set scaleY(scaleY): void

Parameters

ParameterType
scaleYnumber

Returns

number

Inherited from

Shape.scaleY

Defined in

submodules/univer/packages/engine-render/src/base-object.ts:221 (opens in a new tab)


shadowBlur

get shadowBlur(): number

Returns

number

Inherited from

Shape.shadowBlur

Defined in

submodules/univer/packages/engine-render/src/shape/shape.ts:200 (opens in a new tab)


shadowColor

get shadowColor(): Nullable<string>

Returns

Nullable<string>

Inherited from

Shape.shadowColor

Defined in

submodules/univer/packages/engine-render/src/shape/shape.ts:196 (opens in a new tab)


shadowEnabled

get shadowEnabled(): boolean

Returns

boolean

Inherited from

Shape.shadowEnabled

Defined in

submodules/univer/packages/engine-render/src/shape/shape.ts:220 (opens in a new tab)


shadowForStrokeEnabled

get shadowForStrokeEnabled(): boolean

Returns

boolean

Inherited from

Shape.shadowForStrokeEnabled

Defined in

submodules/univer/packages/engine-render/src/shape/shape.ts:224 (opens in a new tab)


shadowOffset

get shadowOffset(): Nullable<Vector2>

Returns

Nullable<Vector2>

Inherited from

Shape.shadowOffset

Defined in

submodules/univer/packages/engine-render/src/shape/shape.ts:204 (opens in a new tab)


shadowOffsetX

get shadowOffsetX(): number

Returns

number

Inherited from

Shape.shadowOffsetX

Defined in

submodules/univer/packages/engine-render/src/shape/shape.ts:208 (opens in a new tab)


shadowOffsetY

get shadowOffsetY(): number

Returns

number

Inherited from

Shape.shadowOffsetY

Defined in

submodules/univer/packages/engine-render/src/shape/shape.ts:212 (opens in a new tab)


shadowOpacity

get shadowOpacity(): number

Returns

number

Inherited from

Shape.shadowOpacity

Defined in

submodules/univer/packages/engine-render/src/shape/shape.ts:216 (opens in a new tab)


skewX

get skewX(): number
set skewX(skewX): void

Parameters

ParameterType
skewXnumber

Returns

number

Inherited from

Shape.skewX

Defined in

submodules/univer/packages/engine-render/src/base-object.ts:263 (opens in a new tab)


skewY

get skewY(): number
set skewY(skewY): void

Parameters

ParameterType
skewYnumber

Returns

number

Inherited from

Shape.skewY

Defined in

submodules/univer/packages/engine-render/src/base-object.ts:267 (opens in a new tab)


stroke

get stroke(): Nullable<string | CanvasGradient>

Returns

Nullable<string | CanvasGradient>

Inherited from

Shape.stroke

Defined in

submodules/univer/packages/engine-render/src/shape/shape.ts:168 (opens in a new tab)


strokeDashArray

get strokeDashArray(): Nullable<number[]>

Returns

Nullable<number[]>

Inherited from

Shape.strokeDashArray

Defined in

submodules/univer/packages/engine-render/src/shape/shape.ts:228 (opens in a new tab)


strokeDashOffset

get strokeDashOffset(): number

Returns

number

Inherited from

Shape.strokeDashOffset

Defined in

submodules/univer/packages/engine-render/src/shape/shape.ts:232 (opens in a new tab)


strokeLineCap

get strokeLineCap(): LineCap

Returns

LineCap

Inherited from

Shape.strokeLineCap

Defined in

submodules/univer/packages/engine-render/src/shape/shape.ts:192 (opens in a new tab)


strokeLineJoin

get strokeLineJoin(): LineJoin

Returns

LineJoin

Inherited from

Shape.strokeLineJoin

Defined in

submodules/univer/packages/engine-render/src/shape/shape.ts:188 (opens in a new tab)


strokeMiterLimit

get strokeMiterLimit(): number

Returns

number

Inherited from

Shape.strokeMiterLimit

Defined in

submodules/univer/packages/engine-render/src/shape/shape.ts:236 (opens in a new tab)


strokeScaleEnabled

get strokeScaleEnabled(): boolean

Returns

boolean

Inherited from

Shape.strokeScaleEnabled

Defined in

submodules/univer/packages/engine-render/src/shape/shape.ts:172 (opens in a new tab)


strokeWidth

get strokeWidth(): number
set strokeWidth(width): void

Parameters

ParameterType
widthnumber

Returns

number

Inherited from

Shape.strokeWidth

Defined in

submodules/univer/packages/engine-render/src/base-object.ts:209 (opens in a new tab)


top

get top(): number
set top(num): void

Parameters

ParameterType
numstring | number

Returns

number

Inherited from

Shape.top

Defined in

submodules/univer/packages/engine-render/src/base-object.ts:193 (opens in a new tab)


topOrigin

get topOrigin(): string | number

Returns

string | number

Inherited from

Shape.topOrigin

Defined in

submodules/univer/packages/engine-render/src/base-object.ts:173 (opens in a new tab)


transform

get transform(): Transform
set transform(trans): void

Parameters

ParameterType
transTransform

Returns

Transform

Inherited from

Shape.transform

Defined in

submodules/univer/packages/engine-render/src/base-object.ts:148 (opens in a new tab)


transformerConfig

get transformerConfig(): ITransformerConfig
set transformerConfig(config): void

Parameters

ParameterType
configITransformerConfig

Returns

ITransformerConfig

Inherited from

Shape.transformerConfig

Defined in

submodules/univer/packages/engine-render/src/base-object.ts:391 (opens in a new tab)


visible

get visible(): boolean

Returns

boolean

Inherited from

Shape.visible

Defined in

submodules/univer/packages/engine-render/src/base-object.ts:295 (opens in a new tab)


width

get width(): number
set width(num): void

Parameters

ParameterType
numstring | number

Returns

number

Inherited from

Shape.width

Defined in

submodules/univer/packages/engine-render/src/base-object.ts:201 (opens in a new tab)


widthOrigin

get widthOrigin(): string | number

Returns

string | number

Inherited from

Shape.widthOrigin

Defined in

submodules/univer/packages/engine-render/src/base-object.ts:181 (opens in a new tab)


zIndex

get zIndex(): number
set zIndex(index): void

Parameters

ParameterType
indexnumber

Returns

number

Inherited from

Shape.zIndex

Defined in

submodules/univer/packages/engine-render/src/base-object.ts:287 (opens in a new tab)

Methods

_draw()

protected _draw(ctx): void

Parameters

ParameterType
ctxUniverRenderingContext

Returns

void

Overrides

Shape._draw

Defined in

submodules/univer/packages/engine-render/src/shape/path.ts:933 (opens in a new tab)


_setTransForm()

protected _setTransForm(): void

Returns

void

Inherited from

Shape._setTransForm

Defined in

submodules/univer/packages/engine-render/src/base-object.ts:858 (opens in a new tab)


applyTransform()

applyTransform(): void

Returns

void

Inherited from

Shape.applyTransform

Defined in

submodules/univer/packages/engine-render/src/base-object.ts:846 (opens in a new tab)


dispose()

dispose(): void

Returns

void

Inherited from

Shape.dispose

Defined in

submodules/univer/packages/engine-render/src/base-object.ts:753 (opens in a new tab)


disposeWithMe()

disposeWithMe(disposable): IDisposable

Parameters

ParameterType
disposableDisposableLike

Returns

IDisposable

Inherited from

Shape.disposeWithMe

Defined in

submodules/univer/packages/core/src/shared/lifecycle.ts:96 (opens in a new tab)


ensureNotDisposed()

protected ensureNotDisposed(): void

Returns

void

Inherited from

Shape.ensureNotDisposed

Defined in

submodules/univer/packages/core/src/shared/lifecycle.ts:100 (opens in a new tab)


flip()

flip(flipX?, flipY?): Path

Parameters

ParameterType
flipX?boolean
flipY?boolean

Returns

Path

Inherited from

Shape.flip

Defined in

submodules/univer/packages/engine-render/src/base-object.ts:522 (opens in a new tab)


getEngine()

getEngine(): Nullable<Engine>

Returns

Nullable<Engine>

Inherited from

Shape.getEngine

Defined in

submodules/univer/packages/engine-render/src/base-object.ts:824 (opens in a new tab)


getInverseCoord()

getInverseCoord(coord): Vector2

Parameters

ParameterType
coordVector2

Returns

Vector2

Inherited from

Shape.getInverseCoord

Defined in

submodules/univer/packages/engine-render/src/base-object.ts:854 (opens in a new tab)


getLayerIndex()

getLayerIndex(): number

Returns

number

Inherited from

Shape.getLayerIndex

Defined in

submodules/univer/packages/engine-render/src/base-object.ts:839 (opens in a new tab)


getLength()

getLength(): number

Return length of the path.

Returns

number

length

Method

Example

var length = path.getLength();

Defined in

submodules/univer/packages/engine-render/src/shape/path.ts:848 (opens in a new tab)


getObjects()

getObjects(): BaseObject[]

Returns

BaseObject[]

Inherited from

Shape.getObjects

Defined in

submodules/univer/packages/engine-render/src/base-object.ts:835 (opens in a new tab)


getParent()

getParent(): any

Returns

any

Inherited from

Shape.getParent

Defined in

submodules/univer/packages/engine-render/src/base-object.ts:580 (opens in a new tab)


getPointAtLength()

getPointAtLength(length): null | {
  x: fromX;
  y: number;
}

Get point on path at specific length of the path

Parameters

ParameterTypeDescription
lengthnumberlength

Returns

null | { x: fromX; y: number; }

point {x,y} point

Method

Example

var point = path.getPointAtLength(10);

Defined in

submodules/univer/packages/engine-render/src/shape/path.ts:860 (opens in a new tab)


getRect()

getRect(): {
  height: number;
  left: number;
  top: number;
  width: number;
}

Returns

{
  height: number;
  left: number;
  top: number;
  width: number;
}
NameTypeDefined in
heightnumbersubmodules/univer/packages/engine-render/src/shape/path.ts:837 (opens in a new tab)
leftnumbersubmodules/univer/packages/engine-render/src/shape/path.ts:834 (opens in a new tab)
topnumbersubmodules/univer/packages/engine-render/src/shape/path.ts:835 (opens in a new tab)
widthnumbersubmodules/univer/packages/engine-render/src/shape/path.ts:836 (opens in a new tab)

Defined in

submodules/univer/packages/engine-render/src/shape/path.ts:831 (opens in a new tab)


getScene()

getScene(): Nullable<Scene>

Returns

Nullable<Scene>

Inherited from

Shape.getScene

Defined in

submodules/univer/packages/engine-render/src/base-object.ts:796 (opens in a new tab)


getState()

getState(): {
  angle: number;
  flipX: boolean;
  flipY: boolean;
  height: number;
  left: number;
  scaleX: number;
  scaleY: number;
  skewX: number;
  skewY: number;
  top: number;
  width: number;
}

Returns

{
  angle: number;
  flipX: boolean;
  flipY: boolean;
  height: number;
  left: number;
  scaleX: number;
  scaleY: number;
  skewX: number;
  skewY: number;
  top: number;
  width: number;
}
NameTypeDefined in
anglenumbersubmodules/univer/packages/engine-render/src/shape/path.ts:823 (opens in a new tab)
flipXbooleansubmodules/univer/packages/engine-render/src/shape/path.ts:826 (opens in a new tab)
flipYbooleansubmodules/univer/packages/engine-render/src/shape/path.ts:827 (opens in a new tab)
heightnumbersubmodules/univer/packages/engine-render/src/shape/path.ts:820 (opens in a new tab)
leftnumbersubmodules/univer/packages/engine-render/src/shape/path.ts:817 (opens in a new tab)
scaleXnumbersubmodules/univer/packages/engine-render/src/shape/path.ts:821 (opens in a new tab)
scaleYnumbersubmodules/univer/packages/engine-render/src/shape/path.ts:822 (opens in a new tab)
skewXnumbersubmodules/univer/packages/engine-render/src/shape/path.ts:824 (opens in a new tab)
skewYnumbersubmodules/univer/packages/engine-render/src/shape/path.ts:825 (opens in a new tab)
topnumbersubmodules/univer/packages/engine-render/src/shape/path.ts:818 (opens in a new tab)
widthnumbersubmodules/univer/packages/engine-render/src/shape/path.ts:819 (opens in a new tab)

Overrides

Shape.getState

Defined in

submodules/univer/packages/engine-render/src/shape/path.ts:814 (opens in a new tab)


hide()

hide(): void

Returns

void

Inherited from

Shape.hide

Defined in

submodules/univer/packages/engine-render/src/base-object.ts:600 (opens in a new tab)


isDirty()

isDirty(): boolean

Returns

boolean

Inherited from

Shape.isDirty

Defined in

submodules/univer/packages/engine-render/src/base-object.ts:431 (opens in a new tab)


isHit()

isHit(coord): boolean

Parameters

ParameterType
coordVector2

Returns

boolean

Inherited from

Shape.isHit

Defined in

submodules/univer/packages/engine-render/src/base-object.ts:614 (opens in a new tab)


isRender()

isRender(bounds?): undefined | boolean

Parameters

ParameterType
bounds?IViewportInfo

Returns

undefined | boolean

Inherited from

Shape.isRender

Defined in

submodules/univer/packages/engine-render/src/base-object.ts:573 (opens in a new tab)


makeDirty()

makeDirty(state): undefined | Path

Parameters

ParameterTypeDefault value
statebooleantrue

Returns

undefined | Path

Inherited from

Shape.makeDirty

Defined in

submodules/univer/packages/engine-render/src/base-object.ts:403 (opens in a new tab)


makeDirtyNoDebounce()

makeDirtyNoDebounce(state): Path

Parameters

ParameterTypeDefault value
statebooleantrue

Returns

Path

Inherited from

Shape.makeDirtyNoDebounce

Defined in

submodules/univer/packages/engine-render/src/base-object.ts:422 (opens in a new tab)


makeForceDirty()

makeForceDirty(state): void

Parameters

ParameterTypeDefault value
statebooleantrue

Returns

void

Inherited from

Shape.makeForceDirty

Defined in

submodules/univer/packages/engine-render/src/base-object.ts:418 (opens in a new tab)


removeTransform()

removeTransform(): void

Returns

void

Inherited from

Shape.removeTransform

Defined in

submodules/univer/packages/engine-render/src/base-object.ts:850 (opens in a new tab)


render()

render(mainCtx, bounds?): Path

Parameters

ParameterType
mainCtxUniverRenderingContext
bounds?IViewportInfo

Returns

Path

Inherited from

Shape.render

Defined in

submodules/univer/packages/engine-render/src/shape/shape.ts:319 (opens in a new tab)


resetCursor()

resetCursor(): void

Returns

void

Inherited from

Shape.resetCursor

Defined in

submodules/univer/packages/engine-render/src/base-object.ts:815 (opens in a new tab)


resize()

resize(width?, height?): Path

Parameters

ParameterType
width?string | number
height?string | number

Returns

Path

Inherited from

Shape.resize

Defined in

submodules/univer/packages/engine-render/src/base-object.ts:457 (opens in a new tab)


scale()

scale(scaleX?, scaleY?): Path

Parameters

ParameterType
scaleX?number
scaleY?number

Returns

Path

Inherited from

Shape.scale

Defined in

submodules/univer/packages/engine-render/src/base-object.ts:478 (opens in a new tab)


setCursor()

setCursor(val): void

Parameters

ParameterType
valCURSOR_TYPE

Returns

void

Inherited from

Shape.setCursor

Defined in

submodules/univer/packages/engine-render/src/base-object.ts:819 (opens in a new tab)


setProps()

setProps(props?): Shape<IPathProps>

this[_key] = props[key]

Parameters

ParameterType
props?IPathProps

Returns

Shape<IPathProps>

Inherited from

Shape.setProps

Defined in

submodules/univer/packages/engine-render/src/shape/shape.ts:352 (opens in a new tab)


show()

show(): void

Returns

void

Inherited from

Shape.show

Defined in

submodules/univer/packages/engine-render/src/base-object.ts:605 (opens in a new tab)


skew()

skew(skewX?, skewY?): Path

Parameters

ParameterType
skewX?number
skewY?number

Returns

Path

Inherited from

Shape.skew

Defined in

submodules/univer/packages/engine-render/src/base-object.ts:500 (opens in a new tab)


toJson()

toJson(): {}

Returns

{}

Overrides

Shape.toJson

Defined in

submodules/univer/packages/engine-render/src/shape/path.ts:801 (opens in a new tab)


transformByState()

transformByState(option): undefined | Path

this[pKey] = option[pKey]

Parameters

ParameterType
optionIObjectFullState

Returns

undefined | Path

Inherited from

Shape.transformByState

Defined in

submodules/univer/packages/engine-render/src/base-object.ts:547 (opens in a new tab)


transformForAngle()

transformForAngle(transform): Transform

Parameters

ParameterType
transformTransform

Returns

Transform

Inherited from

Shape.transformForAngle

Defined in

submodules/univer/packages/engine-render/src/base-object.ts:153 (opens in a new tab)


translate()

translate(x?, y?): Path

Parameters

ParameterType
x?string | number
y?string | number

Returns

Path

Inherited from

Shape.translate

Defined in

submodules/univer/packages/engine-render/src/base-object.ts:435 (opens in a new tab)


triggerDblclick()

triggerDblclick(evt): boolean

Parameters

ParameterType
evtIMouseEvent | IPointerEvent

Returns

boolean

Inherited from

Shape.triggerDblclick

Defined in

submodules/univer/packages/engine-render/src/base-object.ts:651 (opens in a new tab)


triggerDragEnter()

triggerDragEnter(evt): boolean

Parameters

ParameterType
evtIMouseEvent | IDragEvent

Returns

boolean

Inherited from

Shape.triggerDragEnter

Defined in

submodules/univer/packages/engine-render/src/base-object.ts:737 (opens in a new tab)


triggerDragLeave()

triggerDragLeave(evt): boolean

Parameters

ParameterType
evtIMouseEvent | IDragEvent

Returns

boolean

Inherited from

Shape.triggerDragLeave

Defined in

submodules/univer/packages/engine-render/src/base-object.ts:721 (opens in a new tab)


triggerDragOver()

triggerDragOver(evt): boolean

Parameters

ParameterType
evtIMouseEvent | IDragEvent

Returns

boolean

Inherited from

Shape.triggerDragOver

Defined in

submodules/univer/packages/engine-render/src/base-object.ts:729 (opens in a new tab)


triggerDrop()

triggerDrop(evt): boolean

Parameters

ParameterType
evtIMouseEvent | IDragEvent

Returns

boolean

Inherited from

Shape.triggerDrop

Defined in

submodules/univer/packages/engine-render/src/base-object.ts:745 (opens in a new tab)


triggerMouseWheel()

triggerMouseWheel(evt): boolean

Parameters

ParameterType
evtIWheelEvent

Returns

boolean

Inherited from

Shape.triggerMouseWheel

Defined in

submodules/univer/packages/engine-render/src/base-object.ts:671 (opens in a new tab)


triggerPointerDown()

triggerPointerDown(evt): boolean

Parameters

ParameterType
evtIMouseEvent | IPointerEvent

Returns

boolean

Inherited from

Shape.triggerPointerDown

Defined in

submodules/univer/packages/engine-render/src/base-object.ts:635 (opens in a new tab)


triggerPointerEnter()

triggerPointerEnter(evt): boolean

Parameters

ParameterType
evtIMouseEvent | IPointerEvent

Returns

boolean

Inherited from

Shape.triggerPointerEnter

Defined in

submodules/univer/packages/engine-render/src/base-object.ts:713 (opens in a new tab)


triggerPointerLeave()

triggerPointerLeave(evt): boolean

Parameters

ParameterType
evtIMouseEvent | IPointerEvent

Returns

boolean

Inherited from

Shape.triggerPointerLeave

Defined in

submodules/univer/packages/engine-render/src/base-object.ts:697 (opens in a new tab)


triggerPointerMove()

triggerPointerMove(evt): boolean

Parameters

ParameterType
evtIMouseEvent | IPointerEvent

Returns

boolean

Inherited from

Shape.triggerPointerMove

Defined in

submodules/univer/packages/engine-render/src/base-object.ts:627 (opens in a new tab)


triggerPointerOut()

triggerPointerOut(evt): boolean

Parameters

ParameterType
evtIMouseEvent | IPointerEvent

Returns

boolean

Inherited from

Shape.triggerPointerOut

Defined in

submodules/univer/packages/engine-render/src/base-object.ts:689 (opens in a new tab)


triggerPointerOver()

triggerPointerOver(evt): boolean

Parameters

ParameterType
evtIMouseEvent | IPointerEvent

Returns

boolean

Inherited from

Shape.triggerPointerOver

Defined in

submodules/univer/packages/engine-render/src/base-object.ts:705 (opens in a new tab)


triggerPointerUp()

triggerPointerUp(evt): boolean

Parameters

ParameterType
evtIMouseEvent | IPointerEvent

Returns

boolean

Inherited from

Shape.triggerPointerUp

Defined in

submodules/univer/packages/engine-render/src/base-object.ts:643 (opens in a new tab)


triggerTripleClick()

triggerTripleClick(evt): boolean

Parameters

ParameterType
evtIMouseEvent | IPointerEvent

Returns

boolean

Inherited from

Shape.triggerTripleClick

Defined in

submodules/univer/packages/engine-render/src/base-object.ts:661 (opens in a new tab)


_renderPaintInOrder()

protected static _renderPaintInOrder(ctx, props): void

Parameters

ParameterType
ctxUniverRenderingContext
propsIShapeProps

Returns

void

Inherited from

Shape._renderPaintInOrder

Defined in

submodules/univer/packages/engine-render/src/shape/shape.ts:244 (opens in a new tab)


calcLength()

static calcLength(
   x, 
   y, 
   cmd, 
   points): number

Parameters

ParameterType
xnumber
ynumber
cmdstring
pointsnumber[]

Returns

number

Defined in

submodules/univer/packages/engine-render/src/shape/path.ts:647 (opens in a new tab)


convertEndpointToCenterParameterization()

static convertEndpointToCenterParameterization(
   x1, 
   y1, 
   x2, 
   y2, 
   fa, 
   fs, 
   rx, 
   ry, 
   psiDeg): number[]

Parameters

ParameterType
x1number
y1number
x2number
y2number
fanumber
fsnumber
rxnumber
rynumber
psiDegnumber

Returns

number[]

Defined in

submodules/univer/packages/engine-render/src/shape/path.ts:737 (opens in a new tab)


drawWith()

static drawWith(ctx, props): void

Parameters

ParameterType
ctxUniverRenderingContext
propsIPathProps | Path

Returns

void

Overrides

Shape.drawWith

Defined in

submodules/univer/packages/engine-render/src/shape/path.ts:135 (opens in a new tab)


getLineLength()

static getLineLength(
   x1, 
   y1, 
   x2, 
   y2): number

Parameters

ParameterType
x1number
y1number
x2number
y2number

Returns

number

Defined in

submodules/univer/packages/engine-render/src/shape/path.ts:193 (opens in a new tab)


getPointOnCubicBezier()

static getPointOnCubicBezier(
   pct, 
   P1x, 
   P1y, 
   P2x, 
   P2y, 
   P3x, 
   P3y, 
   P4x, 
   P4y): {
  x: number;
  y: number;
}

Parameters

ParameterType
pctnumber
P1xnumber
P1ynumber
P2xnumber
P2ynumber
P3xnumber
P3ynumber
P4xnumber
P4ynumber

Returns

{
  x: number;
  y: number;
}
NameTypeDefined in
xnumbersubmodules/univer/packages/engine-render/src/shape/path.ts:288 (opens in a new tab)
ynumbersubmodules/univer/packages/engine-render/src/shape/path.ts:289 (opens in a new tab)

Defined in

submodules/univer/packages/engine-render/src/shape/path.ts:261 (opens in a new tab)


getPointOnEllipticalArc()

static getPointOnEllipticalArc(
   cx, 
   cy, 
   rx, 
   ry, 
   theta, 
   psi): {
  x: number;
  y: number;
}

Parameters

ParameterType
cxnumber
cynumber
rxnumber
rynumber
thetanumber
psinumber

Returns

{
  x: number;
  y: number;
}
NameTypeDefined in
xnumbersubmodules/univer/packages/engine-render/src/shape/path.ts:328 (opens in a new tab)
ynumbersubmodules/univer/packages/engine-render/src/shape/path.ts:329 (opens in a new tab)

Defined in

submodules/univer/packages/engine-render/src/shape/path.ts:320 (opens in a new tab)


getPointOnLine()

static getPointOnLine(
   dist, 
   P1x, 
   P1y, 
   P2x, 
   P2y, 
   fromX?, 
   fromY?): {
  x: fromX;
  y: number;
}

Parameters

ParameterType
distnumber
P1xnumber
P1ynumber
P2xnumber
P2ynumber
fromX?number
fromY?number

Returns

{
  x: fromX;
  y: number;
}
NameTypeDefault valueDefined in
xnumberfromXsubmodules/univer/packages/engine-render/src/shape/path.ts:224 (opens in a new tab)
ynumber-submodules/univer/packages/engine-render/src/shape/path.ts:225 (opens in a new tab)

Defined in

submodules/univer/packages/engine-render/src/shape/path.ts:197 (opens in a new tab)


getPointOnQuadraticBezier()

static getPointOnQuadraticBezier(
   pct, 
   P1x, 
   P1y, 
   P2x, 
   P2y, 
   P3x, 
   P3y): {
  x: number;
  y: number;
}

Parameters

ParameterType
pctnumber
P1xnumber
P1ynumber
P2xnumber
P2ynumber
P3xnumber
P3ynumber

Returns

{
  x: number;
  y: number;
}
NameTypeDefined in
xnumbersubmodules/univer/packages/engine-render/src/shape/path.ts:315 (opens in a new tab)
ynumbersubmodules/univer/packages/engine-render/src/shape/path.ts:316 (opens in a new tab)

Defined in

submodules/univer/packages/engine-render/src/shape/path.ts:293 (opens in a new tab)


parsePathData()

static parsePathData(data): IPathDataArray[]

Parameters

ParameterType
datastring

Returns

IPathDataArray[]

Defined in

submodules/univer/packages/engine-render/src/shape/path.ts:341 (opens in a new tab)


Copyright © 2021-2024 DreamNum Co,Ltd. All Rights Reserved.