Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeAtScale ¶
func DecodeAtScale(data []byte, scale int, textureOptions graphics.TextureOptions) (*graphics.Texture, error)
DecodeAtScale rasterizes an SVG at a higher physical resolution without changing its logical dimensions when used by sprites and nine-slice borders.
Types ¶
type Decoder ¶
type Decoder struct{}
Decoder retains twice the intrinsic resolution and uses mipmaps when reduced.
func (Decoder) DecodeImage ¶
func (Decoder) ImageExtension ¶
type DoubleRasterScale ¶
type DoubleRasterScale struct{}
DoubleRasterScale rasterizes SVG textures at twice their logical dimensions.
func (DoubleRasterScale) SVGTextureRasterScale ¶
func (DoubleRasterScale) SVGTextureRasterScale(_, _ int) int
type RasterScale ¶
RasterScale selects a physical resolution multiplier from intrinsic dimensions. The texture keeps the SVG's intrinsic size as its logical sprite size.
type ScaledDecoder ¶
type ScaledDecoder[S RasterScale] struct{}
ScaledDecoder rasterizes SVG files at the scale selected by S and enables mipmaps so minification integrates thin contours instead of undersampling them.
func (ScaledDecoder[S]) DecodeImage ¶
func (ScaledDecoder[S]) DecodeImage(data []byte, options graphics.TextureOptions) (*graphics.Texture, error)
func (ScaledDecoder[S]) ImageExtension ¶
func (ScaledDecoder[S]) ImageExtension() string