> For the complete documentation index, see [llms.txt](https://docs.flatredball.com/gum/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.flatredball.com/gum/gum-tool/gum-elements/skia-standard-elements/svg.md).

# Svg

### Introduction

Svgs can display .svg files. Since these files are vector art, they can be resized without pixelation.

The following is an Svg instance displaying the FlatRedBall logo. Source SVG: <https://github.com/flatredball/FlatRedBallMedia/blob/master/FlatRedBall%20Logos/frb-logo-main.svg>

<figure><img src="/files/KwIhhAuLUOCr0iWv8u7U" alt=""><figcaption><p>Svg displaying the FlatRedBall logo</p></figcaption></figure>

### Source File

The Source File variable controls the lottie animation displayed. This value can be set and changed just like source files on other elements such as a .png on a Sprite.

### Svg Width and Height

Width and Height values can be set on an Svg file just any other Gum element. Unlike rasterized objects such as Sprites, Svgs use Vector art so they can be resized and still retain crisp edges and details.

<figure><img src="/files/anziABrljuh5MtLfsNbI" alt=""><figcaption><p>Resized SVG maintains crisp edges when resized</p></figcaption></figure>

Svgs are still rasterized in Gum, so they display pixels when the view is zoomed in, especially if the Svg has a small Width or Height.

<figure><img src="/files/IiJGNAtoyxogFQ9f7sOi" alt=""><figcaption><p>Small Svgs display pixels if zoomed in</p></figcaption></figure>

### Maintain File Aspect Ratio Width and Height

Svgs support the **Maintain File Aspect Ratio Width** and **Maintain File Aspect Ratio Height** units. For more information, see the [Width Units](/gum/gum-tool/gum-elements/general-properties/width-units.md#maintain-file-aspect-ratio-width) and [Height Units](/gum/gum-tool/gum-elements/general-properties/height-units.md#maintain-file-aspect-ratio-height) page.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.flatredball.com/gum/gum-tool/gum-elements/skia-standard-elements/svg.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
