Adam D. Ruppe





Permalink Reply

https:// github.com/ adamdru ppe/arsd nanovega.d depends on: simpledisplay.d, color.d, and ttf.d (latter only on Windows) Should also be present in v1.3 of the dub package http:// code.dl ang.org/ packages/ arsd-official API docs (includes an example to get you started) http:// dpldocs.info/ experimental- docs/ arsd.nan ovega.html This module's primary author is ketmar. What follows is his description: NanoVega is a fork of the famous NanoVG rendering library. it was ported to D, and then updgraded with various features. NanoVega is using OpenGL for rendering (i.e. no intermediate rasterize-to-picture step), and its API modelled after HTML5 canvas API. most interesting *new* features are: * clipping to paths * support for non-zero and even-odd fill rules. original NanoVG only supported non-zero (despite what it's README says). * fontconfig support on Posix systems. * full-featured picking API: you can check if your mouse cursor is inside of a filled path, or on the border of a stroked path. you don't need to render your pathes for this, and you can do your tests *before* rendering (to change colors of UI elements on mouse hover, for example). it is quite fast, and is using quad-tree to further speed up the tests. * NanoVega is completely @nogc! * easy to use and powerful text API: accepts `char`, `wchar`, and `dchar` strings, so you don't need to convert your text back and forth! provides iterators and callback-based API to get various text metrics. * doesn't require any dependencies besides ARSD modules. * extensive DDoc documentation and sample code. * comes with Blendish port to make your UI rendering easy and fun. < http:// dpldocs.info/ experimental- docs/ arsd.ble ndish.html > (see blendish.d in the arsd repo) there is also standalone SVG parser and rasterizer, based on NanoSVG project. it was forked, ported to D, and made even better than the original! < http:// dpldocs.info/ experimental- docs/ arsd.svg.html > * completely standalone, doesn't require any other modules. * converts your SVGs to drawing commands or cubic bezier curves. * supports standalone "style" tag. * has better and faster XML parser. * has builtin rasterizer, so you can convert your icons to images for speed. * can be used with NanoVega to render SVGs without prior rasterizing. * FAST! and @nogc! enjoy, and happy hacking. ;-)