QPainterPath
Lets you paint paths on widgets.
This class is a JS wrapper around Qt's QPainterPath class
Hierarchy
↳ QPainterPath
Index
Constructors
Properties
Methods
- addEllipse
- addPath
- addRect
- addRoundedRect
- addText
- angleAtPercent
- arcMoveTo
- arcTo
- boundingRect
- capacity
- clear
- closeSubpath
- connectPath
- controlPointRect
- cubicTo
- currentPosition
- elementCount
- fillRule
- intersects
- isEmpty
- length
- lineTo
- moveTo
- percentAtLength
- pointAtPercent
- quadTo
- reserve
- setElementPositionAt
- setFillRule
- slopeAtPercent
- swap
- translate
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:
Name | Type |
---|---|
x | number |
y | number |
width | number |
height | number |
Returns: void
addPath
â–¸ addPath(path
: QPainterPath): void
Parameters:
Name | Type |
---|---|
path | QPainterPath |
Returns: void
addRect
â–¸ addRect(x
: number, y
: number, width
: number, height
: number): void
Parameters:
Name | Type |
---|---|
x | number |
y | number |
width | number |
height | number |
Returns: void
addRoundedRect
â–¸ addRoundedRect(x
: number, y
: number, width
: number, height
: number, xRadius
: number, yRadius
: number, mode
: SizeMode): void
Parameters:
Name | Type | Default |
---|---|---|
x | number | - |
y | number | - |
width | number | - |
height | number | - |
xRadius | number | - |
yRadius | number | - |
mode | SizeMode | SizeMode.AbsoluteSize |
Returns: void
addText
â–¸ addText(x
: number, y
: number, font
: QFont, text
: string): void
Parameters:
Name | Type |
---|---|
x | number |
y | number |
font | QFont |
text | string |
Returns: void
angleAtPercent
â–¸ angleAtPercent(t
: number): number
Parameters:
Name | Type |
---|---|
t | number |
Returns: number
arcMoveTo
â–¸ arcMoveTo(x
: number, y
: number, width
: number, height
: number, angle
: number): void
Parameters:
Name | Type |
---|---|
x | number |
y | number |
width | number |
height | number |
angle | number |
Returns: void
arcTo
â–¸ arcTo(x
: number, y
: number, width
: number, height
: number, startAngle
: number, sweepLength
: number): void
Parameters:
Name | Type |
---|---|
x | number |
y | number |
width | number |
height | number |
startAngle | number |
sweepLength | number |
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:
Name | Type |
---|---|
path | QPainterPath |
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:
Name | Type |
---|---|
c1X | number |
c1Y | number |
c2X | number |
c2Y | number |
endPointX | number |
endPointY | number |
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:
Name | Type |
---|---|
path | QPainterPath |
Returns: boolean
isEmpty
â–¸ isEmpty(): boolean
Returns: boolean
length
â–¸ length(): number
Returns: number
lineTo
â–¸ lineTo(x
: number, y
: number): boolean
Parameters:
Name | Type |
---|---|
x | number |
y | number |
Returns: boolean
moveTo
â–¸ moveTo(x
: number, y
: number): void
Parameters:
Name | Type |
---|---|
x | number |
y | number |
Returns: void
percentAtLength
â–¸ percentAtLength(len
: number): number
Parameters:
Name | Type |
---|---|
len | number |
Returns: number
pointAtPercent
â–¸ pointAtPercent(p
: number): object
Parameters:
Name | Type |
---|---|
p | number |
Returns: object
x: number
y: number
quadTo
â–¸ quadTo(cx
: number, cy
: number, endPointX
: number, endPointY
: number): boolean
Parameters:
Name | Type |
---|---|
cx | number |
cy | number |
endPointX | number |
endPointY | number |
Returns: boolean
reserve
â–¸ reserve(size
: number): void
Parameters:
Name | Type |
---|---|
size | number |
Returns: void
setElementPositionAt
â–¸ setElementPositionAt(index
: number, x
: number, y
: number): void
Parameters:
Name | Type |
---|---|
index | number |
x | number |
y | number |
Returns: void
setFillRule
â–¸ setFillRule(fillRule
: FillRule): void
Parameters:
Name | Type |
---|---|
fillRule | FillRule |
Returns: void
slopeAtPercent
â–¸ slopeAtPercent(p
: number): number
Parameters:
Name | Type |
---|---|
p | number |
Returns: number
swap
â–¸ swap(other
: QPainterPath): void
Parameters:
Name | Type |
---|---|
other | QPainterPath |
Returns: void
translate
â–¸ translate(x
: number, y
: number): void
Parameters:
Name | Type |
---|---|
x | number |
y | number |
Returns: void