跳到主要内容

图像过滤(ImageFilter)

定义图像在缩放或变换时的采样过滤方式(sampling filter):

  • bilinear
  • nearest

用法见 ImageSampler

function init(self: DrawImage, context: Context): boolean
self.myImage = context:image('myImage')
self.sampler = ImageSampler(
'clamp',
'clamp',
'bilinear'
)

return true
end