-
-
Notifications
You must be signed in to change notification settings - Fork 25
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
Draw API #326
Comments
Lets list some requirements of the API:
TextAll of these dependencies support text rendering, which we don't really need. (If we did have another text-drawing option, we should at least support shared font discovery and config, if not also shared loading. This is already the case with Note that the above libraries are mostly concerned with drawing text, but may not support shaping, wrapping, pointer-coordinate-to-glyph-index translation, and bi-directional text. For these reasons they will not replace KAS-text, thus are at best an alternative for fancy text transformations. Note also that it would be desirable to offer some transformations for text drawn by KAS-text (at least 90° rotation). |
Custom API over tiny-skia / femtovg / Lyon / kurboAll of the above have some vaguely similar subset of functionality around paths. We could build our own API (possibly a clone of one of the above), and support using multiple of the above libraries as the implementation: Probably we would need to make various features of the API optional (likely desired anyway). This would be a little more work than directly using one of these APIs, but appears to be the only option meeting our goals. |
The drawing API (#17) is still quite bad. Existing features:
Potentially desired features:
A modular design would be useful, potentially run-time modular, allowing themes to query supported features and skip or use alternatives for unsupported things (e.g. skip shadows, use simpler shapes).
Using an existing API would be great. Some ideas:
Some of these may be a little lower level than desired in many cases.
Possible revision to KAS's current API:
norm
parameters into a "paint style" parameterPaintStyle
enum; this potentially allows run-time fall-backThe text was updated successfully, but these errors were encountered: