X Tutup
The Wayback Machine - https://web.archive.org/web/20220213002019/https://ctx.graphics/

vector graphics rasterizer and multi process user land

ctx is an R&D effort into interactive 2D vector graphics rendering and user interfaces and a related software and protocol stack.

The ctx rasterizer is high quality and fast, With color managed compositing directly to RGBA8, GRAYA8, GRAYAF, RGBAF and CMYKAF pixel formats. For microcontrollers rendering to lower bitdepth RGB332, RGB565 variants as well as 1,2 and 4 bit per pixel grayscale is handled. Combined with floating point pixel encoding support and color management ctx scales to meet GEGL and GIMPs needs.

Applications can be written using only the rasterzier or also using higher level abastracitons handling framebuffer creation, event handling and multithreaded rendering. The same API can also be used for writing applications that run inside the ctx terminal, which provides escape sequences that enable drawing 2D vector graphics both inline, and for full-window applications taking over the terminal using the ctx protocol, or even on webpages using webassembly, for now single threaded - and without the potential acceleration through reuse of the rasterizer of the HTML5 Canvas.

The ctx renderer is written in portable C, without inline assembly or SIMD intrinsics - but is still fast (and can make good use of SIMD instructions known by the C compiler. The single threaded rendering performance for 8bit RGBA is comparable with and for most cases quite a bit faster than the rendering engines in Qt/cairo that are using explicit SIMD like SSE2/AVX/Neon for compositing.

Below is ctx compiled to WASM with emscripten (without SIMD support). The same demo runs at 60fps at 2560x1440 resolution for all bits apart from the scrolling of small text - where all text is rasterized from scratch from curves for every frame, the currently disabled generic shape cache improves this - but currently causes slight pixel shifts).

license and funding

The terminal is available under GPLv3+, and ctx.h is available under LGPLv3+ you can encourage continued development of ctx and dissimilar technologies by financially supporting me, Øyvind Kolås who is doing independent pro-bono R&D through patreon and similar. If my income through such sources is above 4000USD per month for a year, or a similar amount in shorter time I want to relicense the rasterizer and protocol parts of ctx under the ISC license. If you'd rather have this R&D applied to cairo; because it furthers interests, I am willing to offer a 2 month stint for 25000 USD; that would result in patches significantly improving the performance of cairo's rasterizer or maybe adding a ctx based alternative image surface inside cairo.

X Tutup