Difference between revisions of "love.graphics.getCompressedImageFormats"

(Created page)
 
(Updated for 11.0)
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{newin|[[0.9.2]]|092|type=function}}
+
{{newinoldin|[[0.9.2]]|092|[[11.0]]|110|type=function|text=It has been replaced by [[love.graphics.getImageFormats]]}}
 
Gets the available [[CompressedFormat|compressed image formats]], and whether each is supported.
 
Gets the available [[CompressedFormat|compressed image formats]], and whether each is supported.
 
== Function ==
 
== Function ==
Line 9: Line 9:
 
None.
 
None.
 
=== Returns ===
 
=== Returns ===
{{param|table|formats|A table containing [[CompressedFormat]]s as keys, and a boolean indicating whether the format is supported as values. Not all systems support all formats.}}
+
{{param|table|formats|A table containing [[CompressedImageFormat]]s as keys, and a boolean indicating whether the format is supported as values. Not all systems support all formats.}}
 +
 
 
== Examples ==
 
== Examples ==
 
=== Display a list of the compressed image formats on the screen ===
 
=== Display a list of the compressed image formats on the screen ===
Line 26: Line 27:
 
== See Also ==
 
== See Also ==
 
* [[parent::love.graphics]]
 
* [[parent::love.graphics]]
* [[CompressedFormat]]
+
* [[CompressedImageFormat]]
 
* [[love.graphics.newImage]]
 
* [[love.graphics.newImage]]
 
* [[love.image.newCompressedData]]
 
* [[love.image.newCompressedData]]
 
[[Category:Functions]]
 
[[Category:Functions]]
{{#set:Sub-Category=State}}
+
{{#set:Sub-Category=SystemInfo}}
 
{{#set:Description=Gets the available [[CompressedFormat|compressed image formats]], and whether each is supported.}}
 
{{#set:Description=Gets the available [[CompressedFormat|compressed image formats]], and whether each is supported.}}
 +
 
== Other Languages ==
 
== Other Languages ==
 
{{i18n|love.graphics.getCompressedImageFormats}}
 
{{i18n|love.graphics.getCompressedImageFormats}}

Latest revision as of 20:10, 1 April 2018

Available since LÖVE 0.9.2 and removed in LÖVE 11.0
It has been replaced by love.graphics.getImageFormats.

Gets the available compressed image formats, and whether each is supported.

Function

Synopsis

formats = love.graphics.getCompressedImageFormats( )

Arguments

None.

Returns

table formats
A table containing CompressedImageFormats as keys, and a boolean indicating whether the format is supported as values. Not all systems support all formats.

Examples

Display a list of the compressed image formats on the screen

formats = love.graphics.getCompressedImageFormats()

function love.draw()
    local y = 0
    for formatname, formatsupported in pairs(formats) do
        local str = string.format("Supports format '%s': %s", formatname, tostring(formatsupported))
        love.graphics.print(str, 10, y)
        y = y + 20
    end
end

See Also


Other Languages