Class

# Graphics

<div class="rst-class">

forsearch

</div>

Graphics

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

## Description

<span class="title-ref">Graphics</span> class objects are used for drawing text, lines, rectangles, ovals, and pictures.

<div class="note">

<div class="title">

Note

</div>

Many of these operations are GPU-accelerated on macOS and Windows.

</div>

## Properties

<div class="rst-class">

table-centered_columns_3_and_4

</div>

| Name                                            | Type                                               | Read-Only | Shared |
|-------------------------------------------------|----------------------------------------------------|-----------|--------|
| `AntiAliased<graphics.antialiased>`             | `Boolean</api/data_types/boolean>`                 |           |        |
| `AntiAliasMode<graphics.antialiasmode>`         | `Graphics.AntiAliasModes<graphics.antialiasmodes>` |           |        |
| `Bold<graphics.bold>`                           | `Boolean</api/data_types/boolean>`                 |           |        |
| `Brush<graphics.brush>`                         | `GraphicsBrush</api/graphics/graphicsbrush>`       |           |        |
| `CharacterSpacing<graphics.characterspacing>`   | `Integer</api/data_types/integer>`                 |           |        |
| `Copies<graphics.copies>`                       | `Integer</api/data_types/integer>`                 | ✓         |        |
| `DrawingColor<graphics.drawingcolor>`           | `Color</api/data_types/color>`                     |           |        |
| `FirstPage<graphics.firstpage>`                 | `Integer</api/data_types/integer>`                 | ✓         |        |
| `Font<graphics.font>`                           | `Font</api/graphics/font>`                         |           |        |
| `FontAscent<graphics.fontascent>`               | `Double</api/data_types/double>`                   | ✓         |        |
| `FontName<graphics.fontname>`                   | `String</api/data_types/string>`                   |           |        |
| `FontSize<graphics.fontsize>`                   | `Single</api/data_types/single>`                   |           |        |
| `FontUnit<graphics.fontunit>`                   | `FontUnits</api/graphics/fontunits>`               |           |        |
| `Height<graphics.height>`                       | `Double</api/data_types/double>`                   | ✓         |        |
| `Italic<graphics.italic>`                       | `Boolean</api/data_types/boolean>`                 |           |        |
| `LastPage<graphics.lastpage>`                   | `Integer</api/data_types/integer>`                 | ✓         |        |
| `LineCap<graphics.linecap>`                     | `LineCapTypes<graphics.linecaptypes>`              |           |        |
| `LineDashOffset<graphics.linedashoffset>`       | `Double</api/data_types/double>`                   |           |        |
| `LineJoin<graphics.linejoin>`                   | `LineJoinTypes<graphics.linejointypes>`            |           |        |
| `MiterLimit<graphics.miterlimit>`               | `Double</api/data_types/double>`                   |           |        |
| `Outline<graphics.outline>`                     | `Boolean</api/data_types/boolean>`                 |           |        |
| `PenSize<graphics.pensize>`                     | `Double</api/data_types/double>`                   |           |        |
| `PrintingCancelled<graphics.printingcancelled>` | `Boolean</api/data_types/boolean>`                 | ✓         |        |
| `ScaleX<graphics.scalex>`                       | `Double</api/data_types/double>`                   |           |        |
| `ScaleY<graphics.scaley>`                       | `Double</api/data_types/double>`                   |           |        |
| `ShadowBrush<graphics.shadowbrush>`             | `ShadowBrush</api/graphics/shadowbrush>`           |           |        |
| `Transparency<graphics.transparency>`           | `Double</api/data_types/double>`                   |           |        |
| `Underline<graphics.underline>`                 | `Boolean</api/data_types/boolean>`                 |           |        |
| `Width<graphics.width>`                         | `Double</api/data_types/double>`                   | ✓         |        |

## Methods

<div class="rst-class">

table-centered_column_4

</div>

<table>
<thead>
<tr class="header">
<th>Name</th>
<th>Parameters</th>
<th>Returns</th>
<th>Shared</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td><code class="interpreted-text" role="ref">ClearRectangle&lt;graphics.clearrectangle&gt;</code></td>
<td>x As <code class="interpreted-text" role="doc">Double&lt;/api/data_types/double&gt;</code>, y As <code class="interpreted-text" role="doc">Double&lt;/api/data_types/double&gt;</code>, width As <code class="interpreted-text" role="doc">Double&lt;/api/data_types/double&gt;</code>, height As <code class="interpreted-text" role="doc">Double&lt;/api/data_types/double&gt;</code></td>
<td></td>
<td></td>
</tr>
<tr class="even">
<td></td>
<td>r As <code class="interpreted-text" role="doc">Rect&lt;/api/graphics/rect&gt;</code></td>
<td></td>
<td></td>
</tr>
<tr class="odd">
<td><code class="interpreted-text" role="ref">Clip&lt;graphics.clip&gt;</code></td>
<td>x As <code class="interpreted-text" role="doc">Double&lt;/api/data_types/double&gt;</code>, y As <code class="interpreted-text" role="doc">Double&lt;/api/data_types/double&gt;</code>, width As <code class="interpreted-text" role="doc">Double&lt;/api/data_types/double&gt;</code>, height As <code class="interpreted-text" role="doc">Double&lt;/api/data_types/double&gt;</code></td>
<td><span class="title-ref">Graphics</span></td>
<td></td>
</tr>
<tr class="even">
<td></td>
<td>r As <code class="interpreted-text" role="doc">Rect&lt;/api/graphics/rect&gt;</code></td>
<td><span class="title-ref">Graphics</span></td>
<td></td>
</tr>
<tr class="odd">
<td><code class="interpreted-text" role="ref">ClipToPath&lt;graphics.cliptopath&gt;</code></td>
<td>path As <code class="interpreted-text" role="doc">GraphicsPath&lt;/api/graphics/graphicspath&gt;</code></td>
<td></td>
<td></td>
</tr>
<tr class="even">
<td><code class="interpreted-text" role="ref">ClipToRectangle&lt;graphics.cliptorectangle&gt;</code></td>
<td>x As <code class="interpreted-text" role="doc">Double&lt;/api/data_types/double&gt;</code>, y As <code class="interpreted-text" role="doc">Double&lt;/api/data_types/double&gt;</code>, width As <code class="interpreted-text" role="doc">Double&lt;/api/data_types/double&gt;</code>, height As <code class="interpreted-text" role="doc">Double&lt;/api/data_types/double&gt;</code></td>
<td></td>
<td></td>
</tr>
<tr class="odd">
<td></td>
<td>r As <code class="interpreted-text" role="doc">Rect&lt;/api/graphics/rect&gt;</code></td>
<td></td>
<td></td>
</tr>
<tr class="even">
<td><code class="interpreted-text" role="ref">DrawCautionIcon&lt;graphics.drawcautionicon&gt;</code></td>
<td>x As <code class="interpreted-text" role="doc">Double&lt;/api/data_types/double&gt;</code>, y As <code class="interpreted-text" role="doc">Double&lt;/api/data_types/double&gt;</code></td>
<td></td>
<td></td>
</tr>
<tr class="odd">
<td><code class="interpreted-text" role="ref">DrawLine&lt;graphics.drawline&gt;</code></td>
<td>x1 As <code class="interpreted-text" role="doc">Double&lt;/api/data_types/double&gt;</code>, y1 As <code class="interpreted-text" role="doc">Double&lt;/api/data_types/double&gt;</code>, x2 As <code class="interpreted-text" role="doc">Double&lt;/api/data_types/double&gt;</code>, y2 As <code class="interpreted-text" role="doc">Double&lt;/api/data_types/double&gt;</code></td>
<td></td>
<td></td>
</tr>
<tr class="even">
<td><code class="interpreted-text" role="ref">DrawNoteIcon&lt;graphics.drawnoteicon&gt;</code></td>
<td>x As <code class="interpreted-text" role="doc">Double&lt;/api/data_types/double&gt;</code>, y As <code class="interpreted-text" role="doc">Double&lt;/api/data_types/double&gt;</code></td>
<td></td>
<td></td>
</tr>
<tr class="odd">
<td><code class="interpreted-text" role="ref">DrawObject&lt;graphics.drawobject&gt;</code></td>
<td>object2D As <code class="interpreted-text" role="doc">Object2D&lt;/api/graphics/object2d&gt;</code>, deltaX As <code class="interpreted-text" role="doc">Double&lt;/api/data_types/double&gt;</code> = 0.0, deltaY As <code class="interpreted-text" role="doc">Double&lt;/api/data_types/double&gt;</code> = 0.0</td>
<td></td>
<td></td>
</tr>
<tr class="even">
<td><code class="interpreted-text" role="ref">DrawOval&lt;graphics.drawoval&gt;</code></td>
<td>x As <code class="interpreted-text" role="doc">Double&lt;/api/data_types/double&gt;</code>, y As <code class="interpreted-text" role="doc">Double&lt;/api/data_types/double&gt;</code>, width As <code class="interpreted-text" role="doc">Double&lt;/api/data_types/double&gt;</code>, height As <code class="interpreted-text" role="doc">Double&lt;/api/data_types/double&gt;</code></td>
<td></td>
<td></td>
</tr>
<tr class="odd">
<td></td>
<td>r As <code class="interpreted-text" role="doc">Rect&lt;/api/graphics/rect&gt;</code></td>
<td></td>
<td></td>
</tr>
<tr class="even">
<td><code class="interpreted-text" role="ref">DrawPath&lt;graphics.drawpath&gt;</code></td>
<td>path As <code class="interpreted-text" role="doc">GraphicsPath&lt;/api/graphics/graphicspath&gt;</code>, autoClose As <code class="interpreted-text" role="doc">Boolean&lt;/api/data_types/boolean&gt;</code> = <code class="interpreted-text" role="doc">False&lt;/api/language/false&gt;</code></td>
<td></td>
<td></td>
</tr>
<tr class="odd">
<td><code class="interpreted-text" role="ref">DrawPicture&lt;graphics.drawpicture&gt;</code></td>
<td>image As <code class="interpreted-text" role="doc">Picture&lt;/api/graphics/picture&gt;</code>, x As <code class="interpreted-text" role="doc">Double&lt;/api/data_types/double&gt;</code>, y As <code class="interpreted-text" role="doc">Double&lt;/api/data_types/double&gt;</code>, destWidth As <code class="interpreted-text" role="doc">Double&lt;/api/data_types/double&gt;</code> = -10000.0, destHeight As <code class="interpreted-text" role="doc">Double&lt;/api/data_types/double&gt;</code> = -10000.0, sourceX As <code class="interpreted-text" role="doc">Double&lt;/api/data_types/double&gt;</code> = 0.0, sourceY As <code class="interpreted-text" role="doc">Double&lt;/api/data_types/double&gt;</code> = 0.0, sourceWidth As <code class="interpreted-text" role="doc">Double&lt;/api/data_types/double&gt;</code> = -10000.0, sourceHeight As <code class="interpreted-text" role="doc">Double&lt;/api/data_types/double&gt;</code> = -10000.0</td>
<td></td>
<td></td>
</tr>
<tr class="even">
<td><code class="interpreted-text" role="ref">DrawRectangle&lt;graphics.drawrectangle&gt;</code></td>
<td>x As <code class="interpreted-text" role="doc">Double&lt;/api/data_types/double&gt;</code>, y As <code class="interpreted-text" role="doc">Double&lt;/api/data_types/double&gt;</code>, width As <code class="interpreted-text" role="doc">Double&lt;/api/data_types/double&gt;</code>, height As <code class="interpreted-text" role="doc">Double&lt;/api/data_types/double&gt;</code></td>
<td></td>
<td></td>
</tr>
<tr class="odd">
<td></td>
<td>r As <code class="interpreted-text" role="doc">Rect&lt;/api/graphics/rect&gt;</code></td>
<td></td>
<td></td>
</tr>
<tr class="even">
<td><code class="interpreted-text" role="ref">DrawRoundRectangle&lt;graphics.drawroundrectangle&gt;</code></td>
<td>x As <code class="interpreted-text" role="doc">Double&lt;/api/data_types/double&gt;</code>, y As <code class="interpreted-text" role="doc">Double&lt;/api/data_types/double&gt;</code>, width As <code class="interpreted-text" role="doc">Double&lt;/api/data_types/double&gt;</code>, height As <code class="interpreted-text" role="doc">Double&lt;/api/data_types/double&gt;</code>, cornerWidth As <code class="interpreted-text" role="doc">Double&lt;/api/data_types/double&gt;</code>, cornerHeight As <code class="interpreted-text" role="doc">Double&lt;/api/data_types/double&gt;</code></td>
<td></td>
<td></td>
</tr>
<tr class="odd">
<td></td>
<td>r As <code class="interpreted-text" role="doc">Rect&lt;/api/graphics/rect&gt;</code>, cornerWidth As <code class="interpreted-text" role="doc">Double&lt;/api/data_types/double&gt;</code>, cornerHeight As <code class="interpreted-text" role="doc">Double&lt;/api/data_types/double&gt;</code></td>
<td></td>
<td></td>
</tr>
<tr class="even">
<td><code class="interpreted-text" role="ref">DrawStopIcon&lt;graphics.drawstopicon&gt;</code></td>
<td>x As <code class="interpreted-text" role="doc">Double&lt;/api/data_types/double&gt;</code>, y As <code class="interpreted-text" role="doc">Double&lt;/api/data_types/double&gt;</code></td>
<td></td>
<td></td>
</tr>
<tr class="odd">
<td><code class="interpreted-text" role="ref">DrawText&lt;graphics.drawtext&gt;</code></td>
<td>str As <code class="interpreted-text" role="doc">String&lt;/api/data_types/string&gt;</code>, x As <code class="interpreted-text" role="doc">Double&lt;/api/data_types/double&gt;</code>, y As <code class="interpreted-text" role="doc">Double&lt;/api/data_types/double&gt;</code>, width As <code class="interpreted-text" role="doc">Double&lt;/api/data_types/double&gt;</code> = 0.0, condense As <code class="interpreted-text" role="doc">Boolean&lt;/api/data_types/boolean&gt;</code> = <code class="interpreted-text" role="doc">False&lt;/api/language/false&gt;</code></td>
<td></td>
<td></td>
</tr>
<tr class="even">
<td><code class="interpreted-text" role="ref">DrawTextBlock&lt;graphics.drawtextblock&gt;</code></td>
<td>value As <code class="interpreted-text" role="doc">String&lt;/api/data_types/string&gt;</code>, x As <code class="interpreted-text" role="doc">Double&lt;/api/data_types/double&gt;</code>, y As <code class="interpreted-text" role="doc">Double&lt;/api/data_types/double&gt;</code>, maxWidth As <code class="interpreted-text" role="doc">Double&lt;/api/data_types/double&gt;</code> = -1.0, maxHeight As <code class="interpreted-text" role="doc">Double&lt;/api/data_types/double&gt;</code> = -1.0, alignment As <code class="interpreted-text" role="ref">MobileTextControl.Alignments&lt;mobiletextcontrol.alignments&gt;</code> = <code class="interpreted-text" role="ref">MobileTextControl.Alignments.Left&lt;mobiletextcontrol.alignments&gt;</code>, truncateLastLine As <code class="interpreted-text" role="doc">Boolean&lt;/api/data_types/boolean&gt;</code> = <code class="interpreted-text" role="doc">False&lt;/api/language/false&gt;</code></td>
<td></td>
<td></td>
</tr>
<tr class="odd">
<td><code class="interpreted-text" role="ref">FillOval&lt;graphics.filloval&gt;</code></td>
<td>x As <code class="interpreted-text" role="doc">Double&lt;/api/data_types/double&gt;</code>, y As <code class="interpreted-text" role="doc">Double&lt;/api/data_types/double&gt;</code>, width As <code class="interpreted-text" role="doc">Double&lt;/api/data_types/double&gt;</code>, height As <code class="interpreted-text" role="doc">Double&lt;/api/data_types/double&gt;</code></td>
<td></td>
<td></td>
</tr>
<tr class="even">
<td></td>
<td>r As <code class="interpreted-text" role="doc">Rect&lt;/api/graphics/rect&gt;</code></td>
<td></td>
<td></td>
</tr>
<tr class="odd">
<td><code class="interpreted-text" role="ref">FillPath&lt;graphics.fillpath&gt;</code></td>
<td>path As <code class="interpreted-text" role="doc">GraphicsPath&lt;/api/graphics/graphicspath&gt;</code>, autoClose As <code class="interpreted-text" role="doc">Boolean&lt;/api/data_types/boolean&gt;</code> = <code class="interpreted-text" role="doc">False&lt;/api/language/false&gt;</code></td>
<td></td>
<td></td>
</tr>
<tr class="even">
<td><code class="interpreted-text" role="ref">FillRectangle&lt;graphics.fillrectangle&gt;</code></td>
<td>x As <code class="interpreted-text" role="doc">Double&lt;/api/data_types/double&gt;</code>, y As <code class="interpreted-text" role="doc">Double&lt;/api/data_types/double&gt;</code>, width As <code class="interpreted-text" role="doc">Double&lt;/api/data_types/double&gt;</code>, height As <code class="interpreted-text" role="doc">Double&lt;/api/data_types/double&gt;</code></td>
<td></td>
<td></td>
</tr>
<tr class="odd">
<td></td>
<td>r As <code class="interpreted-text" role="doc">Rect&lt;/api/graphics/rect&gt;</code></td>
<td></td>
<td></td>
</tr>
<tr class="even">
<td><code class="interpreted-text" role="ref">FillRoundRectangle&lt;graphics.fillroundrectangle&gt;</code></td>
<td>x As <code class="interpreted-text" role="doc">Double&lt;/api/data_types/double&gt;</code>, y As <code class="interpreted-text" role="doc">Double&lt;/api/data_types/double&gt;</code>, width As <code class="interpreted-text" role="doc">Double&lt;/api/data_types/double&gt;</code>, height As <code class="interpreted-text" role="doc">Double&lt;/api/data_types/double&gt;</code>, cornerWidth As <code class="interpreted-text" role="doc">Double&lt;/api/data_types/double&gt;</code>, cornerHeight As <code class="interpreted-text" role="doc">Double&lt;/api/data_types/double&gt;</code></td>
<td></td>
<td></td>
</tr>
<tr class="odd">
<td></td>
<td>r As <code class="interpreted-text" role="doc">Rect&lt;/api/graphics/rect&gt;</code>, cornerWidth As <code class="interpreted-text" role="doc">Double&lt;/api/data_types/double&gt;</code>, cornerHeight As <code class="interpreted-text" role="doc">Double&lt;/api/data_types/double&gt;</code></td>
<td></td>
<td></td>
</tr>
<tr class="even">
<td><code class="interpreted-text" role="ref">Handle&lt;graphics.handle&gt;</code></td>
<td>type As <code class="interpreted-text" role="ref">HandleTypes&lt;graphics.handletypes&gt;</code></td>
<td><code class="interpreted-text" role="doc">Ptr&lt;/api/data_types/additional_types/ptr&gt;</code></td>
<td></td>
</tr>
<tr class="odd">
<td><code class="interpreted-text" role="ref">LineDash&lt;graphics.linedash&gt;</code></td>
<td><code class="interpreted-text" role="doc">Assigns&lt;/api/language/assigns&gt;</code> values() As <code class="interpreted-text" role="doc">Double&lt;/api/data_types/double&gt;</code></td>
<td></td>
<td></td>
</tr>
<tr class="even">
<td></td>
<td></td>
<td><code class="interpreted-text" role="doc">Double()&lt;/api/data_types/double&gt;</code></td>
<td></td>
</tr>
<tr class="odd">
<td><code class="interpreted-text" role="ref">NextPage&lt;graphics.nextpage&gt;</code></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="even">
<td><code class="interpreted-text" role="ref">RestoreState&lt;graphics.restorestate&gt;</code></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="odd">
<td><code class="interpreted-text" role="ref">Rotate&lt;graphics.rotate&gt;</code></td>
<td>angle As <code class="interpreted-text" role="doc">Double&lt;/api/data_types/double&gt;</code></td>
<td></td>
<td></td>
</tr>
<tr class="even">
<td></td>
<td>angle As <code class="interpreted-text" role="doc">Double&lt;/api/data_types/double&gt;</code>, x As <code class="interpreted-text" role="doc">Double&lt;/api/data_types/double&gt;</code>, y As <code class="interpreted-text" role="doc">Double&lt;/api/data_types/double&gt;</code></td>
<td></td>
<td></td>
</tr>
<tr class="odd">
<td><code class="interpreted-text" role="ref">SaveState&lt;graphics.savestate&gt;</code></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="even">
<td><code class="interpreted-text" role="ref">Scale&lt;graphics.scale&gt;</code></td>
<td>x As <code class="interpreted-text" role="doc">Double&lt;/api/data_types/double&gt;</code>, y As <code class="interpreted-text" role="doc">Double&lt;/api/data_types/double&gt;</code></td>
<td></td>
<td></td>
</tr>
<tr class="odd">
<td><code class="interpreted-text" role="ref">TextBlockSize&lt;graphics.textblocksize&gt;</code></td>
<td>value As <code class="interpreted-text" role="doc">String&lt;/api/data_types/string&gt;</code>, maxWidth As <code class="interpreted-text" role="doc">Double&lt;/api/data_types/double&gt;</code> = -1.0, maxHeight As <code class="interpreted-text" role="doc">Double&lt;/api/data_types/double&gt;</code> = -1.0, alignment As <code class="interpreted-text" role="ref">MobileTextControl.Alignments&lt;mobiletextcontrol.alignments&gt;</code> = <code class="interpreted-text" role="ref">MobileTextControl.Alignments.Left&lt;mobiletextcontrol.alignments&gt;</code>, truncateLastLine As <code class="interpreted-text" role="doc">Boolean&lt;/api/data_types/boolean&gt;</code> = <code class="interpreted-text" role="doc">False&lt;/api/language/false&gt;</code></td>
<td><code class="interpreted-text" role="doc">Size&lt;/api/graphics/size&gt;</code></td>
<td></td>
</tr>
<tr class="even">
<td><code class="interpreted-text" role="ref">TextDirection&lt;graphics.textdirection&gt;</code></td>
<td>value As <code class="interpreted-text" role="doc">String&lt;/api/data_types/string&gt;</code></td>
<td><code class="interpreted-text" role="ref">TextDirections&lt;graphics.textdirections&gt;</code></td>
<td></td>
</tr>
<tr class="odd">
<td><code class="interpreted-text" role="ref">TextHeight&lt;graphics.textheight&gt;</code></td>
<td></td>
<td><code class="interpreted-text" role="doc">Double&lt;/api/data_types/double&gt;</code></td>
<td></td>
</tr>
<tr class="even">
<td><blockquote>
<p>""</p>
</blockquote></td>
<td>text As <code class="interpreted-text" role="doc">String&lt;/api/data_types/string&gt;</code>, wrapWidth As <code class="interpreted-text" role="doc">Double&lt;/api/data_types/double&gt;</code></td>
<td><code class="interpreted-text" role="doc">Double&lt;/api/data_types/double&gt;</code></td>
<td></td>
</tr>
<tr class="odd">
<td><code class="interpreted-text" role="ref">TextWidth&lt;graphics.textwidth&gt;</code></td>
<td>text As <code class="interpreted-text" role="doc">String&lt;/api/data_types/string&gt;</code></td>
<td><code class="interpreted-text" role="doc">Double&lt;/api/data_types/double&gt;</code></td>
<td></td>
</tr>
<tr class="even">
<td><code class="interpreted-text" role="ref">Translate&lt;graphics.translate&gt;</code></td>
<td>x As <code class="interpreted-text" role="doc">Double&lt;/api/data_types/double&gt;</code>, y As <code class="interpreted-text" role="doc">Double&lt;/api/data_types/double&gt;</code></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>

## Enumerations

<div id="graphics.antialiasmodes">

<div class="rst-class">

forsearch

</div>

</div>

Graphics.AntiAliasModes

### AntiAliasModes

> Specifies the quality of antialiasing when drawing pictures.
>
> | Enum           |
> |----------------|
> | LowQuality     |
> | DefaultQuality |
> | HighQuality    |

<div id="graphics.handletypes">

<div class="rst-class">

forsearch

</div>

</div>

Graphics.HandleTypes

### HandleTypes

> Specifies the type of OS handle you wish to receive for use with the Handle property.
>
> | Enum                 | Description                                                  |
> |----------------------|--------------------------------------------------------------|
> | CairoContext         | Gets a handle to the Cairo Context on Linux.                 |
> | CGContextRef         | Gets the CGContextRef on macOS.                              |
> | HDC                  | Gets the HDC on Windows.                                     |
> | Direct2DRenderTarget | Gets the Direct2D render target on Windows.                  |
> | AndroidCanvas        | Provides access to the underlying drawing Canvas.            |
> | AndroidPaint         | Provides access to the underlying drawing style information. |

<div id="graphics.linecaptypes">

<div class="rst-class">

forsearch

</div>

</div>

Graphics.LineCapTypes

### LineCapTypes

> Specifies the various ways the end of a line is drawn.
>
> | Enum   | Description                                                                  |
> |--------|------------------------------------------------------------------------------|
> | Butt   | A squared-off ending that ends at the line boundary.                         |
> | Round  | A rounded ending that extends beyond the line boundary. This is the default. |
> | Square | A squared-off ending that extends beyond the line boundary.                  |

<div id="graphics.linejointypes">

<div class="rst-class">

forsearch

</div>

</div>

Graphics.LineJoinTypes

### LineJoinTypes

> Specifies the various ways lines can be joined.
>
> | Types |
> |-------|
> | Bevel |
> | Miter |
> | Round |

<div id="graphics.textdirections">

<div class="rst-class">

forsearch

</div>

</div>

Graphics.TextDirections

### TextDirections

> Specifies in which direction text will be rendered.
>
> | Enum        | Description                                                        |
> |-------------|--------------------------------------------------------------------|
> | Unknown     | The direction in which text will be drawn could not be determined. |
> | LeftToRight | The text is drawn from left to right.                              |
> | RightToLeft | The text is drawn from right to left.                              |

## Property descriptions

<div id="graphics.antialiased">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

Graphics.AntiAliased

**AntiAliased** As `Boolean</api/data_types/boolean>`

> Used to draw smooth lines and shapes, including text where applicable. This property is `True</api/language/true>` by default.
>
> The following example is in the Paint event of the main window.
>
> ``` xojo
> g.AntiAliased = True
> ```

<div id="graphics.antialiasmode">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

Graphics.AntiAliasMode

**AntiAliasMode** As `Graphics.AntiAliasModes<graphics.antialiasmodes>`

> Controls the level of interpolation/quality when drawing scaled Pictures. Valid modes are from the <span class="title-ref">Graphics</span>.AntiAliasModes enumeration: LowQuality, DefaultQuality, and HighQuality. The default is DefaultQuality.
>
> <div class="important">
>
> <div class="title">
>
> Important
>
> </div>
>
> This property is not supported for iOS and Android.
>
> </div>
>
> Use High Quality (set in `Paint<desktopcanvas.paint>` event of a DesktopCanvas):
>
> ``` xojo
> g.AntiAliasMode = Graphics.AntiAliasModes.HighQuality
> ```

<div id="graphics.bold">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

Graphics.Bold

**Bold** As `Boolean</api/data_types/boolean>`

> If `True</api/language/true>`, text will appear in bold when using `DrawText<graphics.drawtext>`.
>
> Mac apps can only display font styles that are available. You cannot force a font to display in bold or italic if it does not have bold or italic variations available. In this situation, the Bold property will not affect the font.
>
> <div class="important">
>
> <div class="title">
>
> Important
>
> </div>
>
> This property is not supported for iOS.
>
> </div>

<div id="graphics.brush">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

Graphics.Brush

**Brush** As `GraphicsBrush</api/graphics/graphicsbrush>`

> The brush to be used when drawing.
>
> <div class="important">
>
> <div class="title">
>
> Important
>
> </div>
>
> This property is not supported for console projects.
>
> </div>
>
> This code in the `Paint<desktopcanvas.paint>` event, draws an oval with a linear gradient:
>
> ``` xojo
> Var linearBrush As New LinearGradientBrush
> linearBrush.StartPoint = New Point(0, 0)
> linearBrush.EndPoint = New Point(g.Width, g.Height)
> linearBrush.GradientStops.Add(New Pair(0, Color.Red))
> linearBrush.GradientStops.Add(New Pair(0.4, Color.Yellow))
> linearBrush.GradientStops.Add(New Pair(0.7, Color.Magenta))
> linearBrush.GradientStops.Add(New Pair(1.0, Color.Blue))
>
> g.Brush = linearBrush
> g.FillOval(0, 0, g.Width, g.Height)
> ```

<div id="graphics.characterspacing">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

Graphics.CharacterSpacing

**CharacterSpacing** As `Integer</api/data_types/integer>`

> This property is expressed as a percentage of spacing between characters. Positive and negative values are accepted.

<div id="graphics.copies">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

Graphics.Copies

**Copies** As `Integer</api/data_types/integer>`

> The value in the Copies field of the Print dialog box.
>
> This property is read-only.
>
> <div class="important">
>
> <div class="title">
>
> Important
>
> </div>
>
> This property is only supported for desktop projects.
>
> </div>
>
> This property is only meaningful when the <span class="title-ref">Graphics</span> object was created by the `ShowPrinterDialog<printersetup.showprinterdialog>` function.
>
> On macOS this always return 1 as macOS takes care of respecting the number of copies the user requested and the app only needs to provide a single copy.

<div id="graphics.drawingcolor">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

Graphics.DrawingColor

**DrawingColor** As `Color</api/data_types/color>`

> The currently selected color for the <span class="title-ref">Graphics</span> object. This color is used by the various drawing methods.
>
> This example draws a diagonal line in the current DrawingColor.
>
> ``` xojo
> g.DrawingColor = &cff0000
> g.DrawLine(10, 10, 100, 100)
> ```

<div id="graphics.firstpage">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

Graphics.FirstPage

**FirstPage** As `Integer</api/data_types/integer>`

> The value in the From field of the Print dialog box.
>
> This property is read-only.
>
> <div class="important">
>
> <div class="title">
>
> Important
>
> </div>
>
> This property is only supported for desktop projects.
>
> </div>
>
> This property is meaningful only when the <span class="title-ref">Graphics</span> object was created by the `ShowPrinterDialog<printersetup.showprinterdialog>` function.

<div id="graphics.font">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

Graphics.Font

**Font** As `Font</api/graphics/font>`

> The font used for displaying text.
>
> This in the `Paint<mobilecanvas.paint>` event of a MobileCanvas draws text using a specific font:
>
> ``` xojo
> g.Font = Font.BoldSystemFont
> g.DrawText("Hello", 5, 20)
> ```
>
> <div class="important">
>
> <div class="title">
>
> Important
>
> </div>
>
> This property is only available for Mobile projects. To assign a font in other project types, use the `FontName<graphics.fontname>` property.
>
> </div>

<div id="graphics.fontascent">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

Graphics.FontAscent

**FontAscent** As `Double</api/data_types/double>`

> Returns the ascent of a line of text drawn with the current font.
>
> This property is read-only.
>
> FontAscent is the height of the tallest font letter above the font baseline.
>
> <div class="important">
>
> <div class="title">
>
> Important
>
> </div>
>
> This property is not supported for iOS and Android. Use `Font.Ascent<font.ascent>` instead.
>
> </div>
>
> The following example gets the font ascent of the text that was drawn with `DrawText<graphics.drawtext>`.
>
> ``` xojo
> g.DrawingColor = &cff0000
> g.Italic = True
> g.DrawText("Hello world", 10, 10)
> MessageBox(g.FontAscent.ToString)
> ```

<div id="graphics.fontname">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

Graphics.FontName

**FontName** As `String</api/data_types/string>`

> Name of the font used to display the caption or text content.
>
> When used with `PDFDocument</api/pdf/pdfdocument>`, you can assign font names using the `StandardFontNames<pdfdocument.standardfontnames>` enumeration.
>
> You can enter any font that is installed on the computer or the names of the two metafonts, "System" and "SmallSystem".
>
> The System font is the font used by the system software as its default font. Different operating systems use different default fonts. If the system software supports both a large and small System font, you can also specify the "SmallSystem" font as your FontName.
>
> On macOS, "SmallSystem" specifies the smaller system font and may make the control smaller in size as well. On Windows and Linux, "SmallSystem" is the same as "System".
>
> <div class="important">
>
> <div class="title">
>
> Important
>
> </div>
>
> This property is not supported for iOS and Android. Use `Font<graphics.font>` instead.
>
> </div>
>
> This code sets the FontName property.
>
> ``` xojo
> g.FontName = "Helvetica"
> ```

<div id="graphics.fontsize">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

Graphics.FontSize

**FontSize** As `Single</api/data_types/single>`

> Point size of the font used to display a caption or text content.
>
> If you enter zero as the FontSize, your app will use the font size that works best for the platform on which it is running.
>
> <div class="important">
>
> <div class="title">
>
> Important
>
> </div>
>
> This property is not supported for iOS and Android. `Font.Size<font.size>`.
>
> </div>
>
> This code sets the font size to 16 points.
>
> ``` xojo
> g.FontSize = 16
> ```

<div id="graphics.fontunit">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

Graphics.FontUnit

**FontUnit** As `FontUnits</api/graphics/fontunits>`

> The units in which FontSize is measured.
>
> The FontUnits enumeration values are shown below:
>
> | Value      |
> |------------|
> | Default    |
> | Pixel      |
> | Point      |
> | Inch       |
> | Millimeter |
>
> <div class="important">
>
> <div class="title">
>
> Important
>
> </div>
>
> This property is only supported for desktop projects.
>
> </div>
>
> This example sets the units to points using the class constant.
>
> ``` xojo
> g.DrawingColor = &cff0000
> g.Italic = True
> g.FontUnit = FontUnits.Point
> g.FontSize = 16
> g.DrawText("Hello world", 10, 10)
> ```

<div id="graphics.height">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

Graphics.Height

**Height** As `Double</api/data_types/double>`

> The height in "points" of the parent object, typically a `Canvas</api/user_interface/desktop/desktopcanvas>` control or a `Window</api/user_interface/desktop/desktopwindow>`. Points are pixels divided by the scale factor. For example:
>
> ``` xojo
> System.DebugLog("ScaleX is " + g.ScaleX.ToString)
> System.DebugLog("Width is " + g.Width.ToString)
> g.ScaleX = 9.72000709560518
> System.DebugLog("Changed ScaleX to " + g.ScaleX.ToString)
> System.DebugLog("Width is now " + g.Width.ToString)
> ```
>
> This property is read-only.
>
> For example, if the <span class="title-ref">Graphics</span> class object is in a `DesktopCanvas</api/user_interface/desktop/desktopcanvas>` control, Height returns the height of the control.
>
> This example in the DesktopCanvas `Paint<desktopcanvas.paint>` event draws a box the height of the DesktopCanvas itself:
>
> ``` xojo
> g.DrawingColor = &c0000ff
> g.FillRectangle(0, 0, g.Width, g.Height)
> ```

<div id="graphics.italic">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

Graphics.Italic

**Italic** As `Boolean</api/data_types/boolean>`

> If `True</api/language/true>`, text will appear in italic when using `DrawText<graphics.drawtext>`.
>
> <div class="important">
>
> <div class="title">
>
> Important
>
> </div>
>
> This property is not supported for iOS.
>
> </div>
>
> This example draws "Hello world" in red italic inside a `DesktopCanvas</api/user_interface/desktop/desktopcanvas>`.
>
> ``` xojo
> g.DrawingColor = Color.Red
> g.Italic = True
> g.DrawText("Hello world", 10, 10)
> ```

<div id="graphics.lastpage">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

Graphics.LastPage

**LastPage** As `Integer</api/data_types/integer>`

> The value in the "To" field of the Print dialog box.
>
> This property is read-only.
>
> <div class="important">
>
> <div class="title">
>
> Important
>
> </div>
>
> This property is only supported for desktop projects.
>
> </div>
>
> This property is meaningful only when the <span class="title-ref">Graphics</span> object was created by the `ShowPrinterDialog<printersetup.showprinterdialog>` function.

<div id="graphics.linecap">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

Graphics.LineCap

**LineCap** As `LineCapTypes<graphics.linecaptypes>`

> The way in which the end of the line will be drawn.
>
> Affects only lines drawn when using `DrawPath<graphics.drawpath>`, `GraphicsPath</api/graphics/graphicspath>` and `Object2D</api/graphics/object2d>`.
>
> In the `Paint<desktopcanvas.paint>` event of a `DesktopCanvas</api/user_interface/desktop/desktopcanvas>`, set the line cap to round:
>
> ``` xojo
> g.LineCap = Graphics.LineCapTypes.Round
> ```

<div id="graphics.linedashoffset">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

Graphics.LineDashOffset

**LineDashOffset** As `Double</api/data_types/double>`

> Specifies the starting point of the dash.
>
> An offset of 0.5 would mean the first dash would start at half size.
>
> <div class="important">
>
> <div class="title">
>
> Important
>
> </div>
>
> This property is not currently supported for Console.
>
> </div>
>
> Draws a line with 2 unit dashes and 2 unit gaps with the first dash offset by 1.
>
> ``` xojo
> g.LineDash = Array(2.0, 3.0)
> g.LineDashOffset = 1.0
> g.DrawLine(0, 0, g.Width, g.Height)
> ```

<div id="graphics.linejoin">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

Graphics.LineJoin

**LineJoin** As `LineJoinTypes<graphics.linejointypes>`

> The way in which the end of the line will be drawn when connecting to another line.
>
> Affects only lines drawn when using `DrawPath<graphics.drawpath>`, `GraphicsPath</api/graphics/graphicspath>` and `Object2D</api/graphics/object2d>`. It will also affect how corners are drawn when using `DrawRectangle<graphics.drawrectangle>`.
>
> In the `Paint<desktopcanvas.paint>` event of a `DesktopCanvas</api/user_interface/desktop/desktopcanvas>`, set the line join to round:
>
> ``` xojo
> g.LineJoin = Graphics.LineJoinTypes.Round
> ```

<div id="graphics.miterlimit">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

Graphics.MiterLimit

**MiterLimit** As `Double</api/data_types/double>`

> The maximum length of a miter which is the distance between the inner corner and the outer corner where two lines meet.

<div id="graphics.outline">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

Graphics.Outline

**Outline** As `Boolean</api/data_types/boolean>`

> If `True</api/language/true>`, text will appear outlined when using `DrawText<graphics.drawtext>`.
>
> macOS apps can only display font styles that are available. You cannot force a font to display in bold or italic if it does not have bold or italic variations available. In this situation, the bold property will not affect the font.
>
> <div class="note">
>
> <div class="title">
>
> Note
>
> </div>
>
> When using Outline on macOS and Windows, `Underline<graphics.underline>` is not supported. When using Outline on iOS, `Brush<graphics.brush>` is not supported. When using Outline on macOS Tahoe (26), brushes will not be applied when drawing the Outline.
>
> </div>
>
> This example sets the text to Outline.
>
> ``` xojo
> g.Outline = True
> g.DrawText("Hello world", 50, 50)
> ```

<div id="graphics.pensize">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

Graphics.PenSize

**PenSize** As `Double</api/data_types/double>`

> The size in points used when drawing lines, ovals and rectangles.
>
> This example sets the PenSize to 5 point:
>
> ``` xojo
> g.PenSize = 5
> g.DrawRectangle(150, 10, 100, 100)
> ```

<div id="graphics.printingcancelled">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

Graphics.PrintingCancelled

**PrintingCancelled** As `Boolean</api/data_types/boolean>`

> If `True</api/language/true>`, the current print job has been cancelled. When used on a non-print <span class="title-ref">Graphics</span> object, it will always return `False</api/language/false>`.
>
> This property is read-only.
>
> <div class="important">
>
> <div class="title">
>
> Important
>
> </div>
>
> This property is only supported for desktop projects.
>
> </div>

<div id="graphics.scalex">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

Graphics.ScaleX

**ScaleX** As `Double</api/data_types/double>`

> The scale factor used when converting user space coordinates to backing store coordinates. These can be modified at runtime and must be greater than zero.
>
> When the <span class="title-ref">Graphics</span> object starts out, the scale is set to the the current transform used to convert user space coordinates to backing store coordinates. For example, the <span class="title-ref">Graphics</span> object on a DesktopCanvas passed to a paint event might have the ScaleX and ScaleY set to 2 when drawing to a retina screen.
>
> For a bitmap Picture, the ScaleX and ScaleY properties are always 1.
>
> The scale properties are not automatically updated if a control's backing store scale factor changes. They are, however, automatically updated when calling <span class="title-ref">Graphics</span>.NextPage in order to reset back to the state the printing system desires for that page.
>
> Altering these properties will alter the object's height and width. Specifying a higher scale value will result in a lower size and vice versa. When a new <span class="title-ref">Graphics</span> object is created as the result of calling Clip, the resulting object has the same scale factor as the original. Subsequent modifications to the scale on one object has no bearing on the other, however.

<div id="graphics.scaley">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

Graphics.ScaleY

**ScaleY** As `Double</api/data_types/double>`

> The scale factor used when converting user space coordinates to backing store coordinates. These can be modified at runtime and must be greater than zero.
>
> When the <span class="title-ref">Graphics</span> object starts out, the scale is set to the the current transform used to convert user space coordinates to backing store coordinates. For example, the <span class="title-ref">Graphics</span> object on a DesktopCanvas passed to a paint event might have the ScaleX and ScaleY set to 2 when drawing to a retina screen. For a bitmap Picture, the ScaleX and ScaleY properties are always 1.
>
> The scale properties are not automatically updated if a control's backing store scale factor changes. They are, however, automatically updated when calling <span class="title-ref">Graphics</span>.NextPage in order to reset back to the state the printing system desires for that page.
>
> Altering these properties will alter the object's height and width. Specifying a higher scale value will result in a lower size and vice versa. When a new <span class="title-ref">Graphics</span> object is created as the result of calling Clip, the resulting object has the same scale factor as the original. Subsequent modifications to the scale on one object has no bearing on the other, however.

<div id="graphics.shadowbrush">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

Graphics.ShadowBrush

**ShadowBrush** As `ShadowBrush</api/graphics/shadowbrush>`

> The brush to be used to draw a shadow on the object being drawn.
>
> <div class="important">
>
> <div class="title">
>
> Important
>
> </div>
>
> This property is not supported for console projects.
>
> </div>
>
> This code in the `Paint<desktopcanvas.paint>` event of a `DesktopCanvas</api/user_interface/desktop/desktopcanvas>` draws a rectangle with a shadow:
>
> ``` xojo
> g.ShadowBrush = New ShadowBrush
> g.DrawingColor = Color.Red
> g.FillRectangle(0, 0, 100, 100)
> ```
>
> <div class="important">
>
> <div class="title">
>
> Important
>
> </div>
>
> The `color</api/data_types/color>` value of <span class="title-ref">ShadowBrush</span> when used with `DrawPicture<graphics.drawpicture>` is not currently supported on Android.
>
> </div>

<div id="graphics.transparency">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

Graphics.Transparency

**Transparency** As `Double</api/data_types/double>`

> The amount of transparency that affects all drawing to the <span class="title-ref">Graphics</span> object done afterwards. The range is from 0.0 (opaque) to 100.0 (fully transparent). Transparency of the <span class="title-ref">Graphics</span> object can be used to obtain “fading” effects (amongst other uses) by setting the transparency to a value greater than 0.0.
>
> When rendering colors or pictures with alpha channel information, the Transparency property is composited with the alpha channel information. This allows you to perform uniform fading operations easily and efficiently.
>
> On Windows, using the Transparency property only works on `Picture.Graphics<picture.graphics>` if the Picture was created with a depth of 32, or is a Picture with an alpha channel. Attempting to use it on other forms of Pictures will result in an `UnsupportedOperationException</api/exceptions/unsupportedoperationexception>`.
>
> Create a picture with a blue rectangle drawn with 50% transparency:
>
> ``` xojo
> Var boxPic As New Picture(100, 100)
> boxPic.Graphics.DrawingColor = &c0000ff00
> boxPic.Graphics.Transparency = 50.0
> boxPic.Graphics.FillRectangle(0, 0, 100, 100)
> ```

<div id="graphics.underline">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

Graphics.Underline

**Underline** As `Boolean</api/data_types/boolean>`

> If `True</api/language/true>`, text will appear underlined when using `DrawText<graphics.drawtext>`.

<div id="graphics.width">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

Graphics.Width

**Width** As `Double</api/data_types/double>`

> The width in "points" of the parent object, typically a `Canvas</api/user_interface/desktop/desktopcanvas>` control or a `Window</api/user_interface/desktop/desktopwindow>`. Points are pixels divided by the scale factor. For example:
>
> ``` xojo
> System.DebugLog("ScaleX is " + g.ScaleX.ToString)
> System.DebugLog("Width is " + g.Width.ToString)
> g.ScaleX = 9.72000709560518
> System.DebugLog("Changed ScaleX to " + g.ScaleX.ToString)
> System.DebugLog("Width is now " + g.Width.ToString)
> ```
>
> This property is read-only.
>
> This example in the DesktopCanvas `Paint<desktopcanvas.paint>` event draws a box the width of the DesktopCanvas itself:
>
> ``` xojo
> g.DrawingColor = &c0000ff
> g.FillRectangle(0, 0, g.Width, g.Height)
> ```

## Method descriptions

<div id="graphics.clearrectangle">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

Graphics.ClearRectangle

**ClearRectangle**(x As `Double</api/data_types/double>`, y As `Double</api/data_types/double>`, width As `Double</api/data_types/double>`, height As `Double</api/data_types/double>`)

> Clears the rectangle described by the parameters passed by filling it with the background color of the parent window (on Windows/Linux) or by clearing the context so that the background comes through (on macOS).
>
> This code clears the entire drawing area:
>
> ``` xojo
> g.ClearRectangle(0, 0, g.Width, g.Height)
> ```

**ClearRectangle**(r As `Rect</api/graphics/rect>`)

> Clears the rectangle described by the `Rect</api/graphics/rect>` parameter *r* passed by filling it with the background color.
>
> This example clears the entire drawing area:
>
> ``` xojo
> Var r As New Rect(0, 0, g.Width, g.Height)
>
> g.ClearRectangle(r)
> ```

<div id="graphics.clip">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

Graphics.Clip

**Clip**(x As `Double</api/data_types/double>`, y As `Double</api/data_types/double>`, width As `Double</api/data_types/double>`, height As `Double</api/data_types/double>`) As <span class="title-ref">Graphics</span>

> Creates a new <span class="title-ref">Graphics</span> object in the parent <span class="title-ref">Graphics</span> object. It has the size and shape defined by the passed parameters.
>
> <span class="title-ref">Graphics</span> calls can only draw inside the passed bounds. After creating a clip, you can draw into it, as with any other <span class="title-ref">Graphics</span> object. However the drawing will be contained within the clipping, not the parent object. Use this to prevent objects from overlapping with other objects in the parent object. Whatever is drawn to the clipped region is confined to that region.
>
> Clip allows clipping beyond the bottom and right edges of the source. This ensures the resulting <span class="title-ref">Graphics</span> object will always be the dimensions requested.
>
> When you are drawing a complex image that involves many calls to <span class="title-ref">Graphics</span> methods, you may want to create non-overlapping regions within the area. You then draw into each "child" area, with the assurance that each drawing will not inadvertently overlap another object.
>
> <div class="important">
>
> <div class="title">
>
> Important
>
> </div>
>
> This method is not supported for iOS and Android.
>
> </div>
>
> You create a child region within the parent area with the Clip method. You pass it the top-left corner of the child region and its width and height. It returns a new <span class="title-ref">Graphics</span> object that is the specified region inside the parent area. You can then draw into the child area just as with any other <span class="title-ref">Graphics</span> object. The only difference is that the drawing will be confined to the child area. The coordinates of each call are with respect to the top-left corner of the child area. Here is an example of how this works. This code is in the `Paint<desktopcanvas.paint>` event of a `DesktopCanvas</api/user_interface/desktop/desktopcanvas>`. Two regions at the top of the `DesktopCanvas</api/user_interface/desktop/desktopcanvas>` are defined by calls to the Clip method. Subsequent calls to the `DrawRectangle<graphics.drawrectangle>` method show where the clippings are. Calls to the `DrawOval<graphics.drawoval>` method draw shapes within the clipped areas. Notice that the first call attempts to draw outside the area. If you were drawing from the parent <span class="title-ref">Graphics</span> object, the first oval would bump into the second.
>
> ``` xojo
> Var myClip As Graphics = g.Clip(0, 0, 150, 15) 
> Var myClip2 As Graphics = g.Clip(150, 0, 150, 15) 
>
> ' Draw the border of the Canvas in black
> g.DrawingColor = &c000000
> g.DrawRectangle(0, 0, g.Width, g.Height)
>
> ' Draw into the first area in red
> myClip.DrawingColor = &cff0000
> myClip.DrawRectangle(0, 0, myClip.Width, myClip.Height) ' draw the border of the area.
> myClip.DrawOval(0, 0, 200, 15) ' try to draw outside its clip.
>
> ' Draw into the second area in blue
> myClip2.DrawingColor = &c0000ff
> myClip2.DrawRectangle(0, 0, myClip2.Width, myClip2.Height) ' draw the border
> myClip2.DrawOval(0, 0, 150, 15)
> ```

**Clip**(r As `Rect</api/graphics/rect>`) As <span class="title-ref">Graphics</span>

> Creates a new <span class="title-ref">Graphics</span> object in the parent <span class="title-ref">Graphics</span> object. It has the size and shape defined by the passed `Rect</api/graphics/rect>` parameter *r*.
>
> <span class="title-ref">Graphics</span> calls can only draw inside the passed bounds. After creating a clip, you can draw into it, as with any other <span class="title-ref">Graphics</span> object. However the drawing will be contained within the clipping, not the parent object. Use this to prevent objects from overlapping with other objects in the parent object. Whatever is drawn to the clipped region is confined to that region.
>
> Clip allows clipping beyond the bottom and right edges of the source. This ensures the resulting <span class="title-ref">Graphics</span> object will always be the dimensions requested.
>
> When you are drawing a complex image that involves many calls to <span class="title-ref">Graphics</span> methods, you may want to create non-overlapping regions within the area. You then draw into each "child" area, with the assurance that each drawing will not inadvertently overlap another object.
>
> <div class="important">
>
> <div class="title">
>
> Important
>
> </div>
>
> This method is not supported for iOS and Android.
>
> </div>
>
> You create a child region within the parent area with the Clip method. You pass it the top-left corner of the child region and its width and height. It returns a new <span class="title-ref">Graphics</span> object that is the specified region inside the parent area. You can then draw into the child area just as with any other <span class="title-ref">Graphics</span> object. The only difference is that the drawing will be confined to the child area. The coordinates of each call are with respect to the top-left corner of the child area.
>
> ``` xojo
> Var r As New Rect(20, 20, 100, 100)
> Var myClip As Graphics = g.Clip(r)
>
> ' The oval is cut off on the right and bottom side as its width/height overlaps the bounds of the clip
> myClip.FillOval(0, 0, 150, 150)
> ```

<div id="graphics.cliptopath">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

Graphics.ClipToPath

**ClipToPath**(path As `GraphicsPath</api/graphics/graphicspath>`)

> Clips the drawing to the specified GraphicsPath.
>
> If you need to clear a Clip after it has been used, call `SaveState<graphics.savestate>` before calling ClipToPath and then call `RestoreState<graphics.restorestate>` when you no longer want the clipping in effect.
>
> <div class="important">
>
> <div class="title">
>
> Important
>
> </div>
>
> This method is not supported for console or web projects.
>
> </div>
>
> From within an `MobileCanvas.Paint<mobilecanvas.paint>` event handler:
>
> ``` xojo
> ' Clip to a GraphicsPath
> ' Path is a triangle
> Var p As New GraphicsPath
>
> p.MoveToPoint(0, 0) ' Start location
> p.AddLineToPoint(20, 44)
> p.AddLineToPoint(40, 0)
> p.AddLineToPoint(0, 0)
>
> g.SaveState
> g.ClipToPath(p)
> g.FillOval(0, 0, 50, 50)
> g.RestoreState
> ```

<div id="graphics.cliptorectangle">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

Graphics.ClipToRectangle

**ClipToRectangle**(x As `Double</api/data_types/double>`, y As `Double</api/data_types/double>`, width As `Double</api/data_types/double>`, height As `Double</api/data_types/double>`)

> Clips the drawing to the specified rectangle.
>
> If you need to clear a Clip after it has been used, call `SaveState<graphics.savestate>` before calling ClipToRectangle and then call `RestoreState<graphics.restorestate>` when you no longer want the clipping in effect.
>
> From within an `MobileCanvas.Paint<mobilecanvas.paint>` event handler:
>
> ``` xojo
> ' The part of the circle drawn outside the clip area
> ' is not displayed.
> g.SaveState
> g.ClipToRectangle(0, 0, 50, 50)
>
> g.DrawingColor = Color.Blue
> g.FillOval(25, 25, 50, 50)
> g.RestoreState ' removes the clipping rectangle
> ```

**ClipToRectangle**(r As `Rect</api/graphics/rect>`)

> Clips the drawing to the specified rectangle.
>
> If you need to clear a Clip after it has been used, call `SaveState<graphics.savestate>` before calling ClipToRectangle and then call `RestoreState<graphics.restorestate>` when you no longer want the clipping in effect.
>
> From within an `MobileCanvas.Paint<mobilecanvas.paint>` event handler:
>
> ``` xojo
> Var r As New Rect(0, 0, 50, 50)
>
> ' The part of the circle drawn outside the clip area
> ' is not displayed.
> g.SaveState
> g.ClipToRectangle(r)
>
> g.DrawingColor = Color.Blue
> g.FillOval(25, 25, 50, 50)
> g.RestoreState ' removes the clipping rectangle
> ```

<div id="graphics.drawcautionicon">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

Graphics.DrawCautionIcon

**DrawCautionIcon**(x As `Double</api/data_types/double>`, y As `Double</api/data_types/double>`)

> Draws the operating system's Caution icon at the coordinates specified.
>
> <div class="important">
>
> <div class="title">
>
> Important
>
> </div>
>
> This method is only supported for desktop projects.
>
> </div>
>
> This code draws the Caution icon at the passed coordinates. The code is in the Paint event.
>
> ``` xojo
> g.DrawCautionIcon(170.0, 120.0)
> ```

<div id="graphics.drawline">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

Graphics.DrawLine

**DrawLine**(x1 As `Double</api/data_types/double>`, y1 As `Double</api/data_types/double>`, x2 As `Double</api/data_types/double>`, y2 As `Double</api/data_types/double>`)

> Draws a line from *x1*, *y1* to *x2*, *y2* in the current color. The current color is set with the `DrawingColor<graphics.drawingcolor>` property.

<div id="graphics.drawnoteicon">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

Graphics.DrawNoteIcon

**DrawNoteIcon**(x As `Double</api/data_types/double>`, y As `Double</api/data_types/double>`)

> Draws the operating system's Note icon at the coordinates specified. *x* and *y* are the coordinates of the top-left corner.
>
> <div class="important">
>
> <div class="title">
>
> Important
>
> </div>
>
> This method is only supported for desktop projects.
>
> </div>
>
> This code draws the Note icon at the passed coordinates. The code is in the `DesktopCanvas.Paint<desktopcanvas.paint>` event.
>
> ``` xojo
> g.DrawNoteIcon(170.0, 120.0)
> ```

<div id="graphics.drawobject">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

Graphics.DrawObject

**DrawObject**(object2D As `Object2D</api/graphics/object2d>`, deltaX As `Double</api/data_types/double>` = 0.0, deltaY As `Double</api/data_types/double>` = 0.0)

> Draws the passed `Object2D</api/graphics/object2d>` object into the <span class="title-ref">Graphics</span> object. The optional parameters *deltaX* and *deltaY* are offsets from the top-left corner of the <span class="title-ref">Graphics</span> object to the top-left corner of the *object2D*.
>
> <div class="important">
>
> <div class="title">
>
> Important
>
> </div>
>
> This method is not supported for iOS and Android.
>
> </div>
>
> If *object2D* is an `OvalShape</api/graphics/ovalshape>`, then the offsets are from the top-left corner of the <span class="title-ref">Graphics</span> object to the center of the `OvalShape</api/graphics/ovalshape>`.
>
> The following method is in the `Paint<desktopwindow.paint>` event of a `DesktopWindow</api/user_interface/desktop/desktopwindow>`. It draws a simple curve. The negative value of ControlY(0) places the control point above the imaginary straight line from x, y to x2, y2.
>
> ``` xojo
> Var c As New CurveShape
>
> c.ControlX(0) = 120
> c.ControlY(0) = -40
> c.Order = 1
> c.X = 10
> c.Y = 100
> c.X2 = 250
> c.Y2 = 100
>
> g.DrawObject(c, c.X, c.Y)
> ```

<div id="graphics.drawoval">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

Graphics.DrawOval

**DrawOval**(x As `Double</api/data_types/double>`, y As `Double</api/data_types/double>`, width As `Double</api/data_types/double>`, height As `Double</api/data_types/double>`)

> Draws the outline of an oval in the current color. The current color is set with the `DrawingColor<graphics.drawingcolor>` property.
>
> *x* and *y* are the coordinates of the top-left corner. *width* and *height* specify the size of the oval.
>
> The following example sets the PenSize and draws an oval. The code is in the Paint event of a `DesktopCanvas</api/user_interface/desktop/desktopcanvas>`.
>
> ``` xojo
> g.PenSize = 5 
> g.DrawOval(10, 10, 100, 60)
> ```

**DrawOval**(r As `Rect</api/graphics/rect>`)

> Draws the outline of an oval in the current color at the `Rect</api/graphics/rect>` *r* passed. The current color is set with the `DrawingColor<graphics.drawingcolor>` property.
>
> The following example sets the PenSize and draws an oval. The code is in the Paint event of a `DesktopCanvas</api/user_interface/desktop/desktopcanvas>`.
>
> ``` xojo
> Var r As New Rect(10, 10, 100, 60)
>
> g.PenSize = 5 
> g.DrawOval(r)
> ```

<div id="graphics.drawpath">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

Graphics.DrawPath

**DrawPath**(path As `GraphicsPath</api/graphics/graphicspath>`, autoClose As `Boolean</api/data_types/boolean>` = `False</api/language/false>`)

> Draws a bezier line along the path designated.
>
> When *autoClose* is `True</api/language/true>`, the path will be automatically closed so that there are no gaps in it.
>
> <div class="important">
>
> <div class="title">
>
> Important
>
> </div>
>
> This method is not supported for console or web projects.
>
> </div>

<div id="graphics.drawpicture">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

Graphics.DrawPicture

**DrawPicture**(image As `Picture</api/graphics/picture>`, x As `Double</api/data_types/double>`, y As `Double</api/data_types/double>`, destWidth As `Double</api/data_types/double>` = -10000.0, destHeight As `Double</api/data_types/double>` = -10000.0, sourceX As `Double</api/data_types/double>` = 0.0, sourceY As `Double</api/data_types/double>` = 0.0, sourceWidth As `Double</api/data_types/double>` = -10000.0, sourceHeight As `Double</api/data_types/double>` = -10000.0)

> Draws the picture at the specified location. The picture can be shown at full size, cropped, or scaled. All units are pixels.
>
> *x* and *y* are the distances from the top-left corner of the control or window from which the 0, 0 point of the image will be drawn. The optional parameters are used to copy a portion of the picture (cropping) and for scaling the picture.
>
> If you are cropping, then *destWidth* and *destHeight* are also required. If you are doing scaling, then all of the optional parameters are required. You scale an image by making the destination width and height different from the source width and height.
>
> The parameters *sourceX*, *sourceY*, *sourceWidth*, and *sourceHeight* describe the portion of the image that will be scaled. *destWidth* and *destHeight* are used to change the scaling of the picture when *sourceWidth* and *sourceHeight* are provided. *sourceX* and *sourceY* default to 0 and are used to determine the upper-left coordinate you wish to copy from.
>
> <div class="note">
>
> <div class="title">
>
> Note
>
> </div>
>
> Negative values for *DestWidth*, *DestHeight*, *SourceWidth* and *SourceHeight* are not supported so the behavior is undefined.
>
> </div>
>
> The following example scales an image by 50%. The image, MyImage, has been added to the project. Its size is 600 x 915. Note that the destination width and height are half the original width and height. The code is in the Paint event of a `DesktopCanvas</api/user_interface/desktop/desktopcanvas>`. A call to DrawRectangle adds a black border around the `DesktopCanvas</api/user_interface/desktop/desktopcanvas>`.
>
> ``` xojo
> g.DrawingColor = &c000000
> g.DrawRectangle(0, 0, Me.Width, Me.Height)
>
> Var scale As Double = 0.50
> g.DrawPicture(MyImage, 0, 0, MyImage.Width * scale, MyImage.Height * scale, 0, 0, MyImage.Width, MyImage.Height)
> ```
>
> The following code crops the image. It copies only the top 150 pixels of the original image at full size:
>
> ``` xojo
> g.DrawPicture(MyImage, 0, 0, 600, 150)
> ```
>
> The following code crops and scales the image. The top half of the image is retained and the *destWidth* and *destHeight* parameters specify a 50% reduction.
>
> ``` xojo
> g.DrawPicture(MyImage, 0, 0, 300, 228, 0, 0, 600, 457)
> ```
>
> If you don't want to scale or crop the image, you can leave off the last six parameters. In this case, it will appear full-size.
>
> ``` xojo
> g.DrawPicture(MyImage, 0, 0)
> ```
>
> <div class="note">
>
> <div class="title">
>
> Note
>
> </div>
>
> On standard resolution (non-Retina/non-HiDPI) displays, using fractional values for *x* or *y* may cause blurring of high-contrast edges in the image. Unlike text and line rendering, image rendering does not snap to pixel boundaries, so fractional coordinates place the image between pixels. This can be a concern when implementing hi-DPI support in existing code that passes non-integer coordinates. To avoid blurring, use `Round</api/math/round>` to ensure whole-number coordinates:
>
> ``` xojo
> g.DrawPicture(myImage, Round(x), Round(y))
> ```
>
> </div>

<div id="graphics.drawrectangle">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

Graphics.DrawRectangle

**DrawRectangle**(x As `Double</api/data_types/double>`, y As `Double</api/data_types/double>`, width As `Double</api/data_types/double>`, height As `Double</api/data_types/double>`)

> Draws the outline of a rectangle in the current color. The current color is set with the DrawingColor property.
>
> X and Y are the coordinates of the top-left corner. *width* and *height* specify the size of the rectangle.
>
> This example draws two squares with a 5-point red border.
>
> ``` xojo
> g.DrawingColor = &cff0000
> g.PenSize = 5
> g.DrawRectangle(10, 10, 100, 100)
> g.DrawRectangle(130, 10, 100, 100)
> ```

**DrawRectangle**(r As `Rect</api/graphics/rect>`)

> Draws the outline of a rectangle in the current color at the `Rect</api/graphics/rect>` *r* passed. The current color is set with the DrawingColor property.
>
> This example draws two squares with a 5-point red border.
>
> ``` xojo
> Var r1 As New Rect(10, 10, 100, 100)
> Var r2 As New Rect(130, 10, 100, 100)
>
> g.DrawingColor = &cff0000
> g.PenSize = 5
> g.DrawRectangle(r1)
> g.DrawRectangle(r2)
> ```
>
> <div class="note">
>
> <div class="title">
>
> Note
>
> </div>
>
> On standard resolution (non-Retina/non-HiDPI) displays, using fractional values for *x*, *y*, *width*, or *height* may cause blurring of high-contrast edges. To avoid this, use `Ceiling</api/math/ceiling>` to ensure whole-number values:
>
> ``` xojo
> g.DrawRectangle(Ceiling(x), Ceiling(y), Ceiling(width), Ceiling(height))
> ```
>
> </div>

<div id="graphics.drawroundrectangle">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

Graphics.DrawRoundRectangle

**DrawRoundRectangle**(x As `Double</api/data_types/double>`, y As `Double</api/data_types/double>`, width As `Double</api/data_types/double>`, height As `Double</api/data_types/double>`, cornerWidth As `Double</api/data_types/double>`, cornerHeight As `Double</api/data_types/double>`)

> Draws the outline of a rounded rectangle in the current color. The current color is set with the DrawingColor property.
>
> X and Y are the coordinates of the top-left corner. *width* and *height* specify the size of the round rectangle. *cornerWidth* and *cornerHeight* control the shape of the corners in the horizontal and vertical axes, respectively. They are the distance (in pixels) from the corner at which the arc begins. Setting them to zero results in a rectangle with sharp corners.
>
> This example draws two squares with a 5-pixel red border. The left square sets the arcs to 10 and the right one to 25.
>
> ``` xojo
> g.DrawingColor = &cff0000
> g.PenSize = 5
> g.DrawRoundRectangle(10, 10, 100, 100, 10, 10)
> g.DrawRoundRectangle(130, 10, 100, 100, 25, 25)
> ```

**DrawRoundRectangle**(r As `Rect</api/graphics/rect>`, cornerWidth As `Double</api/data_types/double>`, cornerHeight As `Double</api/data_types/double>`)

> Draws the outline of a rounded rectangle in the current color at the `Rect</api/graphics/rect>` *r* passed. The current color is set with the DrawingColor property.
>
> *cornerWidth* and *cornerHeight* control the shape of the corners in the horizontal and vertical axes, respectively. They are the distance (in pixels) from the corner at which the arc begins. Setting them to zero results in a rectangle with sharp corners.
>
> This example draws two squares with a 5-pixel red border. The left square sets the arcs to 10 and the right one to 25.
>
> ``` xojo
> Var r1 As New Rect(10, 10, 100, 100)
> Var r2 As New Rect(130, 10, 100, 100)
>
> g.DrawingColor = &cff0000
> g.PenSize = 5
> g.DrawRoundRectangle(r1, 10, 10)
> g.DrawRoundRectangle(r2, 25, 25)
> ```

<div id="graphics.drawstopicon">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

Graphics.DrawStopIcon

**DrawStopIcon**(x As `Double</api/data_types/double>`, y As `Double</api/data_types/double>`)

> Draws the operating system's Stop icon at the coordinates specified. *x* and *y* are the coordinates of the top-left corner.
>
> <div class="important">
>
> <div class="title">
>
> Important
>
> </div>
>
> This method is only supported for desktop projects.
>
> </div>
>
> This code draws the Stop icon at the passed coordinates. The code is in the Paint event.
>
> ``` xojo
> g.DrawStopIcon(170, 120)
> ```

<div id="graphics.drawtext">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

Graphics.DrawText

**DrawText**(str As `String</api/data_types/string>`, x As `Double</api/data_types/double>`, y As `Double</api/data_types/double>`, width As `Double</api/data_types/double>` = 0.0, condense As `Boolean</api/data_types/boolean>` = `False</api/language/false>`)

> Draws the text at the specified location and in the current color. The current color is set with the DrawingColor property.
>
> The *x* parameter specifies the distance from the left of the <span class="title-ref">Graphics</span> object in pixels. The *y* parameter specifies the baseline for the text. The optional *width* parameter specifies the width at which *str* should wrap. The *str* will wrap if *width* is provided and *condense* is `False</api/language/false>` (The default is `False</api/language/false>`). If *width* is omitted, then *str* will print on one line, even if the drawing area is too narrow to contain the text. If the optional *condense* property is `True</api/language/true>`, DrawText truncates the text to fit into the space specified by *width* and uses an ellipsis ("...") to indicate that there is additional text that is not shown. The default values of *width* and *condense* are zero and `False</api/language/false>`, respectively. The default behavior is to print the text on one line.
>
> <span class="title-ref">Graphics</span>.DrawText with `Outline<graphics.outline>` enabled, now properly outlines the text using fonts that are weighted (i.e. the boldness level) more heavily, like Arial Black.
>
> In specific cases where you need to draw the outline of the text on top of already rendered text, we've added the ability to opt into this specific way of rendering text by setting up the <span class="title-ref">XOJO_GRAPHICS_DRAWTEXT_MODE</span> environment variable. A value of "1" will enable <span class="title-ref">Graphics</span>.DrawText to render the text with similar metrics, regardless of whether Outline is enabled or not. This environment variable must be setup before the <span class="title-ref">Graphics</span> object is instantiated.
>
> This code draws text in red Helvetica 16-point:
>
> ``` xojo
> g.DrawingColor = &cff0000
> g.FontName = "Helvetica"
> g.FontUnit = FontUnits.Point
> g.FontSize = 16
> g.DrawText("Hello world", 10, 130)
> ```
>
> <div class="note">
>
> <div class="title">
>
> Note
>
> </div>
>
> On Windows, fractional font sizes are only supported when the <span class="title-ref">Graphics</span> object is from a `Picture</api/graphics/picture>` with an alpha channel.
>
> </div>
>
> <div class="note">
>
> <div class="title">
>
> Note
>
> </div>
>
> On Linux, any null character in the string will result in truncation of the string at that point.
>
> </div>

<div id="graphics.drawtextblock">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

Graphics.DrawTextBlock

**DrawTextBlock**(value As `String</api/data_types/string>`, x As `Double</api/data_types/double>`, y As `Double</api/data_types/double>`, maxWidth As `Double</api/data_types/double>` = -1.0, maxHeight As `Double</api/data_types/double>` = -1.0, alignment As `MobileTextControl.Alignments<mobiletextcontrol.alignments>` = `MobileTextControl.Alignments.Left<mobiletextcontrol.alignments>`, truncateLastLine As `Boolean</api/data_types/boolean>` = `False</api/language/false>`)

> Draws a block of text.
>
> <div class="important">
>
> <div class="title">
>
> Important
>
> </div>
>
> This method is only available for Mobile projects.
>
> </div>
>
> From within an `MobileCanvas.Paint<mobilecanvas.paint>` event handler:
>
> ``` xojo
> Var s As String = "How much wood would a woodchuck chuck if a woodchuck could chuck wood?"
>
> g.FillColor = Color.Blue
> g.DrawTextBlock(s, 0, 10, g.Width, g.Height, MobileTextControl.Alignments.Left, False)
> ```

<div id="graphics.filloval">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

Graphics.FillOval

**FillOval**(x As `Double</api/data_types/double>`, y As `Double</api/data_types/double>`, width As `Double</api/data_types/double>`, height As `Double</api/data_types/double>`)

> Draws an oval filled with the current color. The current color is set with the DrawingColor property.
>
> *x* and *y* are the coordinates of the top-left corner. *width* and *height* specify the size of the oval.
>
> ``` xojo
> g.DrawingColor = &cff0000
> g.FillOval(10, 10, 100, 60)
> ```

**FillOval**(r As `Rect</api/graphics/rect>`)

> Draws an oval filled with the current color at the `Rect</api/graphics/rect>` *r* passed. The current color is set with the DrawingColor property.
>
> ``` xojo
> Var r As New Rect(10, 10, 100, 60)
>
> g.DrawingColor = &cff0000
> g.FillOval(r)
> ```

<div id="graphics.fillpath">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

Graphics.FillPath

**FillPath**(path As `GraphicsPath</api/graphics/graphicspath>`, autoClose As `Boolean</api/data_types/boolean>` = `False</api/language/false>`)

> Draws a bezier line along the path designated and fills the region with the current `DrawingColor<graphics.drawingcolor>` value.
>
> When *autoClose* is `True</api/language/true>`, the path will be automatically closed so that there are no gaps in it.
>
> <div class="important">
>
> <div class="title">
>
> Important
>
> </div>
>
> This method is not supported for console or web projects.
>
> </div>

<div id="graphics.fillrectangle">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

Graphics.FillRectangle

**FillRectangle**(x As `Double</api/data_types/double>`, y As `Double</api/data_types/double>`, width As `Double</api/data_types/double>`, height As `Double</api/data_types/double>`)

> Draws a rectangle filled with the current color. The current color is set with the DrawingColor property.
>
> *x* and *y* are the coordinates of the top-left corner. *width* and *height* specify the size of the rectangle.
>
> This example (in the `DesktopCanvas.Paint<desktopcanvas.paint>` event of a `DesktopCanvas</api/user_interface/desktop/desktopcanvas>` control) draws a rectangle with a red interior.
>
> ``` xojo
> g.DrawingColor = &cff0000 ' Red
> g.FillRectangle(10, 10, 100, 60)
> ```

**FillRectangle**(r As `Rect</api/graphics/rect>`)

> Draws a rectangle filled with the current color at the `Rect</api/graphics/rect>` *r* passed. The current color is set with the DrawingColor property.
>
> This example (in the `DesktopCanvas.Paint<desktopcanvas.paint>` event of a `DesktopCanvas</api/user_interface/desktop/desktopcanvas>` control) draws a rectangle with a red interior.
>
> ``` xojo
> Var r As New Rect(10, 10, 100, 60)
>
> g.DrawingColor = &cff0000 ' Red
> g.FillRectangle(r)
> ```
>
> <div class="note">
>
> <div class="title">
>
> Note
>
> </div>
>
> On standard resolution (non-Retina/non-HiDPI) displays, using fractional values for *x*, *y*, *width*, or *height* may cause blurring of high-contrast edges. To avoid this, use `Ceiling</api/math/ceiling>` to ensure whole-number values:
>
> ``` xojo
> g.FillRectangle(Ceiling(x), Ceiling(y), Ceiling(width), Ceiling(height))
> ```
>
> </div>

<div id="graphics.fillroundrectangle">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

Graphics.FillRoundRectangle

**FillRoundRectangle**(x As `Double</api/data_types/double>`, y As `Double</api/data_types/double>`, width As `Double</api/data_types/double>`, height As `Double</api/data_types/double>`, cornerWidth As `Double</api/data_types/double>`, cornerHeight As `Double</api/data_types/double>`)

> Draws a rounded rectangle filled with the current color. The current color is set with the DrawingColor property.
>
> *x* and *y* are the coordinates of the top-left corner. *width* and *height* specify the size of the round rectangle. *cornerWidth* and *cornerHeight* control the shape of the corners in the horizontal and vertical axes, respectively. They are the distance (in points) from the corner at which the arc begins. Setting them to zero results in a rectangle with sharp corners.
>
> This example (in the `DesktopCanvas.Paint<desktopcanvas.paint>` event of a `DesktopCanvas</api/user_interface/desktop/desktopcanvas>` control) draws a rounded rectangle with a red fill and 30 pixel rounded corners.
>
> ``` xojo
> g.DrawingColor = &cff0000
> g.FillRoundRectangle(10, 10, 100, 60, 30, 30)
> ```

**FillRoundRectangle**(r As `Rect</api/graphics/rect>`, cornerWidth As `Double</api/data_types/double>`, cornerHeight As `Double</api/data_types/double>`)

> Draws a rounded rectangle filled with the current color at the `Rect</api/graphics/rect>` *r* passed. The current color is set with the DrawingColor property.
>
> *cornerWidth* and *cornerHeight* control the shape of the corners in the horizontal and vertical axes, respectively. They are the distance (in points) from the corner at which the arc begins. Setting them to zero results in a rectangle with sharp corners.
>
> This example (in the `DesktopCanvas.Paint<desktopcanvas.paint>` event of a `DesktopCanvas</api/user_interface/desktop/desktopcanvas>` control) draws a rounded rectangle with a red fill and 30 pixel rounded corners.
>
> ``` xojo
> Var r As New Rect(10, 10, 100, 60)
>
> g.DrawingColor = &cff0000
> g.FillRoundRectangle(r, 30, 30)
> ```

<div id="graphics.handle">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

Graphics.Handle

**Handle**(type As `HandleTypes<graphics.handletypes>`) As `Ptr</api/data_types/additional_types/ptr>`

> Gets the OS Handle for the passed Type. Pass the appropriate `HandleTypes<graphics.handletypes>` value to specify the Type.
>
> Handle will return `Nil</api/language/nil>` if the requested `HandleTypes<graphics.handletypes>` is not available or is not supported.
>
> This code gets a handle to the port of the <span class="title-ref">Graphics</span> object on macOS and iOS.
>
> ``` xojo
> Var h As Ptr = g.Handle(Graphics.HandleTypes.CGContextRef)
> ```

<div id="graphics.linedash">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

Graphics.LineDash

**LineDash**(`Assigns</api/language/assigns>` values() As `Double</api/data_types/double>`)

> Specifies the on/off dash pattern.

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

<div class="rst-class">

forsearch

</div>

Graphics.LineDash

**LineDash** As `Double()</api/data_types/double>`

> Specifies the on/off dash pattern.
>
> Passing an array with the values 1.0, 2.0 means a dash of 1 unit with a spacing of 2 units per dash.
>
> Setting LineDash to Nil restores drawing to solid lines.
>
> LineDash affects `DrawLine<graphics.drawline>`, `DrawOval<graphics.drawoval>`, `DrawPath<graphics.drawpath>`, `DrawPath<graphics.drawpath>`, `DrawRectangle<graphics.drawrectangle>`, `DrawRoundRectangle<graphics.drawroundrectangle>` and `DrawText<graphics.drawtext>` (if `Outline<graphics.outline>` = `True</api/language/true>`).
>
> `LineCap<graphics.linecap>` and `LineJoin<graphics.linejoin>` will affect how the dashes are drawn.
>
> Draw a diagonal line with 2 unit dashes and 3 unit gaps:
>
> ``` xojo
> g.PenSize = 5
> g.LineDash = Array(2.0, 3.0)
> g.DrawLine(0, 0, g.Width, g.Height)
> ```

<div id="graphics.nextpage">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

Graphics.NextPage

**NextPage**

> When printing a <span class="title-ref">Graphics</span> object, this method will cause the current page to be printed and a new page to be created.
>
> <div class="important">
>
> <div class="title">
>
> Important
>
> </div>
>
> For mobile projects, this method is only supported for `PDFGraphics</api/pdf/pdfgraphics>` since printing is not currently supported for mobile.
>
> </div>

<div id="graphics.restorestate">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

Graphics.RestoreState

**RestoreState**

> Restores <span class="title-ref">Graphics</span> context previously saved with SaveState.
>
> RestoreState resets the current values in such a way as to allow the history of previous saved to be restored on a last saved, first restored basis.
>
> From within an `MobileCanvas.Paint<mobilecanvas.paint>` event handler:
>
> ``` xojo
> g.DrawingColor = Color.Blue
> g.FillRectangle(10, 10, 20, 20)
>
> g.SaveState
> g.DrawingColor = Color.Red
> g.FillRectangle(50, 50, 20, 20)
>
> ' Restore to state where FillColor is Blue
> g.RestoreState
> g.FillRectangle(10, 50, 20, 20)
> ```

<div id="graphics.rotate">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

Graphics.Rotate

**Rotate**(angle As `Double</api/data_types/double>`)

> Rotates the drawing context by the specified angle (in radians). This only affects subsequent drawing. Any drawing done before the Rotate method called is not rotated.

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

<div class="rst-class">

forsearch

</div>

Graphics.Rotate

**Rotate**(angle As `Double</api/data_types/double>`, x As `Double</api/data_types/double>`, y As `Double</api/data_types/double>`)

> Rotates the drawing context at the x and y coordinates by the specified angle (in radians). This only affects subsequent drawing. Any drawing done before the Rotate method called is not rotated.
>
> Use `Translate<graphics.translate>` to move the origin.
>
> <div class="note">
>
> <div class="title">
>
> Note
>
> </div>
>
> When used in combination with `Scale<graphics.scale>` and/or `Translate<graphics.translate>` to draw into a `PDFDocument</api/pdf/pdfdocument>`, Rotate may behave differently than it does when drawing to normal <span class="title-ref">Graphics</span> object because the rotation is being handled by the PDF engine itself.
>
> </div>
>
> From within an `MobileCanvas.Paint<mobilecanvas.paint>` event handler:
>
> ``` xojo
> ' Rotate square in center of graphics area
> Const Pi = 3.14159
>
> g.Translate(g.Width / 2, g.Height / 2)
> g.Rotate(Pi / 4) ' 45 degrees or 1/8 of a circle
> g.DrawingColor = Color.Blue
> g.FillRectangle(10, 10, 50, 50)
> ```
>
> ``` xojo
> ' Rotate the entire drawing area around its center
> ' and draw a rectangle
> Const Pi = 3.14159
>
> g.Rotate(Pi / 4, g.Width / 2, g.Height / 2) ' 45 degrees or 1/8 of a circle
> g.DrawingColor = Color.Blue
> g.FillRectangle(g.Width / 2 - 20, g.Height / 2 - 20, 20, 20)
> ```

<div id="graphics.savestate">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

Graphics.SaveState

**SaveState**

> Saves <span class="title-ref">Graphics</span> state of the <span class="title-ref">Graphics</span> context so that it can be restored later.
>
> SaveState saves the current values in such a way as to allow the history of previous saves to be restored on a last saved, first restored basis.
>
> These values are saved with SaveState and are restored when you call `RestoreState<graphics.restorestate>`.
>
> - Translate
> - Clip region
> - PenSize
> - AntiAliased
> - DrawingColor
> - Font
> - Underline
> - Rotate (rotation)
>
> From within an `MobileCanvas.Paint<mobilecanvas.paint>` event handler:
>
> ``` xojo
> g.DrawingColor = Color.Blue
> g.FillRectangle(10, 10, 20, 20)
>
> g.SaveState
> g.DrawingColor = Color.Red
> g.FillRectangle(50, 50, 20, 20)
>
> ' Restore to state where FillColor is Blue
> g.RestoreState
> g.FillRectangle(10, 50, 20, 20)
> ```

<div id="graphics.scale">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

Graphics.Scale

**Scale**(x As `Double</api/data_types/double>`, y As `Double</api/data_types/double>`)

> Sets the scale for the <span class="title-ref">Graphics</span> context as specified *x* and *y*. This only affects subsequent drawing. Any drawing done before the Scale method is called is not scaled.
>
> <div class="note">
>
> <div class="title">
>
> Note
>
> </div>
>
> When used in combination with `Rotate<graphics.rotate>` and/or `Translate<graphics.translate>` to draw into a `PDFDocument</api/pdf/pdfdocument>`, Scale may behave differently than it does when drawing to normal <span class="title-ref">Graphics</span> object because the scaling is being handled by the PDF engine itself.
>
> </div>
>
> From within the `MobileCanvas.Paint<mobilecanvas.paint>` event handler:
>
> ``` xojo
> g.Scale(2.0, 4.0)
> g.DrawingColor = Color.Blue
> g.FillRectangle(10, 10, 10, 10) ' The squares scales to a rectangle
> ```

<div id="graphics.textblocksize">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

Graphics.TextBlockSize

**TextBlockSize**(value As `String</api/data_types/string>`, maxWidth As `Double</api/data_types/double>` = -1.0, maxHeight As `Double</api/data_types/double>` = -1.0, alignment As `MobileTextControl.Alignments<mobiletextcontrol.alignments>` = `MobileTextControl.Alignments.Left<mobiletextcontrol.alignments>`, truncateLastLine As `Boolean</api/data_types/boolean>` = `False</api/language/false>`) As `Size</api/graphics/size>`

> Calculates the size of a text as it would appear using DrawTextBlock.
>
> <div class="important">
>
> <div class="title">
>
> Important
>
> </div>
>
> This method is only available for Mobile projects.
>
> </div>
>
> Get the text block size of left-aligned text:
>
> ``` xojo
> Var tbs As Size
> tbs = g.TextBlockSize("Hello, world!", -1, -1, MobileTextControl.Alignments.Left, False)
> ```

<div id="graphics.textdirection">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

Graphics.TextDirection

**TextDirection**(value As `String</api/data_types/string>`) As `TextDirections<graphics.textdirections>`

> Returns an `Enumeration</api/data_types/enumeration>` that indicates the direction in which the text is written.
>
> This is useful for non-Roman systems, especially Middle-Eastern languages. If you pass an empty string, it returns the system default string direction. If this function is not supported on the user's system, the `TextDirections<graphics.textdirections>` value will be Unknown.
>
> This example gets the string direction.
>
> ``` xojo
> If g.TextDirection("Hello world") = Graphics.TextDirections.RightToLeft Then
>   MessageBox("We are on a right to left system.")
> End If
> ```

<div id="graphics.textheight">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

Graphics.TextHeight

**TextHeight** As `Double</api/data_types/double>`

> Gets the height of a line of text drawn with the current font.

**TextHeight**(text As `String</api/data_types/string>`, wrapWidth As `Double</api/data_types/double>`) As `Double</api/data_types/double>`

> Used to calculate the height of a line of *text* passed (given the wrap width passed) drawn with the current font.
>
> TextHeight is calculated as the maximum height for the font itself and not the actual height of the text. For example, with "a" vs. "A", both return the same TextHeight even though "A" has a greater height than "a".
>
> ``` xojo
> g.FontName = "Helvetica"
> g.FontUnit = FontUnits.Points
> g.FontSize = 32
>
> Var height As Double
> height = g.TextHeight("Hello world", 150)
> ```
>
> This example reports the TextHeight of the current text.
>
> ``` xojo
> g.DrawingColor = &cff0000
> g.Italic = True
> g.DrawText("Hello world", 10, 10)
> MessageBox(g.TextHeight.ToString)
> ```

<div id="graphics.textwidth">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

Graphics.TextWidth

**TextWidth**(text As `String</api/data_types/string>`) As `Double</api/data_types/double>`

> Returns as a `Double</api/data_types/double>` the width of *text* in points, based on the current text properties of the <span class="title-ref">Graphics</span> object.
>
> To be precise, `TextWidth<graphics.textwidth>` returns the width of the string's baseline, which is to say that it returns the position that the next character would be drawn at, if the string were to be extended. For example, if `Bold<graphics.bold>` is `True</api/language/true>`, then each character would have a larger width when drawn, so `TextWidth<graphics.textwidth>` will return a larger value than otherwise. On the other hand, if `Italic<graphics.italic>` is `True</api/language/true>`, then the last character of the text would lean to the right when drawn, increasing the visual width of the text slightly. However, the baseline of the rendered string would not have changed, so `TextWidth<graphics.textwidth>` will generally not return a different value in this case.
>
> `TextWidth<graphics.textwidth>` does not handle multiple lines in the way that one might expect. Essentially, the multi-line nature of the text is ignored, and newline sequences are treated as if they were space characters. For example, it returns the same value for the text "A B" as for the text "A"+EndOfLine+"B". To take multiple lines into account, you'll need to `String.Split<string.split>` the text into multiple lines yourself, and calculate the width of each line separately, handling leading or trailing whitespace in whatever way makes sense for your situation.
>
> This example creates a `Picture</api/graphics/picture>` and uses its <span class="title-ref">Graphics</span> object to calculate the TextWidth and display it in a TextField on a window:
>
> ``` xojo
> Var p As New Picture(100, 100, 32)
> Var d As Double = p.Graphics.TextWidth("Hello World!")
>
> TextField1.Text = d.ToString
> ```

<div id="graphics.translate">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

Graphics.Translate

**Translate**(x As `Double</api/data_types/double>`, y As `Double</api/data_types/double>`)

> Translates the origin point by the specified *x* and *y* values. Useful with `Rotate<graphics.rotate>`. This only affects subsequent drawing.
>
> <div class="note">
>
> <div class="title">
>
> Note
>
> </div>
>
> When used in combination with `Rotate<graphics.rotate>` and/or `Scale<graphics.scale>` to draw into a `PDFDocument</api/pdf/pdfdocument>`, Translate may behave differently than it does when drawing to normal <span class="title-ref">Graphics</span> object because the translation is being handled by the PDF engine itself.
>
> </div>
>
> From within an `MobileCanvas.Paint<mobilecanvas.paint>` event handler:
>
> ``` xojo
> ' Rotate square in center of graphics area
> Const Pi = 3.14159
>
> g.Translate(g.Width / 2, g.Height / 2)
> g.Rotate(Pi / 4) ' 45 degrees or 1/8 of a circle
> g.DrawingColor = Color.Blue
> g.FillRectangle(10, 10, 50, 50)
> ```

## Notes

Normally you use a <span class="title-ref">Graphics</span> object in response to a `DesktopCanvas.Paint<desktopcanvas.paint>` event, but you can also perform direct drawing by using the <span class="title-ref">Graphics</span> property of a `Picture</api/graphics/picture>`. Alternatively, you can create vector <span class="title-ref">Graphics</span> using the subclasses of the `Object2D</api/graphics/object2d>` class.

<div class="note">

<div class="title">

Note

</div>

You cannot create a meaningful <span class="title-ref">Graphics</span> object via the `New</api/language/new>` command.

</div>

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

### <span class="title-ref">Graphics</span> Coordinates

The *x* and *y* parameters of the methods are the horizontal and vertical coordinates of the left-top corner of the object being drawn or cleared. The origin (0,0) is the top-left corner of the control or window in which the drawing is being done.

For example, 50,50 is 50 points to the right and 50 points down from the top-left of the window or control.

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

### Alpha channel support

The `Transparency<graphics.transparency>` property takes a value between 0.0 (opaque) and 100.0 (transparent) that can be used to obtain "fading" effects (amongst other uses) by setting the transparency to a value greater than 0.0.

When rendering colors or pictures with alpha channel information, the Transparency property is composited with the alpha channel information. This allows you to perform uniform fading operations easily and efficiently.

On Windows, using the Transparency property only works on `Picture.Graphics<picture.graphics>` if the Picture was created with a depth of 32, or is a Picture with an alpha channel. Attempting to use it on other forms of Pictures will result in an UnsupportedOperationException.

### Drawing issue

`XOJO_D2D_SOFTWARE_RENDERING` is an environment variable that should be set before any <span class="title-ref">graphics</span> drawing occurs, ideally in `App.Opening<desktopapplication.opening>`. Assigning any value to this variable forces software rendering instead of hardware rendering. This can be helpful if the <span class="title-ref">graphics</span> card doesn't support hardware rendering, or if older GPUs have trouble rendering certain <span class="title-ref">graphics</span> correctly.

To turn on software rendering, use the following code:

``` xojo
#If TargetDesktop And TargetWindows
  System.EnvironmentVariable("XOJO_D2D_SOFTWARE_RENDERING") = "True"
#EndIf
```

## Sample code

This example uses the `Paint<desktopcanvas.paint>` event handler of a `DesktopCanvas</api/user_interface/desktop/desktopcanvas>` control to draw the text “The quick brown fox” in Helvetica bold, italic, 18 point, 50 pixels from the top of and 10 pixels from the left side of the control.

``` xojo
Sub Paint(g As Graphics)
  g.Bold = True
  g.Italic = True
  g.FontName = "Helvetica"
  g.FontSize = 18
  g.DrawText("The quick brown fox", 10, 50)
End Sub
```

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

This example draws a triangle in a `DesktopCanvas</api/user_interface/desktop/desktopcanvas>` control. It is placed in the `Paint<desktopcanvas.paint>` event. The parameter g as <span class="title-ref">Graphics</span> is passed into this event.

``` xojo
Var path As New GraphicsPath

path.MoveToPoint(10, 10)
path.AddLineToPoint(100, 50)
path.AddLineToPoint(10, 200)

g.DrawingColor = Color.Red
g.FillPath(path)
```

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

This example uses the `Clip<graphics.clip>` method to define child <span class="title-ref">Graphics</span> items within the parent `DesktopCanvas</api/user_interface/desktop/desktopcanvas>`. The code is in the `Paint<desktopcanvas.paint>` event of a `DesktopCanvas</api/user_interface/desktop/desktopcanvas>`. The two clippings define regions at the top of the canvas and the DrawOval method draws object in each one. Notice that the first call tries to draw an oval that is wider than the region. It is truncated in the drawing.

``` xojo
Var myClip As Graphics = g.Clip(0, 0, 150, 15)
Var myClip2 As Graphics = g.Clip(150, 0, 150, 15)

' draw the border of the Canvas..
g.DrawingColor = &c000000
g.DrawRectangle(0, 0, g.Width, g.Height)

' draw into the first area...
myClip.DrawingColor = &cff0000
myClip.DrawRectangle(0, 0, myClip.Width, myClip.Height) ' draw the border of the area..
myClip.DrawOval(0, 0, 200, 15) ' the oval does not appear outside the region despite the call

' draw into the second area...
myClip2.DrawingColor = &c0000ff
myClip2.DrawRectangle(0, 0, myClip2.Width, myClip2.Height) ' draw the border of the area
myClip2.DrawOval(0, 0, 150, 15)
```

## Compatibility

|                       |     |
|-----------------------|-----|
| **Project Types**     | All |
| **Operating Systems** | All |

<div class="seealso">

`Object</api/data_types/additional_types/object>` parent class; `DesktopCanvas</api/user_interface/desktop/desktopcanvas>`, `MobileCanvas</api/user_interface/mobile/mobilecanvas>` control; `DesktopWindow</api/user_interface/desktop/desktopwindow>`, `DesktopContainer</api/user_interface/desktop/desktopcontainer>`, `Group2D</api/graphics/group2d>` classes.

</div>
