Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow pen function for fast tile alpha blending #839

Merged
merged 1 commit into from
Sep 11, 2023

Conversation

MichaelBell
Copy link
Contributor

This is just a hook to allow the pen implementation to provide a fast alpha blend for a picovector tile.

@@ -293,6 +293,8 @@ namespace pimoroni {
virtual void frame_convert(PenType type, conversion_callback_func callback);
virtual void sprite(void* data, const Point &sprite, const Point &dest, const int scale, const int transparent);

virtual bool render_pico_vector_tile(const Rect &bounds, uint8_t* alpha_data, uint32_t stride, uint8_t alpha_type) { return false; }
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if it would be preferable to expose the pretty_poly antialias type here instead of having magic numbers that match that enum?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have to be careful about too tightly coupling PicoGraphics and PicoVector since it's entirely possible to have C++ or MicroPython builds that include the former but not the latter. In this case perhaps it's PicoGraphics that should define the enum type for anti-aliasing so that PicoVector can inherit it.

@Gadgetoid Gadgetoid merged commit 9735402 into pimoroni:main Sep 11, 2023
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants