PDimension class
A PCanvas dimension.
- Mixed-in types
- Implementers
- Available extensions
Constructors
- PDimension(num width, num height)
-
const
-
PDimension.fromJson(Map<
String, dynamic> j) -
factory
- PDimension.square(int size)
-
factory
Properties
- area → num
-
The area of this dimension.
no setterinherited
- aspectRation → double
-
The aspect ration of this dimension (width / height).
no setterinherited
- center → Point
-
The center
point
of this dimension.no setterinherited - className → String
-
no setteroverride
- dimension → PDimension
-
The PDimension of this instance.
no setteroverride
- hashCode → int
-
The hash code for this object.
no setteroverride
- height → num
-
The dimension height.
final
- isZeroDimension → bool
-
Returns
true
if the area of this dimension is zero.no setterinherited - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- width → num
-
The dimension width.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
resolve(
) → PDimension - Returns a resolved version of this instance.
-
setHeight(
num height) → PDimension -
setWidth(
num width) → PDimension -
toJson(
) → Map< String, dynamic> -
override
-
toPRectangle(
{num x = 0, num y = 0}) → PRectangle -
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
Static Methods
-
resolveDimension(
PDimension? dimension, num? w, num? h, {PCanvasElement? element}) → PDimension