![]() NanoVG uses even-odd fill rule to draw the shapes. The are functions to draw common shapes like rectangles and circles, and lower level step-by-step functions, which allow to define a path Then you define one or more paths and sub-paths which describe Pathsĭrawing a new shape starts with BeginPath, it clears all the currently defined paths. This is useful for various user interface cases like rendering a text edit or a timeline. Scissoring allows you to clip the rendering into a rectangle. ![]() These can be used as paints for strokes and NanoVG supports four types of paints: linear gradient, box gradient, radial gradient and image pattern. In addition you can upload your own image. NanoVG allows you to load jpg, png, psd, tga, pic and gif files to be used for rendering. The last row is assumed to be 0,0,1 and is notĪpart from ResetTransform, each transformation function first creates specific transformation matrix and pre-multiplies the current transformationĬurrent coordinate system (transformation) can be saved and restored using Save and Restore. Where: sx,sy define scaling, kx,ky skewing, and tx,ty translation. Transformation matrix is a affine matrix: The paths, gradients, patterns and scissor region are transformed by an transformation matrix at the time when they are passed to the API. ![]() Solid color is simply defined as a color value,ĭifferent kinds of paints can be created using LinearGradient, BoxGradient, RadialGradient and ImagePattern.Ĭurrent render style can be saved and restored using Save and Restore. The state contains transform, fill and stroke styles, text and font styles, andįill and stroke render style can be either a solid color or a paint which is a gradient or a pattern. NanoVG contains state which represents how paths will be rendered. Practical and fun toolset for building scalable user interfaces and visualizations.Ĭolors in NanoVG are stored as unsigned ints in ABGR format. It has lean API modeled after HTML5 canvas API. ![]() ![]() NanoVG is a small antialiased vector graphics rendering library for OpenGL. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |