QPainterPath

Lets you paint paths on widgets.

This class is a JS wrapper around Qt's QPainterPath class

Hierarchy

Index

Constructors

Properties

Methods

Constructors

constructor

+ new QPainterPath(): QPainterPath

Overrides Component.constructor

Returns: QPainterPath

Properties

native

• native: NativeElement | null

Inherited from Component.native

Methods

addEllipse

â–¸ addEllipse(x: number, y: number, width: number, height: number): void

Parameters:

NameType
xnumber
ynumber
widthnumber
heightnumber

Returns: void


addPath

â–¸ addPath(path: QPainterPath): void

Parameters:

NameType
pathQPainterPath

Returns: void


addRect

â–¸ addRect(x: number, y: number, width: number, height: number): void

Parameters:

NameType
xnumber
ynumber
widthnumber
heightnumber

Returns: void


addRoundedRect

â–¸ addRoundedRect(x: number, y: number, width: number, height: number, xRadius: number, yRadius: number, mode: SizeMode): void

Parameters:

NameTypeDefault
xnumber-
ynumber-
widthnumber-
heightnumber-
xRadiusnumber-
yRadiusnumber-
modeSizeModeSizeMode.AbsoluteSize

Returns: void


addText

â–¸ addText(x: number, y: number, font: QFont, text: string): void

Parameters:

NameType
xnumber
ynumber
fontQFont
textstring

Returns: void


angleAtPercent

â–¸ angleAtPercent(t: number): number

Parameters:

NameType
tnumber

Returns: number


arcMoveTo

â–¸ arcMoveTo(x: number, y: number, width: number, height: number, angle: number): void

Parameters:

NameType
xnumber
ynumber
widthnumber
heightnumber
anglenumber

Returns: void


arcTo

â–¸ arcTo(x: number, y: number, width: number, height: number, startAngle: number, sweepLength: number): void

Parameters:

NameType
xnumber
ynumber
widthnumber
heightnumber
startAnglenumber
sweepLengthnumber

Returns: void


boundingRect

â–¸ boundingRect(): object

Returns: object

  • height: number

  • width: number

  • x: number

  • y: number


capacity

â–¸ capacity(): number

Returns: number


clear

â–¸ clear(): void

Returns: void


closeSubpath

â–¸ closeSubpath(): void

Returns: void


connectPath

â–¸ connectPath(path: QPainterPath): void

Parameters:

NameType
pathQPainterPath

Returns: void


controlPointRect

â–¸ controlPointRect(): object

Returns: object

  • height: number

  • width: number

  • x: number

  • y: number


cubicTo

â–¸ cubicTo(c1X: number, c1Y: number, c2X: number, c2Y: number, endPointX: number, endPointY: number): boolean

Parameters:

NameType
c1Xnumber
c1Ynumber
c2Xnumber
c2Ynumber
endPointXnumber
endPointYnumber

Returns: boolean


currentPosition

â–¸ currentPosition(): object

Returns: object

  • x: number

  • y: number


elementCount

â–¸ elementCount(): number

Returns: number


fillRule

â–¸ fillRule(): FillRule

Returns: FillRule


intersects

â–¸ intersects(path: QPainterPath): boolean

Parameters:

NameType
pathQPainterPath

Returns: boolean


isEmpty

â–¸ isEmpty(): boolean

Returns: boolean


length

â–¸ length(): number

Returns: number


lineTo

â–¸ lineTo(x: number, y: number): boolean

Parameters:

NameType
xnumber
ynumber

Returns: boolean


moveTo

â–¸ moveTo(x: number, y: number): void

Parameters:

NameType
xnumber
ynumber

Returns: void


percentAtLength

â–¸ percentAtLength(len: number): number

Parameters:

NameType
lennumber

Returns: number


pointAtPercent

â–¸ pointAtPercent(p: number): object

Parameters:

NameType
pnumber

Returns: object

  • x: number

  • y: number


quadTo

â–¸ quadTo(cx: number, cy: number, endPointX: number, endPointY: number): boolean

Parameters:

NameType
cxnumber
cynumber
endPointXnumber
endPointYnumber

Returns: boolean


reserve

â–¸ reserve(size: number): void

Parameters:

NameType
sizenumber

Returns: void


setElementPositionAt

â–¸ setElementPositionAt(index: number, x: number, y: number): void

Parameters:

NameType
indexnumber
xnumber
ynumber

Returns: void


setFillRule

â–¸ setFillRule(fillRule: FillRule): void

Parameters:

NameType
fillRuleFillRule

Returns: void


slopeAtPercent

â–¸ slopeAtPercent(p: number): number

Parameters:

NameType
pnumber

Returns: number


swap

â–¸ swap(other: QPainterPath): void

Parameters:

NameType
otherQPainterPath

Returns: void


translate

â–¸ translate(x: number, y: number): void

Parameters:

NameType
xnumber
ynumber

Returns: void