self:get_filter
Client
Retrieves the current sampling filter of the image
Syntax
local mode = self:get_filter()Parameters
| No parameters are accepted by this function |
|---|
Returns
| Type | Name | Description |
|---|---|---|
core.image.texture_filter | mode | Current sampling filter of the image |
Examples
local entity = core.image.create("assets/sprite.png")
if entity:get_filter() == core.image.texture_filter.DEFAULT then
entity:set_filter(core.image.texture_filter.NEAREST)
endlocal source = core.image.create("assets/tiles/grass0.png")
source:set_filter(core.image.texture_filter.NEAREST)
local target = core.image.create("assets/tiles/stone0.png")
target:set_filter(source:get_filter())