processing / processing4-javafx

JavaFX library for Processing 4
14 stars 5 forks source link

noSmooth() not working on FX2D #3

Open StefanH-AT opened 5 years ago

StefanH-AT commented 5 years ago

Description

noSmooth() does not disable image smoothing in FX2D

Expected Behavior

Expected to disable antialiasing on images

Current Behavior

Antialiasing is still enabled

Steps to Reproduce

  1. Make sketch using FX2D
  2. Add noSmooth() to settings()
  3. Draw image()
@Override
    public void settings() {
        size(500, 500, FX2D); 
        noSmooth();  // Switching these around does not change anything.
    }

    @Override
    public void setup() {
                  // Putting noSmooth() here does not solve it either
    }

    @Override
    public void draw() {
        background(0);
        drawGrid();
        image(textures.get(Editor.currentTexture), x, y, x + 200, y + 200); // Image is 16 x 16
    }

Your Environment

Possible Causes / Solutions

The FX2D rendering engine breaks noSmooth(). I'm hoping for a fix.

benfry commented 5 years ago

I think JavaFX may not support disabling smoothing, but someone would need to look into it.

barefists commented 5 years ago

@benfry JavaFX 8 does not support disabling smoothing. The issue has been fixed recently in OpenJFX 12, but I'm not sure if Processing supports upgrading to that version.

benfry commented 5 years ago

Thanks for the info, @barefists.

StefanH-AT commented 5 years ago

Thanks for that!

StefanH-AT commented 5 years ago

I don't think this is an issue regarding JavaFX. Lines and other primitive shapes don't get smoothed. This issue only regards images.