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 around the textures inside the texture atlas (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:getTextureDimensions Gets reference texture dimensions initially specified in love.graphics.newQuad. 0.10.2
Quad:getViewport Gets the current viewport of this Quad.
Quad:setViewport Sets the texture coordinates according to a viewport.

Supertypes

See Also


Quad:setViewport

Quad:setViewport Sets the texture coordinates according to a viewport. Function Synopsis

2017-03-21 15:52:27
Quad:flip

Quad:flip Removed in LÖVE 0.9.0 This function is not supported in that and later versions. Flips this quad horizontally, vertically, or both.

2017-03-21 15:52:26
Quad:getViewport

Quad:getViewport Gets the current viewport of this Quad. Function Synopsis

2017-03-21 15:52:27
Quad:getTextureDimensions

Quad:getTextureDimensions Available since LÖVE 0.10.2 This function is not supported in earlier versions. Gets reference texture dimensions

2017-03-21 15:52:26