Back to Website
Show / Hide Table of Contents

Class PathSegment

Package: @aurigma/design-atoms-model

Constructors

(constructor)(name, points)

Constructs a new instance of the PathSegment class

Declaration
constructor(name: string, points?: PointF[]);
Parameters
Type Name Description
string name
PointF[] points

Properties

length

Declaration
get length(): number;
Property Value
Type Description
number

name

Declaration
get name(): string;
Property Value
Type Description
string

Methods

clone()

Declaration
clone(): PathSegment;
Returns
Type Description
PathSegment

draw(ctx)

Declaration
draw(ctx: CanvasRenderingContext2D): void;
Parameters
Type Name Description
CanvasRenderingContext2D ctx
Returns
Type Description
void

getPoint(index)

Declaration
getPoint(index: number): PointF;
Parameters
Type Name Description
number index
Returns
Type Description
PointF

rotateAt(angle, center)

Declaration
rotateAt(angle: number, center: PointF): void;
Parameters
Type Name Description
number angle
PointF center
Returns
Type Description
void

scale(scaleX, scaleY)

Declaration
scale(scaleX: number, scaleY: number): void;
Parameters
Type Name Description
number scaleX
number scaleY
Returns
Type Description
void

toString()

Declaration
toString(): string;
Returns
Type Description
string

transform(transform, center)

Declaration
transform(transform: Transform, center: PointF): void;
Parameters
Type Name Description
Transform transform
PointF center
Returns
Type Description
void

translate(offsetX, offsetY)

Declaration
translate(offsetX: number, offsetY: number): void;
Parameters
Type Name Description
number offsetX
number offsetY
Returns
Type Description
void
Was this page helpful?
Thanks for your feedback!
Back to top Copyright © 2001–2025 Aurigma, Inc. All rights reserved.
Loading...
    Thank for your vote
    Your opinion is important to us. To provide details, send feedback.
    Send feedback