cpattern:SetFilter(filter)
filter
parameter can be set to one of the following constants:
#CAIRO_FILTER_FAST#CAIRO_FILTER_NEAREST.
#CAIRO_FILTER_GOOD#CAIRO_FILTER_BILINEAR.
#CAIRO_FILTER_BEST#CAIRO_FILTER_NEAREST#CAIRO_FILTER_BILINEAR#CAIRO_FILTER_GAUSSIANNote that you might want to control filtering even when you do not have an explicit Cairo pattern object, for example when using ccontext:SetSourceSurface(). In these cases, it is convenient to use ccontext:GetSource() to get access to the pattern that cairo creates implicitly. For example:
ctx:SetSourceSurface(image, x, y) pat = ctx:GetSource() pat:SetFilter(#CAIRO_FILTER_NEAREST) |