computePixelAlignment static method
Returns the alignment of a width
xheight
rectangle by left
xtop
pixels.
Implementation
static Alignment computePixelAlignment({
required final double width,
required final double height,
required final double left,
required final double top,
}) =>
Alignment(
1.0 - 2 * left / width,
1.0 - 2 * top / height,
);