This modification makes it so the nk_do_property() function uses the user-defined NK_DTOA function instead of the internal nk_dtoa() function, as per the description below "Optional Defines":
NK_DTOA
You can define this to `dtoa` or your own double to string conversion
implementation replacement. If not defined nuklear will use its own
imprecise and possibly unsafe version (does not handle nan or infinity!).
<!> If used it is only required to be defined for the implementation part <!>
Keep up the great work on Nuklear, really enjoying it so far!
The software rasterizer is to be used with raw framebuffer
devices, where no GPU or X11 is available.
The demo emulates a raw framebuffer on X11 using XShmImage / XImage.
Features implemented:
* Drawing primitives
* Drawing polygons (using Darel Rex Finley algorithm)
* Drawing arcs and circles (using Bresenham's elipses algorithm)
* Drawing images using nearest filtering
* Bounds check on every operation
* Fastpath for lines
* Font rendering using nearest filtering
* Window resize
* Thread safe implementation by using a context
* Fixed lower and upper scissors on fast-path
* Adapted coding style to nuklear's style
* Implemented text scissors
Color formats:
Define one of them at compile time.
* RAWFB_RGBX_8888 (32bpp)
* RAWFB_XRGB_8888 (32bpp)
Tested:
The library has been tested on Lenovo Thinkpad T500 and is able to render
more than 30fps on a single core with no further optimizations and VSNYC enabled.
TODO:
* Improve font rendering by using filters.
* Account font foreground color.
Usage:
The raw framebuffer library needs a "texture" that holds the prerendered
font data. The texture is used at runtime to blit the letters onto screen.
You have to provide the framebuffer address, dimension and pitch.
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
1. Main background area was filled by 2 big overlapping rectangles. It works good on solid but not on semi-transparent themes. Just replaced 2 big rectangles with 1 big and 2 small.
2. There is no need in [nk_gdip_fill_rect filled pies fix](7ab7327fa4) anymore. It disturbs semi-transparent themes too.
I think this adds more clarity to the library. I.e. that it is organized into 2 large #define statements. The first large statement (`NK_NUKLEAR_H_`) has a comment for it's closing `#endif` statement. The second one (`NK_IMPLEMENTATION`) does not.