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

Overrides Component.native


nodeChildren

nodeChildren: Set‹Component

Inherited from Component.nodeChildren


Optional nodeParent

nodeParent? : Component

Inherited from Component.nodeParent

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


setNodeParent

setNodeParent(parent?: Component): void

Inherited from Component.setNodeParent

Parameters:

NameType
parent?Component

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