meo-skia-canvas
    Preparing search index...

    Type Alias FitStyle

    FitStyle:
        | "none"
        | "contain-x"
        | "contain-y"
        | "contain"
        | "cover"
        | "fill"
        | "scale-down"
        | "resize"

    How a canvas is scaled into a window whose size or aspect it does not match. The canvas is centred under every mode but "resize", and the uncovered area is painted with Window.background.

    • "contain" -- the default: scale until one axis fits, keeping the aspect
    • "contain-x" / "contain-y" -- scale to fit that axis alone, letting the other overflow or fall short
    • "cover" -- scale until both axes are covered, cropping the overflow
    • "scale-down" -- as "contain", but never scaling above 1:1
    • "fill" -- stretch both axes independently, distorting the aspect
    • "none" -- draw at 1:1
    • "resize" -- do not scale; resize the canvas itself to the window

    🧪 Not in the HTML Canvas standard.