Difference between revisions of "Texture:getPixelHeight"

(Created page)
 
m (0.11.0 -> 11.0)
 
Line 1: Line 1:
{{newin|[[0.11.0]]|110|type=method}}
+
{{newin|[[11.0]]|110|type=method}}
 
Gets the height in pixels of the Texture.
 
Gets the height in pixels of the Texture.
  

Latest revision as of 19:28, 7 May 2019

Available since LÖVE 11.0
This method is not supported in earlier versions.

Gets the height in pixels of the Texture.

Texture:getHeight gets the height of the texture in units scaled by the texture's DPI scale factor, rather than pixels. Use getHeight for calculations related to drawing the texture (calculating an origin offset, for example), and getPixelHeight only when dealing specifically with pixels, for example when using Canvas:newImageData.

Function

Synopsis

pixelheight = Texture:getPixelHeight( )

Arguments

None.

Returns

number pixelheight
The height of the Texture, in pixels.

See Also

Other Languages