Skip to content

v1: transparency fallback via generateNotePng #18

Description

@gorlix

Context

The overlay relies on the plugin view being transparent so the user sees the note underneath while tapping the cut line. Verified working on A5X2 / SN100 firmware. Other devices/firmware may render the plugin view opaque.

Current behavior

Transparent overlay only. If a firmware renders it opaque, the user can't see the page → unusable, no fallback.

Goal

Detect/opt-in fallback: render the current page to a PNG and show it as the overlay background, so tapping still happens over a faithful image of the page. The tap→lasso math is unchanged.

Approach

  • PluginFileAPI.generateNotePng({NOTEPath, page, times:1, pngPath, type:1})<Image> background in the frame.
  • Decide trigger: a manual setting, or device/firmware detection. Simplest: a config toggle.
  • Reuse the same computeLassoRect + lassoElements flow.

Acceptance criteria

  • Fallback mode renders the page image behind the grey frame.
  • Tap maps to the same page coordinates as the transparent path.
  • Works on a device/firmware where transparency fails (or documented as ready for it).

References

  • .claude/skills/supernote-plugin-dev/references/make-space.md §4

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestv1Belongs to v1 scope

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions