Difference between revisions of "Quad"
Flamingarrow (talk | contribs) m (Make texture linked.) |
|||
(16 intermediate revisions by 11 users not shown) | |||
Line 1: | Line 1: | ||
+ | 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 [http://en.wikipedia.org/wiki/Texture_atlas texture atlas] can be loaded, and then split up into sub-images. | |
+ | |||
+ | {{notice|Quads 'bleed' when scaled, rotated or drawn at non-integer coordinates, even within [[SpriteBatch|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 == | ||
+ | {{#ask: [[Category:Functions]] [[Constructs::Quad]] [[Concept:Current]] | ||
+ | | headers=hide | ||
+ | | default=None. | ||
+ | | format=template | ||
+ | | template=ListingFields | ||
+ | | introtemplate=ListingIntro | ||
+ | | outrotemplate=ListingOutro | ||
+ | | ?Description | ||
+ | | ?PrettySince | ||
+ | | ?PrettyRemoved | ||
+ | }} | ||
== Functions == | == Functions == | ||
− | {{#ask: [[Category:Functions]] [[parent::Quad]] | + | {{#ask: [[Category:Functions]] [[parent::Quad||Object]] [[Concept:Current]] |
| headers=hide | | headers=hide | ||
+ | | format=template | ||
+ | | template=ListingFields | ||
+ | | introtemplate=ListingIntro | ||
+ | | outrotemplate=ListingOutro | ||
| ?Description | | ?Description | ||
+ | | ?PrettySince | ||
+ | | ?PrettyRemoved | ||
}} | }} | ||
+ | == Supertypes == | ||
+ | * [[parent::Object]] | ||
== See Also == | == See Also == | ||
* [[parent::love.graphics]] | * [[parent::love.graphics]] | ||
− | |||
[[Category:Types]] | [[Category:Types]] | ||
{{#set:Description=A quadrilateral with texture coordinate information.}} | {{#set:Description=A quadrilateral with texture coordinate information.}} | ||
+ | {{#set:Since=000}} | ||
+ | == Other Languages == | ||
+ | {{i18n|Quad}} |
Latest revision as of 17:01, 8 December 2020
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:release | Immediately destroys the object's Lua reference. | 11.0 | |
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:getLayer | Gets the layer specified by Quad:setLayer. | 11.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:setLayer | Sets the layer to use in Array Textures. | 11.0 | |
Quad:setViewport | Sets the texture coordinates according to a viewport. |
Supertypes
See Also
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