Skip to content

Explore ways to make it easy for people to draw to an existing surface that they control #6

@mikebmcl

Description

@mikebmcl

Right now, the display_surface class displays the results of using this library to users. It does so by doing all of the underlying native work itself, which means it controls things and only allows users to take certain actions.

As some people have mentioned, it would be nice if there was a way to use this library to draw things and then let them output the results to an output "surface" that they already have created and control. I like this idea but for it to be useful, it needs to be (mostly) portable.

My initial thought was a factory function that takes an implementation-defined set of arguments and returns an opaque object that acts as a token. There would then be some sort of standalone draw function that would essentially do a paint operation, taking the token and all the same arguments that surface::paint takes and drawing data accordingly. Then I thought about actually implementing it and... I'm not so sure.

So I'm opening this as an issue with suggestions welcome. I may post this to the LEWG reflector at some point. I need to think about that more before deciding whether to do it. For now, anyone with suggestions, please post them here!

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions