Skip to content

GRID/DOTS pixel style clips the last few matrix rows #1

Description

@dabeckham

Measured on the test TV (HiSmart 2K ATV4, 1280x720) with a 64x32 matrix, scaleMode FIT.

Expected the matrix to occupy y=40..679 (640 rows, 20px per cell).

Observed

  • pixelStyle=SOLID: lit rows y=40..679 — exact.
  • pixelStyle=GRID, pixelGapPercent=15: lit rows y=40..618. The bottom ~3 matrix rows are not drawn, and there is a step in the right edge at x=678 from y=601 down.

Reproducible across 5 consecutive screenshots taken seconds apart, and the image is confirmed live (content changes between captures), so it is not a torn capture.

Only affects the optional gap/dot overlay; SOLID is the default and is correct, so this is cosmetic.

Likely in MatrixSurfaceView.buildMask / drawMask. The mask is an ALPHA_8 bitmap sized to dstRect and blitted at dstRect.left/top; a density mismatch between the mask bitmap and the surface canvas would make drawBitmap(Bitmap, float, float, Paint) scale it, which fits the symptom (full width preserved because the underlying image is drawn unmasked, height short by ~10%). Untested hypothesis — the fix should start by logging the mask bitmap density vs the canvas density, or by switching to the drawBitmap(bitmap, srcRect, dstRect, paint) overload, which ignores density.

Repro:

adb shell "am start -n app.fppvm.tv/.MainActivity --es config '{"width":64,"height":32,"pixelStyle":"GRID","pixelGapPercent":15}'"

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions