PRectangleElement class
A rectangle PCanvasElement2D.
- Inheritance
-
- Object
- WithBoundingBox
- PCanvasElement
- PCanvasElement2D
- PCanvasElement2DBase
- PRectangleElement
- Available extensions
Constructors
-
PRectangleElement({PStyle? style, PCanvasElementContainer<
PCanvasElement> ? parent, int? zIndex, String? id, Position? pos, PDimension? dimension}) -
PRectangleElement.fromJson(Map<
String, dynamic> j) -
factory
Properties
- boundingBox → PRectangle
-
The bounding box of this element.
no setterinherited
- className → String
-
no setteroverride
- dimension ↔ PDimension
-
The dimension of this element.
getter/setter pairinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- height ↔ num
-
The resolved height of this 2D element.
getter/setter pairinherited
- id ↔ String?
-
The ID of this element.
getter/setter pairinherited
-
parent
↔ PCanvasElementContainer<
PCanvasElement> ? -
The parent of this element.
getter/setter pairinherited
- parentElement → PCanvasElement?
-
no setterinherited
- pCanvas → PCanvas?
-
Returns the root PCanvas if this element is attached.
no setterinherited
- position ↔ Position
-
The position of this element.
getter/setter pairinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- style ↔ PStyle?
-
getter/setter pair
- typeName → String
-
no setteroverride
- width ↔ num
-
The resolved width of this 2D element.
getter/setter pairinherited
- x ↔ num
-
The resolved X coordinate of this 2D element.
getter/setter pairinherited
- y ↔ num
-
The resolved Y coordinate of this 2D element.
getter/setter pairinherited
- zIndex ↔ int?
-
The Z index of this element.
getter/setter pairinherited
Methods
-
dispatchOnClick(
PCanvasClickEvent event) → PCanvasClickEvent -
Processes
event
and calls onClickinherited -
dispatchOnClickDown(
PCanvasClickEvent event) → PCanvasClickEvent -
Processes
event
and calls onClickDowninherited -
dispatchOnClickMove(
PCanvasClickEvent event) → PCanvasClickEvent -
Processes
event
and calls onClickMoveinherited -
dispatchOnClickUp(
PCanvasClickEvent event) → PCanvasClickEvent -
Processes
event
and calls onClickUpinherited -
dispatchOnKey(
PCanvasKeyEvent event) → void -
Processes
event
and calls onKeyinherited -
dispatchOnKeyDown(
PCanvasKeyEvent event) → void -
Processes
event
and calls onKeyDowninherited -
dispatchOnKeyUp(
PCanvasKeyEvent event) → void -
Processes
event
and calls onKeyUpinherited -
getPaintBoundingBox(
PCanvas pCanvas) → PRectangle -
The bounding box of the painted area of this element.
inherited
-
getXY(
) → Point -
gets x and y.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onClick(
PCanvasClickEvent event) → void -
Canvas
onClick
handler.inherited -
onClickDown(
PCanvasClickEvent event) → void -
Canvas
onClickDown
handler.inherited -
onClickMove(
PCanvasClickEvent event) → void -
Canvas
onClickMove
handler.inherited -
onClickUp(
PCanvasClickEvent event) → void -
Canvas
onClickUp
handler.inherited -
onKey(
PCanvasKeyEvent event) → void -
Canvas
onKey
handler.inherited -
onKeyDown(
PCanvasKeyEvent event) → void -
Canvas
onKeyDown
handler.inherited -
onKeyUp(
PCanvasKeyEvent event) → void -
Canvas
onKeyUp
handler.inherited -
paint(
PCanvas pCanvas) → void -
The paint operation of this element.
override
-
setXY(
num x, num y) → dynamic -
Sets the
x
andy
.inherited -
toInnerClickEvent(
PCanvasClickEvent event, {PCanvasElement? targetElement, PCanvas? pCanvas}) → PCanvasClickEvent -
Returns an
event
translated to the internal coordinates of this element.inherited -
toJson(
) → Map< String, dynamic> -
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited