spectrumnero.blogg.se

Raster x
Raster x








raster x

ScannerFT contains a modified version of the antialiaser found in the golang freetype translation. ScannerGV wraps the rasterizer found in the /x/image/vector package.

raster x

There are two different structs that satisfy the Scanner interface ScannerGV and ScannerFT. Rasterx abstracts this last step through the Scanner interface. Rasterx takes the path description of lines, bezier curves, and drawing parameters, and converts them into a set of straight line segments before rasterizing the lines to an image using some method of antialiasing. The black chevrons at the top show different cap and gap functions. The middle and lower path shows the effect of using the miter-clip and arc-clip joins, repectively, with different miter-limit values. The top stroked path uses miter (green) or arc (red, yellow, orange) join functions with high miter limit. The above image shows the effect of using different join modes for a stroked curving path. Line start and end capping functions can be different.Several cap and gap functions in addition to those specified by SVG2.0 are implemented, specifically quad and cubic caps and gaps.Not specified in the SVG2.0 spec., but supported in rasterx is the arc-clip join, which is the arc join analog of a miter-clip join, both of which end the miter at a specified distance, rather than all or nothing.Arc joins are supported, which causes the extending edge from a Bezier curve to follow the radius of curvature at the end point rather than a straight line miter, resulting in a more fluid looking join.Paths can be explicity closed or left open, resulting in a line join or end caps.Rasterx is a golang rasterizer that implements path stroking functions capable of SVG 2.0 compliant 'arc' joins and explicit loop closing.










Raster x