# Creating Graphics with the Palette

To create a new SVG element in a document, move the insertion point to the position where you want to insert it, and then click the Graphics button. The Graphics button () displays a palette that stays on the screen until you click Done on the palette.

The available graphics elements are:

- A line, `line` in SVG,
- A rectangle, `rect` in SVG with no `rx` or `ry` attributes,
- A rectangle with rounded corners, `rect` in SVG,
- A circle, `circle` in SVG,
- An ellipse, `ellipse` in SVG,
- A polyline, `polyline` in SVG,
- A polygon, `polygon` in SVG,
- An open curve, `path` in SVG,
- A closed curve, `path` in SVG,

- An embedded HTML fragment, `foreignObject` in SVG,
- A SVG text, `text` in SVG

## Selecting a Shape in the Palette

When you select a shape in the palette and the selection is in the HTML structure of the document, Amaya creates a new SVG element just at the beginning of the current selection and inserts the selected shape into this new SVG. Amaya generates SVG drawings as blocks, between paragraphs. To display a drawing inline, you must create it between paragraphs then edit the source code to move it.

When the current selected element is a SVG element, the new shape is added to the current SVG drawing. The new shape is added after and can overlap previous shapes.

The creation of a shape requires direct interaction:

- To create a rectangle, you first select the position of the left corner by pressing the left mouse button. While holding down the button, move the mouse to the position of the opposite corner, then release the button. The shape is now defined.

- To create a circle or an ellipse, you first select the position of the center by pressing the left mouse button. While holding down the button, move the mouse to the right and/or bottom of the shape, then release the button. The shape is now defined.

- For a polyline and polygon, enter each point by clicking the corresponding position with the left mouse button. To indicate the last point, click with the middle or right button.

## Inserting an Image

You can insert an image within a SVG drawing. Choose Image from the Xhtml menu or click the Insert Image button from the button bar and proceed in the same way as in HTML.

To insert a mathematical expression into a SVG drawing, click the Math palette when the selection is within an SVG. Amaya will generate a SVG `foreignObject` to embed the MathML markup.

## See Also:

- Working with Graphics
- Editing Mathematics
- The Math Palette and the Types/Math menu