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 for embedded effects within Frames #23

Open
peterbrittain opened this issue Mar 5, 2016 · 6 comments
Open

Allow for embedded effects within Frames #23

peterbrittain opened this issue Mar 5, 2016 · 6 comments
Milestone

Comments

@peterbrittain
Copy link
Owner

The Canvas API is identical to the Screen API, so that any Effect can be embedded in a Frame. All that is needed is some adapter layer - e.g. a new widget type to allow any Effect to bre reproduced (and limited to) the Frame.

@peterbrittain
Copy link
Owner Author

Possibly don't event need a new widget. The Frame's Canvas is correct and Frames with no input widgets are supported, so could just maintain a set of effects to render onto the Canvas before the Frame draws its content...

@peterbrittain
Copy link
Owner Author

peterbrittain commented Jun 4, 2016

The logic for Frames (which clear on screen refresh) is not immediately compatible with general Effects (which often rely on the Screen maintaining state between refreshes). For a consistent API, I either need to replicate the way the Screen maintains state, or move wholesale to full double buffering, so that every Effect redraws on a refresh.

@peterbrittain
Copy link
Owner Author

In other words, I might need to do #24 before this...

@peterbrittain peterbrittain added this to the V2.0 milestone Jul 19, 2016
@peterbrittain peterbrittain removed their assignment Jul 20, 2016
@peterbrittain
Copy link
Owner Author

There is currently an experimental feature for doing this in V1.7. However this API will need to change when this issue is resolved.

@decentral1se
Copy link
Contributor

decentral1se commented Jun 17, 2018

Hey there @peterbrittain, did this land? I see you're already on a v1.9.

Will be looking into how to do this today.

EDIT: Actually, what I am looking for, is putting a sprite in a layout.

@peterbrittain
Copy link
Owner Author

There's the ability to embed effects inside a Frame, but not Layouts. To take it further, the Frame drawing logic and Effects really need to be aligned. Right now, one forces widgets to do a full redraw, but the other leaves it up to the update logic how to remove old content.

I plan to reconcile In version 2.0 when full double buffering and redrawing will be enforced everywhere.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants
@decentral1se @peterbrittain and others