Scalar class
A Scalar
provides an opportunity to scale axis-based double
data.
Default constructor takes named paramters per axis. Use Scalar.xy
as a shortcut to only provide positional double
values.
Scalar.xy(5)
is equivalent toScalar(horizontal: 5, vertical: 5)
and stillconst
.
For use with Foil
s
Accelerometer sensor data may be scaled independently before they translate to gradient "twinkling" transformation (offset/translation).
Scale up the motion factor by providing Scalar.horizontal or
Scalar.vertical a value greater than 1.0
,
or scale down the influence by providing 0 <= scalar <= 1.0
.
For use with Roll
s
In the case of a Roll
, a Scalar
object provides a means to direct
animation of the gradient if isAnimated
is true. Also see the
min
and max
values.
- Mixed-in types
Constructors
- Scalar({double horizontal = 1.0, double vertical = 1.0})
-
A
Scalar
provides an opportunity to scale axis-baseddouble
data. Default constructor takes named paramters per axis. Use Scalar.xy as a shortcut to only provide positionaldouble
values.const - Scalar.xy(double x, [double? y])
-
Positionally provide an
x
or Scalar.horizontal value then ay
or Scalar.vertical value; returns a constructedScalar
object.const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- horizontal → double
-
A
double
that defaults to1.0
that scalesFoil
data.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- vertical → double
-
A
double
that defaults to1.0
that scalesFoil
data.final
Methods
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringShort(
) → String -
A brief description of this object, usually just the runtimeType and the
hashCode.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited