@univerjs/engine-render v0.5.0-beta.1 • Docs


Class: Path

Extends

Constructors

new Path()

new Path(key?, props?): Path

Parameters

ParameterType
key?string
props?IPathProps

Returns

Path

Overrides

Shape.constructor

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/path.ts:63

Properties

PropertyModifierTypeDefault valueInherited fromDefined in
_dirtyprotectedbooleantrueShape._dirtypackages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:88
_disposedprotectedbooleanfalseShape._disposedpackages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lifecycle.ts:93
_forceDirtyprotectedbooleantrueShape._forceDirtypackages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:89
_oKeyprotectedstringundefinedShape._oKeypackages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:86
groupKey?publicstringundefinedShape.groupKeypackages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:59
isInGrouppublicbooleanfalseShape.isInGrouppackages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:60
objectTypepublicObjectTypeObjectType.SHAPEShape.objectTypepackages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/shape.ts:140
onDblclick$publicEventSubject<IMouseEvent | IPointerEvent>undefinedShape.onDblclick$packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:74
onDispose$publicEventSubject<BaseObject>undefinedShape.onDispose$packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:84
onDragEnter$publicEventSubject<IMouseEvent | IDragEvent>undefinedShape.onDragEnter$packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:80
onDragLeave$publicEventSubject<IMouseEvent | IDragEvent>undefinedShape.onDragLeave$packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:78
onDragOver$publicEventSubject<IMouseEvent | IDragEvent>undefinedShape.onDragOver$packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:79
onDrop$publicEventSubject<IMouseEvent | IDragEvent>undefinedShape.onDrop$packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:81
onIsAddedToParent$publicEventSubject<any>undefinedShape.onIsAddedToParent$packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:83
onMouseWheel$publicEventSubject<IWheelEvent>undefinedShape.onMouseWheel$packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:76
onPointerDown$publicEventSubject<IMouseEvent | IPointerEvent>undefinedShape.onPointerDown$packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:66
onPointerEnter$publicEventSubject<IMouseEvent | IPointerEvent>undefinedShape.onPointerEnter$packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:72
onPointerLeave$publicEventSubject<IMouseEvent | IPointerEvent>undefinedShape.onPointerLeave$packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:71
onPointerMove$publicEventSubject<IMouseEvent | IPointerEvent>undefinedShape.onPointerMove$packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:67
onPointerOut$publicEventSubject<IMouseEvent | IPointerEvent>undefinedShape.onPointerOut$packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:69
onPointerOver$publicEventSubject<IMouseEvent | IPointerEvent>undefinedShape.onPointerOver$packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:70
onPointerUp$publicEventSubject<IMouseEvent | IPointerEvent>undefinedShape.onPointerUp$packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:68
onTransformChange$publicEventSubject<ITransformChangeState>undefinedShape.onTransformChange$packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:64
onTripleClick$publicEventSubject<IMouseEvent | IPointerEvent>undefinedShape.onTripleClick$packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:75

Accessors

ancestorGroup

Get Signature

get ancestorGroup(): Nullable<BaseObject>
Returns

Nullable<BaseObject>

Inherited from

Shape.ancestorGroup

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:251


ancestorLeft

Get Signature

get ancestorLeft(): any
Returns

any

Inherited from

Shape.ancestorLeft

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:235


ancestorScaleX

Get Signature

get ancestorScaleX(): number
Returns

number

Inherited from

Shape.ancestorScaleX

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:225


ancestorScaleY

Get Signature

get ancestorScaleY(): number
Returns

number

Inherited from

Shape.ancestorScaleY

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:230


ancestorTop

Get Signature

get ancestorTop(): any
Returns

any

Inherited from

Shape.ancestorTop

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:239


ancestorTransform

Get Signature

get ancestorTransform(): any
Returns

any

Inherited from

Shape.ancestorTransform

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:243


angle

Get Signature

get angle(): number
Returns

number

Set Signature

set angle(angle): void
Parameters
ParameterType
anglenumber
Returns

void

Inherited from

Shape.angle

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:213


classType

Get Signature

get classType(): RENDER_CLASS_TYPE
Returns

RENDER_CLASS_TYPE

Inherited from

Shape.classType

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:189


cursor

Get Signature

get cursor(): CURSOR_TYPE
Returns

CURSOR_TYPE

Set Signature

set cursor(val): void
Parameters
ParameterType
valCURSOR_TYPE
Returns

void

Inherited from

Shape.cursor

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:303


dataArray

Get Signature

get dataArray(): IPathDataArray[]
Returns

IPathDataArray[]

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/path.ts:131


debounceParentDirty

Get Signature

get debounceParentDirty(): boolean
Returns

boolean

Set Signature

set debounceParentDirty(state): void
Parameters
ParameterType
stateboolean
Returns

void

Inherited from

Shape.debounceParentDirty

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:299


evented

Get Signature

get evented(): boolean
Returns

boolean

Set Signature

set evented(state): void
Parameters
ParameterType
stateboolean
Returns

void

Inherited from

Shape.evented

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:291


fill

Get Signature

get fill(): Nullable<string | CanvasGradient>
Returns

Nullable<string | CanvasGradient>

Inherited from

Shape.fill

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/shape.ts:176


fillAfterStrokeEnabled

Get Signature

get fillAfterStrokeEnabled(): boolean
Returns

boolean

Inherited from

Shape.fillAfterStrokeEnabled

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/shape.ts:180


fillRule

Get Signature

get fillRule(): string
Returns

string

Inherited from

Shape.fillRule

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/shape.ts:156


flipX

Get Signature

get flipX(): boolean
Returns

boolean

Set Signature

set flipX(flipX): void
Parameters
ParameterType
flipXboolean
Returns

void

Inherited from

Shape.flipX

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:271


flipY

Get Signature

get flipY(): boolean
Returns

boolean

Set Signature

set flipY(flipY): void
Parameters
ParameterType
flipYboolean
Returns

void

Inherited from

Shape.flipY

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:275


globalCompositeOperation

Get Signature

get globalCompositeOperation(): string
Returns

string

Inherited from

Shape.globalCompositeOperation

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/shape.ts:160


height

Get Signature

get height(): number
Returns

number

Set Signature

set height(num): void
Parameters
ParameterType
numstring | number
Returns

void

Inherited from

Shape.height

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:205


heightOrigin

Get Signature

get heightOrigin(): string | number
Returns

string | number

Inherited from

Shape.heightOrigin

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:185


hitStrokeWidth

Get Signature

get hitStrokeWidth(): string | number
Returns

string | number

Inherited from

Shape.hitStrokeWidth

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/shape.ts:184


hoverCursor

Get Signature

get hoverCursor(): Nullable<string>
Returns

Nullable<string>

Inherited from

Shape.hoverCursor

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/shape.ts:148


layer

Get Signature

get layer(): Nullable<Layer>
Returns

Nullable<Layer>

Set Signature

set layer(layer): void
Parameters
ParameterType
layerLayer
Returns

void

Inherited from

Shape.layer

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:307


left

Get Signature

get left(): number
Returns

number

Set Signature

set left(num): void
Parameters
ParameterType
numstring | number
Returns

void

Inherited from

Shape.left

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:197


leftOrigin

Get Signature

get leftOrigin(): string | number
Returns

string | number

Inherited from

Shape.leftOrigin

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:177


maxZIndex

Get Signature

get maxZIndex(): number
Returns

number

Inherited from

Shape.maxZIndex

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:399


moveCursor

Get Signature

get moveCursor(): null | string
Returns

null | string

Inherited from

Shape.moveCursor

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/shape.ts:152


oKey

Get Signature

get oKey(): string
Returns

string

Inherited from

Shape.oKey

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:283


paintFirst

Get Signature

get paintFirst(): PaintFirst
Returns

PaintFirst

Inherited from

Shape.paintFirst

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/shape.ts:164


parent

Get Signature

get parent(): any
Returns

any

Set Signature

set parent(o): void
Parameters
ParameterType
oany
Returns

void

Inherited from

Shape.parent

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:279


printable

Get Signature

get printable(): boolean
Returns

boolean

Inherited from

Shape.printable

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:169


scaleX

Get Signature

get scaleX(): number
Returns

number

Set Signature

set scaleX(scaleX): void
Parameters
ParameterType
scaleXnumber
Returns

void

Inherited from

Shape.scaleX

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:217


scaleY

Get Signature

get scaleY(): number
Returns

number

Set Signature

set scaleY(scaleY): void
Parameters
ParameterType
scaleYnumber
Returns

void

Inherited from

Shape.scaleY

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:221


shadowBlur

Get Signature

get shadowBlur(): number
Returns

number

Inherited from

Shape.shadowBlur

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/shape.ts:200


shadowColor

Get Signature

get shadowColor(): Nullable<string>
Returns

Nullable<string>

Inherited from

Shape.shadowColor

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/shape.ts:196


shadowEnabled

Get Signature

get shadowEnabled(): boolean
Returns

boolean

Inherited from

Shape.shadowEnabled

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/shape.ts:220


shadowForStrokeEnabled

Get Signature

get shadowForStrokeEnabled(): boolean
Returns

boolean

Inherited from

Shape.shadowForStrokeEnabled

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/shape.ts:224


shadowOffset

Get Signature

get shadowOffset(): Nullable<Vector2>
Returns

Nullable<Vector2>

Inherited from

Shape.shadowOffset

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/shape.ts:204


shadowOffsetX

Get Signature

get shadowOffsetX(): number
Returns

number

Inherited from

Shape.shadowOffsetX

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/shape.ts:208


shadowOffsetY

Get Signature

get shadowOffsetY(): number
Returns

number

Inherited from

Shape.shadowOffsetY

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/shape.ts:212


shadowOpacity

Get Signature

get shadowOpacity(): number
Returns

number

Inherited from

Shape.shadowOpacity

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/shape.ts:216


skewX

Get Signature

get skewX(): number
Returns

number

Set Signature

set skewX(skewX): void
Parameters
ParameterType
skewXnumber
Returns

void

Inherited from

Shape.skewX

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:263


skewY

Get Signature

get skewY(): number
Returns

number

Set Signature

set skewY(skewY): void
Parameters
ParameterType
skewYnumber
Returns

void

Inherited from

Shape.skewY

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:267


stroke

Get Signature

get stroke(): Nullable<string | CanvasGradient>
Returns

Nullable<string | CanvasGradient>

Inherited from

Shape.stroke

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/shape.ts:168


strokeDashArray

Get Signature

get strokeDashArray(): Nullable<number[]>
Returns

Nullable<number[]>

Inherited from

Shape.strokeDashArray

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/shape.ts:228


strokeDashOffset

Get Signature

get strokeDashOffset(): number
Returns

number

Inherited from

Shape.strokeDashOffset

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/shape.ts:232


strokeLineCap

Get Signature

get strokeLineCap(): LineCap
Returns

LineCap

Inherited from

Shape.strokeLineCap

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/shape.ts:192


strokeLineJoin

Get Signature

get strokeLineJoin(): LineJoin
Returns

LineJoin

Inherited from

Shape.strokeLineJoin

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/shape.ts:188


strokeMiterLimit

Get Signature

get strokeMiterLimit(): number
Returns

number

Inherited from

Shape.strokeMiterLimit

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/shape.ts:236


strokeScaleEnabled

Get Signature

get strokeScaleEnabled(): boolean
Returns

boolean

Inherited from

Shape.strokeScaleEnabled

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/shape.ts:172


strokeWidth

Get Signature

get strokeWidth(): number
Returns

number

Set Signature

set strokeWidth(width): void
Parameters
ParameterType
widthnumber
Returns

void

Inherited from

Shape.strokeWidth

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:209


top

Get Signature

get top(): number
Returns

number

Set Signature

set top(num): void
Parameters
ParameterType
numstring | number
Returns

void

Inherited from

Shape.top

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:193


topOrigin

Get Signature

get topOrigin(): string | number
Returns

string | number

Inherited from

Shape.topOrigin

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:173


transform

Get Signature

get transform(): Transform
Returns

Transform

Set Signature

set transform(trans): void
Parameters
ParameterType
transTransform
Returns

void

Inherited from

Shape.transform

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:148


transformerConfig

Get Signature

get transformerConfig(): ITransformerConfig
Returns

ITransformerConfig

Set Signature

set transformerConfig(config): void
Parameters
ParameterType
configITransformerConfig
Returns

void

Inherited from

Shape.transformerConfig

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:391


visible

Get Signature

get visible(): boolean
Returns

boolean

Inherited from

Shape.visible

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:295


width

Get Signature

get width(): number
Returns

number

Set Signature

set width(num): void
Parameters
ParameterType
numstring | number
Returns

void

Inherited from

Shape.width

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:201


widthOrigin

Get Signature

get widthOrigin(): string | number
Returns

string | number

Inherited from

Shape.widthOrigin

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:181


zIndex

Get Signature

get zIndex(): number
Returns

number

Set Signature

set zIndex(index): void
Parameters
ParameterType
indexnumber
Returns

void

Inherited from

Shape.zIndex

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:287

Methods

_draw()

protected _draw(ctx): void

Parameters

ParameterType
ctxUniverRenderingContext

Returns

void

Overrides

Shape._draw

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/path.ts:933


_setTransForm()

protected _setTransForm(): void

Returns

void

Inherited from

Shape._setTransForm

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:851


applyTransform()

applyTransform(): void

Returns

void

Inherited from

Shape.applyTransform

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:839


dispose()

dispose(): void

Returns

void

Inherited from

Shape.dispose

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:753


disposeWithMe()

disposeWithMe(disposable): IDisposable

Parameters

ParameterType
disposableDisposableLike

Returns

IDisposable

Inherited from

Shape.disposeWithMe

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lifecycle.ts:96


ensureNotDisposed()

protected ensureNotDisposed(): void

Returns

void

Inherited from

Shape.ensureNotDisposed

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lifecycle.ts:100


flip()

flip(flipX?, flipY?): Path

Parameters

ParameterType
flipX?boolean
flipY?boolean

Returns

Path

Inherited from

Shape.flip

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:522


getEngine()

getEngine(): Nullable<Engine>

Returns

Nullable<Engine>

Inherited from

Shape.getEngine

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:817


getInverseCoord()

getInverseCoord(coord): Vector2

Parameters

ParameterType
coordVector2

Returns

Vector2

Inherited from

Shape.getInverseCoord

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:847


getLayerIndex()

getLayerIndex(): number

Returns

number

Inherited from

Shape.getLayerIndex

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:832


getLength()

getLength(): number

Return length of the path.

Returns

number

length

Method

Example

var length = path.getLength();

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/path.ts:848


getObjects()

getObjects(): BaseObject[]

Returns

BaseObject[]

Inherited from

Shape.getObjects

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:828


getParent()

getParent(): any

Returns

any

Inherited from

Shape.getParent

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:580


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

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/path.ts:860


getRect()

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

Returns

{
  height: number;
  left: number;
  top: number;
  width: number;
}
NameTypeDefined in
heightnumberpackages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/path.ts:837
leftnumberpackages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/path.ts:834
topnumberpackages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/path.ts:835
widthnumberpackages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/path.ts:836

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/path.ts:831


getScene()

getScene(): Nullable<Scene>

Returns

Nullable<Scene>

Inherited from

Shape.getScene

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:796


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
anglenumberpackages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/path.ts:823
flipXbooleanpackages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/path.ts:826
flipYbooleanpackages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/path.ts:827
heightnumberpackages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/path.ts:820
leftnumberpackages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/path.ts:817
scaleXnumberpackages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/path.ts:821
scaleYnumberpackages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/path.ts:822
skewXnumberpackages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/path.ts:824
skewYnumberpackages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/path.ts:825
topnumberpackages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/path.ts:818
widthnumberpackages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/path.ts:819

Overrides

Shape.getState

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/path.ts:814


hide()

hide(): void

Returns

void

Inherited from

Shape.hide

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:600


isDirty()

isDirty(): boolean

Returns

boolean

Inherited from

Shape.isDirty

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:431


isHit()

isHit(coord): boolean

Parameters

ParameterType
coordVector2

Returns

boolean

Inherited from

Shape.isHit

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:614


isRender()

isRender(bounds?): undefined | boolean

Parameters

ParameterType
bounds?IViewportInfo

Returns

undefined | boolean

Inherited from

Shape.isRender

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:573


makeDirty()

makeDirty(state): undefined | Path

Parameters

ParameterTypeDefault value
statebooleantrue

Returns

undefined | Path

Inherited from

Shape.makeDirty

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:403


makeDirtyNoDebounce()

makeDirtyNoDebounce(state): Path

Parameters

ParameterTypeDefault value
statebooleantrue

Returns

Path

Inherited from

Shape.makeDirtyNoDebounce

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:422


makeForceDirty()

makeForceDirty(state): void

Parameters

ParameterTypeDefault value
statebooleantrue

Returns

void

Inherited from

Shape.makeForceDirty

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:418


removeTransform()

removeTransform(): void

Returns

void

Inherited from

Shape.removeTransform

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:843


render()

render(mainCtx, bounds?): Path

Parameters

ParameterType
mainCtxUniverRenderingContext
bounds?IViewportInfo

Returns

Path

Inherited from

Shape.render

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/shape.ts:319


resetCursor()

resetCursor(): void

Returns

void

Inherited from

Shape.resetCursor

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:808


resize()

resize(width?, height?): Path

Parameters

ParameterType
width?string | number
height?string | number

Returns

Path

Inherited from

Shape.resize

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:457


scale()

scale(scaleX?, scaleY?): Path

Parameters

ParameterType
scaleX?number
scaleY?number

Returns

Path

Inherited from

Shape.scale

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:478


setCursor()

setCursor(val): void

Parameters

ParameterType
valCURSOR_TYPE

Returns

void

Inherited from

Shape.setCursor

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:812


setProps()

setProps(props?): Shape<IPathProps>

this[_key] = props[key]

Parameters

ParameterType
props?IPathProps

Returns

Shape<IPathProps>

Inherited from

Shape.setProps

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/shape.ts:352


show()

show(): void

Returns

void

Inherited from

Shape.show

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:605


skew()

skew(skewX?, skewY?): Path

Parameters

ParameterType
skewX?number
skewY?number

Returns

Path

Inherited from

Shape.skew

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:500


toJson()

toJson(): {}

Returns

{}

Overrides

Shape.toJson

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/path.ts:801


transformByState()

transformByState(option): undefined | Path

this[pKey] = option[pKey]

Parameters

ParameterType
optionIObjectFullState

Returns

undefined | Path

Inherited from

Shape.transformByState

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:547


transformForAngle()

transformForAngle(transform): Transform

Parameters

ParameterType
transformTransform

Returns

Transform

Inherited from

Shape.transformForAngle

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:153


translate()

translate(x?, y?): Path

Parameters

ParameterType
x?string | number
y?string | number

Returns

Path

Inherited from

Shape.translate

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:435


triggerDblclick()

triggerDblclick(evt): boolean

Parameters

ParameterType
evtIMouseEvent | IPointerEvent

Returns

boolean

Inherited from

Shape.triggerDblclick

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:651


triggerDragEnter()

triggerDragEnter(evt): boolean

Parameters

ParameterType
evtIMouseEvent | IDragEvent

Returns

boolean

Inherited from

Shape.triggerDragEnter

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:737


triggerDragLeave()

triggerDragLeave(evt): boolean

Parameters

ParameterType
evtIMouseEvent | IDragEvent

Returns

boolean

Inherited from

Shape.triggerDragLeave

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:721


triggerDragOver()

triggerDragOver(evt): boolean

Parameters

ParameterType
evtIMouseEvent | IDragEvent

Returns

boolean

Inherited from

Shape.triggerDragOver

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:729


triggerDrop()

triggerDrop(evt): boolean

Parameters

ParameterType
evtIMouseEvent | IDragEvent

Returns

boolean

Inherited from

Shape.triggerDrop

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:745


triggerMouseWheel()

triggerMouseWheel(evt): boolean

Parameters

ParameterType
evtIWheelEvent

Returns

boolean

Inherited from

Shape.triggerMouseWheel

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:671


triggerPointerDown()

triggerPointerDown(evt): boolean

Parameters

ParameterType
evtIMouseEvent | IPointerEvent

Returns

boolean

Inherited from

Shape.triggerPointerDown

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:635


triggerPointerEnter()

triggerPointerEnter(evt): boolean

Parameters

ParameterType
evtIMouseEvent | IPointerEvent

Returns

boolean

Inherited from

Shape.triggerPointerEnter

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:713


triggerPointerLeave()

triggerPointerLeave(evt): boolean

Parameters

ParameterType
evtIMouseEvent | IPointerEvent

Returns

boolean

Inherited from

Shape.triggerPointerLeave

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:697


triggerPointerMove()

triggerPointerMove(evt): boolean

Parameters

ParameterType
evtIMouseEvent | IPointerEvent

Returns

boolean

Inherited from

Shape.triggerPointerMove

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:627


triggerPointerOut()

triggerPointerOut(evt): boolean

Parameters

ParameterType
evtIMouseEvent | IPointerEvent

Returns

boolean

Inherited from

Shape.triggerPointerOut

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:689


triggerPointerOver()

triggerPointerOver(evt): boolean

Parameters

ParameterType
evtIMouseEvent | IPointerEvent

Returns

boolean

Inherited from

Shape.triggerPointerOver

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:705


triggerPointerUp()

triggerPointerUp(evt): boolean

Parameters

ParameterType
evtIMouseEvent | IPointerEvent

Returns

boolean

Inherited from

Shape.triggerPointerUp

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:643


triggerTripleClick()

triggerTripleClick(evt): boolean

Parameters

ParameterType
evtIMouseEvent | IPointerEvent

Returns

boolean

Inherited from

Shape.triggerTripleClick

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/base-object.ts:661


_renderPaintInOrder()

protected static _renderPaintInOrder(ctx, props): void

Parameters

ParameterType
ctxUniverRenderingContext
propsIShapeProps

Returns

void

Inherited from

Shape._renderPaintInOrder

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/shape.ts:244


calcLength()

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

Parameters

ParameterType
xnumber
ynumber
cmdstring
pointsnumber[]

Returns

number

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/path.ts:647


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

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/path.ts:737


drawWith()

static drawWith(ctx, props): void

Parameters

ParameterType
ctxUniverRenderingContext
propsIPathProps | Path

Returns

void

Overrides

Shape.drawWith

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/path.ts:135


getLineLength()

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

Parameters

ParameterType
x1number
y1number
x2number
y2number

Returns

number

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/path.ts:193


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
xnumberpackages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/path.ts:288
ynumberpackages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/path.ts:289

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/path.ts:261


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
xnumberpackages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/path.ts:328
ynumberpackages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/path.ts:329

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/path.ts:320


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
xnumberfromXpackages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/path.ts:224
ynumber-packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/path.ts:225

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/path.ts:197


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
xnumberpackages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/path.ts:315
ynumberpackages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/path.ts:316

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/path.ts:293


parsePathData()

static parsePathData(data): IPathDataArray[]

Parameters

ParameterType
datastring

Returns

IPathDataArray[]

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/path.ts:341