From 20c35ddcc6b806d92af10e0d43ed77493fc261d6 Mon Sep 17 00:00:00 2001 From: Simon Date: Wed, 24 Jan 2024 15:04:18 +0100 Subject: [PATCH] add interpolate keyword for Surface (#3541) add ninterpolate keyword for Surface --- GLMakie/src/drawing_primitives.jl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/GLMakie/src/drawing_primitives.jl b/GLMakie/src/drawing_primitives.jl index 9a66f835321..704e456b927 100644 --- a/GLMakie/src/drawing_primitives.jl +++ b/GLMakie/src/drawing_primitives.jl @@ -743,8 +743,9 @@ function draw_atomic(screen::Screen, scene::Scene, plot::Surface) end space = plot.space - - gl_attributes[:image] = img + interp = to_value(pop!(gl_attributes, :interpolate, true)) + interp = interp ? :linear : :nearest + gl_attributes[:image] = Texture(img; minfilter=interp) @assert to_value(plot[3]) isa AbstractMatrix types = map(v -> typeof(to_value(v)), plot[1:2])