Draft SMFL-based native canvas implementation - #406
Conversation
Codecov Report
@@ Coverage Diff @@
## master #406 +/- ##
==========================================
+ Coverage 82.78% 82.99% +0.20%
==========================================
Files 298 299 +1
Lines 36943 34044 -2899
==========================================
- Hits 30584 28255 -2329
+ Misses 6359 5789 -570
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
|
Right now, this PR is structured to directly emulate We could put it in a new namespace like If we did that, we could potentially make a design based around a and the downside being the |
And archive on wayback machine
Should fix issues experienced by students on M1 macs reported by @anyaevostinar
|
TODO: switch from sfml to https://github.com/a-e-k/canvas_ity |
…551) Swaps out adjectives that could read as ableist, as nationality used as a generic personality trait, as substance-abuse stigmatizing language, as body- or appearance-shaming, as colonial- or racially-coded "othering" language, as trivializing real hardship (including terms tied to homelessness/vagrancy), as profanity, as crude/vulgar, as evoking violence or sexual assault, or as referencing mobility impairment or intimidation, for neutral, equally whimsical descriptors, and drops one adjective outright — leaving 2179 unique adjectives (down from 2180). This also replaces a stray all-caps "TRUE" entry duplicating "true". Also swaps an ethnic slur out of the animals list for a real animal name, since it sat in the same lookup table. Passes clang-format-20 --dry-run --Werror and the Empecable spell checker. Supervised by @mmore500 Claude-Session: https://claude.ai/code/session_019xyQRjfbVXpDqoipud1fuo Co-authored-by: Claude <noreply@anthropic.com>
Swaps "womanly" (gendered adjective) for "willowy", and "tangle" (not an actual animal name) for the real bird name "tanager". Passes clang-format-20 --dry-run --Werror and the Empecable spell checker. Supervised by @mmore500 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019xyQRjfbVXpDqoipud1fuo
This pull request aims to add a native backend for
emp::web::Canvasso that we can draw to a canvas and save results as an image file from our natively-compiled applications. The idea is to provide twoemp::web::Canvasclasses (one inweb/_NativeCanvas.hppand one inweb/_EmscriptenCanvas.hpp) and then use the preprocessor__EMSCRIPTEN__to switch out which class is used. For the native implementation, we ape only the drawing and safe-to-file methods... not the full dom model or any ofCanvas's "Widget"-related attributes.Under the hood, this PR uses the "Simple and Fast Multimedia Library" https://www.sfml-dev.org/
pro:
-lsfml-graphicsflagcon:
I've got some minimal working code put together (see image!), but lots left unimplemented. If we decide to move in this direction, this might make for a good undergraduate project!
