##### Views

- Page
- Discussion
- View source
- History

# Quad

A quadrilateral (a polygon with four sides and four corners) with texture coordinate information.

Quads can be used to select part of a texture to draw. In this way, one large texture atlas can be loaded, and then split up into sub-images.

| Quads 'bleed' when scaled, rotated or drawn at non-integer coordinates, even within SpriteBatches, to compensate for this, use 1px borders (preferably with the same colors as the actual border) |

## Constructors

love.graphics.newQuad | Creates a new Quad. |  |

## Functions

Object:type | Gets the type of the object as a string. |  |
Object:typeOf | Checks whether an object is of a certain type. |  |
Quad:flip | Flips this quad horizontally, vertically, or both. |  | 0.9.0
Quad:getViewport | Gets the current viewport of this Quad. |  |
Quad:setViewport | Sets the texture coordinates according to a viewport. |  |

## Supertypes

- Object

## See Also

- love.graphics

## Other Languages

Dansk – Deutsch – English – Español – Français – Indonesia – Italiano – Lietuviškai – Magyar – Nederlands – Polski – Português – Română – Slovenský – Suomi – Svenska – Türkçe – Česky – Ελληνικά – Български – Русский – Српски – Українська – עברית – ไทย – 日本語 – 正體中文 – 简体中文 – Tiếng Việt – 한국어
More info

Retrieved from "https://www.love2d.org/wiki/Quad"
Category: Types

##### Personal tools

- Log in

##### Search

##### Toolbox

- What links here
- Related changes
- Special pages
- Printable version
- Permanent link
- Browse properties