getBlockPaintPoint function
Calculates the real painting offset point for BlockElement
.
The axis
is the anchor point with the BlockElement
's offset.
Implementation
Offset getBlockPaintPoint(
Offset axis,
double width,
double height,
painting.Alignment align,
) =>
Offset(
axis.dx - (width / 2) + ((width / 2) * align.x),
axis.dy - (height / 2) + ((height / 2) * align.y),
);