Vector procedural zoomable interface elements that for instance allow you to have a fully functional button just by calling a function with all the necessary information provided as parameters (without anything stored in memory) and simply getting the return value, with no need for storage for each instance of a control, no unique IDs or anythingĪ system to make GUI layouts based on markup as well as a window manager to handle multiple windows as well as nested subwindows properlyįunctions to conveniently do operations on point vectors (2D or 3D) or rectangles and triangles, such as generating rectangle coordinates based on position, size and offset vectors, or calculating the scaling and positioning needed to make a rectangle fit in a certain way inside another rectangle. A more complete typeface is available in the vector_type directory Vector font generation, vector text rendering and a built-in minimalistic vector font that is always available. Geometric functions used for computing intersections between lines, shortest the distance of a point to a line or to limit a line to a bounding boxīlending modes like additive, subtractive, multiplicative blending and alpha blendingīlitting of a buffer onto another, like for displaying a spriteĪn original Hue-Saturation-Luminance colour space with a Luminance that is about perceptually correct (unlike the 1931 CIE XYZ colour space which gets the weights of each colour blatantly wrong) which is used for HSL to RGB conversion and for bringing out of gamut colours (such as colours that have components brighter than 1.0) to the most appropriate representable colour I also implemented the inverse of the error function and the integral of the error function.įunctions to draw lines, points, circles, roundrects and gradients, all antialiased with Gaussian filteringįunctions to convert from sRGB to linear RGB for loading images and to convert from linear RGB to sRGB with optional Gaussian dithering for displaying Original math functions such as a short Gaussian function and its integral, the short error function which I now use for filter design. Some are implemented using linear interpolation, segmented quadratic polynomial approximation or simple lookup, which offers different levels of speed/precision/memory usage tradeoffs.įast polynomial lookup table-based floating-point approximations for cos, log2, exp2, pow and others. Fast lookup table-based fixed-point arithmetic approximations for sqrt, hypot, log2, exp2, pow, cos, atan2 (both noting angles in turns, not radians), the Gaussian function ( e -x²) and the raised error function ( 0.5+0.5erf(x)).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |