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

Improvement: Send Graphics Context to Components #103

Closed
GoogleCodeExporter opened this issue May 19, 2015 · 8 comments
Closed

Improvement: Send Graphics Context to Components #103

GoogleCodeExporter opened this issue May 19, 2015 · 8 comments

Comments

@GoogleCodeExporter
Copy link

The draw() method currently takes a canvas.

I suggest that instead a graphics context is sent to the components that 
contains at least:
* a canvas (this doesn't have to be the main canvas; it could be a small canvas 
suitable only for the subcomponent -- which could be a way of parallelising the 
draw method).
* the io_service to allow scheduled actions.
* the GUI strand object

This could also be extended to events in some way if an event was rewritten as 
equivalent to tuple<context, any>.

Original issue reported on code.google.com by [email protected] on 26 Jun 2012 at 7:15

@GoogleCodeExporter
Copy link
Author

[deleted comment]

3 similar comments
@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

The io_service can be retrieved from the strand.

Original comment by [email protected] on 16 Oct 2012 at 6:57

@GoogleCodeExporter
Copy link
Author

An implementation note for animations:  To avoid processing animations that are 
not being drawn, the following should occur:
  * on the draw() call, find which frame of animation should occur and draw it.
  * submit a timed callback for the next frame.
  * on the callback, fire an on_repaint area of the animated area.  Do NOT reschedule another callback.

A follow-up draw() call will only occur if the component is visible in some 
way, and if the component is removed, its memory will fall away at the eventual 
callback.

Original comment by [email protected] on 17 Oct 2012 at 5:20

@GoogleCodeExporter
Copy link
Author

Implemented in r139.

Original comment by [email protected] on 18 Oct 2012 at 5:45

  • Changed state: Fixed

@GoogleCodeExporter
Copy link
Author

Original comment by [email protected] on 30 Aug 2013 at 7:42

  • Changed state: Verified

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

1 participant