Skip to content
Snippets Groups Projects

ctx: update from upstream - more enabled features

Merged pippin requested to merge pippin/ctx_update_from_upstream_more_features into main

CTX_PARSER - for parsing SVG path data inline.

CTX_GSTATE_PROTECT for sanity checking on save/restore balance (the sanity checking we already get, with ctx_gstate_protect() and ctx_gstate_unprotect() inserted around "user" code, balance will also be restored.

CTX_FORMATTER - for recording vector "screenshots" and transmitting display contents over TCP.

Pixel encodings GRAY1, GRAY2, GRAY4 - for efficient large lowbith grayscale textures, we've got lots of memory, but we can stretch it much further by using 1-4bit per pixel rather than 24/32 for some high-contrast use cases.

Pixel encoding GRAYA8 - to handle grayscale PNGs with alpha.

Merge request reports

Pipeline #7363 passed

Pipeline passed for b07a77d8 on pippin/ctx_update_from_upstream_more_features

Approved by

Merged by moon2moon2 1 year ago (Aug 26, 2023 10:10am UTC)

Merge details

  • Changes merged into main with b07a77d8.
  • Deleted the source branch.
  • Auto-merge enabled

Pipeline #7364 passed

Pipeline passed for b07a77d8 on main

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • pippin approved this merge request

    approved this merge request

  • doesn't look like there'd be, but just to be certain: to your knowledge are there any behavior changes for existing flow3r ctx in there?

  • Author Maintainer

    this is part of the changes earlier kept as a work-in-progress base of fixes underneath st3m_media. With this, some incorrect use of ctx (also internal in ctx) will be less damaging to the global graphics state and reported on to stderr. And I think grayscale PNGs with alpha might have been a lingering PNG variant that first starts working now.

  • Author Maintainer

    I also have not tested,. but uctx already has bindings for ctx.parse() that get conditionally enabled. This might be a bigger feature. Instead of translating a SVG path data string of d="M 100 100 L 120 120 l -40 0 z" string into individual drawing commands like ctx.move_to(100,100).line_to(120,120).rel_line_to(-40,0).close_path() one should can now be able to call ctx.parse("M 100 100 L ...").

    As well as using the rest of https://ctx.graphics/protocol/ which is a superset of SVG path data.

    Edited by pippin
  • moon2 approved this merge request

    approved this merge request

  • moon2 added 9 commits

    added 9 commits

    Compare with previous version

  • moon2 enabled an automatic merge when the pipeline for b07a77d8 succeeds

    enabled an automatic merge when the pipeline for b07a77d8 succeeds

  • merged

Please register or sign in to reply
Loading