~eliasnaur/gio#414: 
Support Nearest texture filtering.

For pixel-art or images based on measurements (e.g. spectrogram), it can be useful to use nearest-neighbor scaling instead of linear.

A proposal to add make it possible to change image scaling mode. One possible api:

img := paint.NewImageOp(img)
img.Filter(paint.FilterNearest)
img.Add(gtx.Ops)

Of course the API could be also implemented in other ways.

Status
REPORTED
Submitter
~egonelbre
Assigned to
No-one
Submitted
3 months ago
Updated
2 months ago
Labels
No labels applied.

~eliasnaur 2 months ago

SGTM, except that I prefer a plain field:

img.Filter = paint.FilterNearest

Register here or Log in to comment, or comment via email.