8000 RFC extmod/modframebuf.c Support for blitting from 1-bit to n-bit colour maps · Issue #2973 · micropython/micropython · GitHub
[go: up one dir, main page]

Skip to content
RFC extmod/modframebuf.c Support for blitting from 1-bit to n-bit colour maps #2973
Closed
@peterhinch

Description

@peterhinch

We now have 1-bit horizontal maps. One use for these is for rendering bitmaps such as font glyphs by blitting from a framebuf containing the glyph to the destination framebuf. This works - in a geometry agnostic manner - on monochrome displays where the destination uses 1-bit colour mapping.

Where the destination uses n-bit colour maps the resultant colour is unexpected. The general solution is to introduce the concept of palettes defining a mapping between differing colour spaces. This is not 'micro'.

A 'micro' solution might be to add an optional colour arg to the blit method which, when the source framebuf has a 1-bit mapping, causes the blit to be rendered in the supplied colour. This would enable fast font rendering in arbitrary colours and would be easily implemented.

Or is there a better approach?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0