pixelToChar method

Vec pixelToChar(
  1. Vec pixel
)
override

Given a point in pixel coordinates, returns the coordinates of the character that contains that pixel.

Implementation

Vec pixelToChar(Vec pixel) =>
    Vec(pixel.x ~/ _font.charWidth, pixel.y ~/ _font.lineHeight);