# VectorUtils

> Provides various tools to work with vector graphics.

## Definition

* **Type:** Class
* **Namespace:** [Unity.VectorGraphics](/engine/6000.6/script-reference/unity/vectorgraphics.md)
* **Assembly:** UnityEngine.VectorGraphicsModule

```csharp
public static class VectorUtils
```

## Static Fields

| Value                                                                                  | Description                                                   |
| -------------------------------------------------------------------------------------- | ------------------------------------------------------------- |
| [Epsilon](/engine/6000.6/script-reference/unity/vectorgraphics/vectorutils/epsilon.md) | A small value used everywhere by the vector graphics package. |

## Static Methods

| Method                                                                                                                         | Description                                                                                                                  |
| ------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------- |
| [ApproximateSceneNodeBounds](/engine/6000.6/script-reference/unity/vectorgraphics/vectorutils/approximatescenenodebounds.md)   | Computes a rough approximation of the node hierarchy bounds.                                                                 |
| [BezierSegmentsToPath](/engine/6000.6/script-reference/unity/vectorgraphics/vectorutils/beziersegmentstopath.md)               | Converts an array of BezierSegments into a connected path.                                                                   |
| [BezierSegmentToPath](/engine/6000.6/script-reference/unity/vectorgraphics/vectorutils/beziersegmenttopath.md)                 | Convert a segments into a path.                                                                                              |
| [Bounds](/engine/6000.6/script-reference/unity/vectorgraphics/vectorutils/bounds.md)                                           | Computes the bounds of a list of vertices.                                                                                   |
| [BuildRectangleContour](/engine/6000.6/script-reference/unity/vectorgraphics/vectorutils/buildrectanglecontour.md)             | Builds a BezierContour from a Rectangle.                                                                                     |
| [BuildSprite](/engine/6000.6/script-reference/unity/vectorgraphics/vectorutils/buildsprite.md)                                 | Builds a sprite asset from a scene tessellation.                                                                             |
| [BuildVectorImage](/engine/6000.6/script-reference/unity/vectorgraphics/vectorutils/buildvectorimage.md)                       | Builds a sprite asset from a scene tessellation.                                                                             |
| [Eval](/engine/6000.6/script-reference/unity/vectorgraphics/vectorutils/eval.md)                                               | Evaluates the position on a curve segment.                                                                                   |
| [EvalFull](/engine/6000.6/script-reference/unity/vectorgraphics/vectorutils/evalfull.md)                                       | Evalutes both the position and tangent on a curve segment.                                                                   |
| [EvalNormal](/engine/6000.6/script-reference/unity/vectorgraphics/vectorutils/evalnormal.md)                                   | Evalutes the normal on a curve segment.                                                                                      |
| [EvalTangent](/engine/6000.6/script-reference/unity/vectorgraphics/vectorutils/evaltangent.md)                                 | Evaluates the tangent on a curve segment.                                                                                    |
| [FillMesh](/engine/6000.6/script-reference/unity/vectorgraphics/vectorutils/fillmesh.md)                                       | Fills a mesh geometry from a scene tessellation.                                                                             |
| [FillUVs](/engine/6000.6/script-reference/unity/vectorgraphics/vectorutils/filluvs.md)                                         | Fill the UVs of the geometry using the provided texture atlas.                                                               |
| [FindBezierLineIntersections](/engine/6000.6/script-reference/unity/vectorgraphics/vectorutils/findbezierlineintersections.md) | Find the intersections (up to three) between a line and a curve segment.                                                     |
| [FlipSegment](/engine/6000.6/script-reference/unity/vectorgraphics/vectorutils/flipsegment.md)                                 | Flips a segment direction.                                                                                                   |
| [FlipVerticesInBounds](/engine/6000.6/script-reference/unity/vectorgraphics/vectorutils/flipverticesinbounds.md)               | Flip the vertices (in-place) inside their axis-aligned bounding-box.                                                         |
| [GenerateAtlas](/engine/6000.6/script-reference/unity/vectorgraphics/vectorutils/generateatlas.md)                             | Generates a Texture2D atlas containing the textures and gradients for the vector geometry.                                   |
| [GenerateAtlasAndFillUVs](/engine/6000.6/script-reference/unity/vectorgraphics/vectorutils/generateatlasandfilluvs.md)         | Generates a Texture2D atlas containing the textures and gradients for the vector geometry, and fill the UVs of the geometry. |
| [IntersectLines](/engine/6000.6/script-reference/unity/vectorgraphics/vectorutils/intersectlines.md)                           | Finds the intersection between two infinite lines                                                                            |
| [IntersectLineSegments](/engine/6000.6/script-reference/unity/vectorgraphics/vectorutils/intersectlinesegments.md)             | Finds the intersection between two line segments                                                                             |
| [MakeArc](/engine/6000.6/script-reference/unity/vectorgraphics/vectorutils/makearc.md)                                         | Approximates a circle arc with up to 4 segments.                                                                             |
| [MakeCircleShape](/engine/6000.6/script-reference/unity/vectorgraphics/vectorutils/makecircleshape.md)                         | Builds a circle shape.                                                                                                       |
| [MakeEllipseShape](/engine/6000.6/script-reference/unity/vectorgraphics/vectorutils/makeellipseshape.md)                       | Builds an ellipse shape.                                                                                                     |
| [MakeLine](/engine/6000.6/script-reference/unity/vectorgraphics/vectorutils/makeline.md)                                       | Builds a line segment.                                                                                                       |
| [MakePathLine](/engine/6000.6/script-reference/unity/vectorgraphics/vectorutils/makepathline.md)                               | Builds a line path segment.                                                                                                  |
| [MakeRectangleShape](/engine/6000.6/script-reference/unity/vectorgraphics/vectorutils/makerectangleshape.md)                   | Builds a rectangle shape.                                                                                                    |
| [PathEndsPerfectlyMatch](/engine/6000.6/script-reference/unity/vectorgraphics/vectorutils/pathendsperfectlymatch.md)           | Checks if the two ends of a BezierPathSegment chain are at the same location.                                                |
| [PathSegmentAtIndex](/engine/6000.6/script-reference/unity/vectorgraphics/vectorutils/pathsegmentatindex.md)                   | Computes the BezierSegment at a given index from a list of BezierPathSegments.                                               |
| [QuadraticToCubic](/engine/6000.6/script-reference/unity/vectorgraphics/vectorutils/quadratictocubic.md)                       | Converts a quadratic bezier to a cubic bezier                                                                                |
| [RealignVerticesInBounds](/engine/6000.6/script-reference/unity/vectorgraphics/vectorutils/realignverticesinbounds.md)         | Realigns the vertices (in-place) inside their axis-aligned bounding-box.                                                     |
| [RenderSprite](/engine/6000.6/script-reference/unity/vectorgraphics/vectorutils/rendersprite.md)                               | Draws a vector sprite using the provided material.                                                                           |
| [RenderSpriteToTexture2D](/engine/6000.6/script-reference/unity/vectorgraphics/vectorutils/renderspritetotexture2d.md)         | Renders a vector sprite to Texture2D.                                                                                        |
| [SceneNodeBounds](/engine/6000.6/script-reference/unity/vectorgraphics/vectorutils/scenenodebounds.md)                         | Computes a pretty accurate approximation of the scene bounds.                                                                |
| [SceneNodes](/engine/6000.6/script-reference/unity/vectorgraphics/vectorutils/scenenodes.md)                                   | Lists every nodes under a root node.                                                                                         |
| [SegmentLength](/engine/6000.6/script-reference/unity/vectorgraphics/vectorutils/segmentlength.md)                             | Computes the length of a single curve segment.                                                                               |
| [SegmentsInPath](/engine/6000.6/script-reference/unity/vectorgraphics/vectorutils/segmentsinpath.md)                           | Iterates through every segment in a list of path segments.                                                                   |
| [SegmentsLength](/engine/6000.6/script-reference/unity/vectorgraphics/vectorutils/segmentslength.md)                           | Computes the combined length of a segment chain.                                                                             |
| [SegmentsLengths](/engine/6000.6/script-reference/unity/vectorgraphics/vectorutils/segmentslengths.md)                         | Computes the individual lengths of a segment chain.                                                                          |
| [SplitSegment](/engine/6000.6/script-reference/unity/vectorgraphics/vectorutils/splitsegment.md)                               | Splits a curve segment at a given parametric location.                                                                       |
| [TessellatePath](/engine/6000.6/script-reference/unity/vectorgraphics/vectorutils/tessellatepath.md)                           | Tessellates a path.                                                                                                          |
| [TessellateRect](/engine/6000.6/script-reference/unity/vectorgraphics/vectorutils/tessellaterect.md)                           | Tessellates a rectangle.                                                                                                     |
| [TessellateRectBorder](/engine/6000.6/script-reference/unity/vectorgraphics/vectorutils/tessellaterectborder.md)               | Tessellates a rectangle border.                                                                                              |
| [TessellateScene](/engine/6000.6/script-reference/unity/vectorgraphics/vectorutils/tessellatescene.md)                         | Tessellates a Scene object into triangles.                                                                                   |
| [TransformBezierPath](/engine/6000.6/script-reference/unity/vectorgraphics/vectorutils/transformbezierpath.md)                 | Transforms a path by a transformation matrix.                                                                                |
| [TransformSegment](/engine/6000.6/script-reference/unity/vectorgraphics/vectorutils/transformsegment.md)                       | Transforms a curve segment by a transformation matrix.                                                                       |
| [WorldTransformedSceneNodes](/engine/6000.6/script-reference/unity/vectorgraphics/vectorutils/worldtransformedscenenodes.md)   | Iterates through every nodes under a root with computed transform and opacities.                                             |

## Classes

| Class                                                                                                        | Description                                               |
| ------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------- |
| [VectorUtils.Geometry](/engine/6000.6/script-reference/unity/vectorgraphics/vectorutils/geometry.md)         | Holds the tessellated Scene geometry and associated data. |
| [VectorUtils.TextureAtlas](/engine/6000.6/script-reference/unity/vectorgraphics/vectorutils/textureatlas.md) | A struct to hold packed atlas entries.                    |

## Structs

| Struct                                                                                                                             | Description                                                                          |
| ---------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ |
| [VectorUtils.PackRectItem](/engine/6000.6/script-reference/unity/vectorgraphics/vectorutils/packrectitem.md)                       | Struct to hold a texture atlas location.                                             |
| [VectorUtils.SceneNodeWorldTransform](/engine/6000.6/script-reference/unity/vectorgraphics/vectorutils/scenenodeworldtransform.md) | Structure holding the SceneNode computed transforms, opacities and enumeration path. |
| [VectorUtils.TessellationOptions](/engine/6000.6/script-reference/unity/vectorgraphics/vectorutils/tessellationoptions.md)         | Structure to store the tessellation options.                                         |

## Enums

| Enum                                                                                                   | Description                                                           |
| ------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------- |
| [VectorUtils.Alignment](/engine/6000.6/script-reference/unity/vectorgraphics/vectorutils/alignment.md) | The alignement of the sprite, to determine the location of the pivot. |
