normalisedToCanvas function
Converts a normalised coordinate (0–1) to a canvas pixel offset.
Implementation
Offset normalisedToCanvas(double nx, double ny, VideoContentBounds bounds) {
return Offset(
bounds.left + nx * bounds.width,
bounds.top + ny * bounds.height,
);
}