Method BuildSprite
BuildSprite(List<Geometry>, float, Alignment, Vector2, ushort, bool)
Builds a sprite asset from a scene tessellation.
Declaration
public static Sprite BuildSprite(List<VectorUtils.Geometry> geoms, float svgPixelsPerUnit, VectorUtils.Alignment alignment, Vector2 customPivot, ushort gradientResolution, bool flipYAxis = false)
Parameters
Type | Name | Description |
---|---|---|
List<VectorUtils.Geometry> | geoms | The list of tessellated Geometry instances |
float | svgPixelsPerUnit | How many SVG "pixels" map into a Unity unit |
VectorUtils.Alignment | alignment | The position of the sprite origin |
Vector2 | customPivot | If alignment is Custom, customPivot is used to compute the sprite origin |
ushort | gradientResolution | The maximum size of the texture holding gradient data |
bool | flipYAxis | True to have the positive Y axis to go downward. |
Returns
Type | Description |
---|---|
Sprite | A new Sprite containing the provided geometry. The Sprite may have a texture if the geometry has any texture and/or gradients |
BuildSprite(List<Geometry>, Rect, float, Alignment, Vector2, ushort, bool)
Builds a sprite asset from a scene tessellation.
Declaration
public static Sprite BuildSprite(List<VectorUtils.Geometry> geoms, Rect rect, float svgPixelsPerUnit, VectorUtils.Alignment alignment, Vector2 customPivot, ushort gradientResolution, bool flipYAxis = false)
Parameters
Type | Name | Description |
---|---|---|
List<VectorUtils.Geometry> | geoms | The list of tessellated Geometry instances |
Rect | rect | The position and size of the sprite geometry |
float | svgPixelsPerUnit | How many SVG "pixels" map into a Unity unit |
VectorUtils.Alignment | alignment | The position of the sprite origin |
Vector2 | customPivot | If alignment is Custom, customPivot is used to compute the sprite origin |
ushort | gradientResolution | The maximum size of the texture holding gradient data |
bool | flipYAxis | True to have the positive Y axis to go downward. |
Returns
Type | Description |
---|---|
Sprite | A new Sprite containing the provided geometry. The Sprite may have a texture if the geometry has any texture and/or gradients |