self:has_mipmaps

Client

Checks whether the SVG has a generated mipmap chain


Syntax

local result = self:has_mipmaps()

Parameters

No parameters are accepted by this function

Returns

TypeNameDescription
boolresulttrue if the svg has a mipmap chain, false otherwise

Examples

Check before applying a mipmap-based filter
local entity = core.svg.create("assets/icon.svg")

if entity:has_mipmaps() then
    entity:set_filter(core.svg.svg_filter.LINEAR_MIPMAP_ANISOTROPIC)
end
Create with mipmaps and verify before filtering
local entity = core.svg.create("assets/icon.svg", true)

if entity:has_mipmaps() then
    entity:set_filter(core.svg.svg_filter.NEAREST_MIPMAP)
end

On this page