3

I'm creating a fairly complex Path object to render a detailed spectral shape (it's like a waveform or an electromagnetic spectrum). I need to be able to see as much detail as possible in this shape, and to that end I'd like to remove that "blurriness" that happens whenever a line segment in the path crosses pixel borders (i.e. the anti-aliasing.)

In other words, I'd like each pixel of the line to be rendered into exactly one pixel on the screen.

Things that don't work:

  • casting every endpoint in the Path to an int. (The path still interpolates non-integer values between endpoints.)

  • setting Path.setSmooth(boolean) to false. I don't know why this doesn't work, it seems like just what I want.

Does anyone have any other suggestions?

Xanatos
  • 1,576
  • 18
  • 28
  • Possible duplicate: http://stackoverflow.com/questions/9779693/javafx-graphics-blurred-or-anti-aliased-no-effects-used – Loa Jan 23 '14 at 19:27
  • 1
    @Loa: the answer for [that question](http://stackoverflow.com/questions/9779693/javafx-graphics-blurred-or-anti-aliased-no-effects-used) suggests several different ways of keeping the whole shape on "pixel boundaries" by ensuring that all of the shape endpoints are integers. As I mentioned above, that won't help with my case because my Path has many "diagonal" line segments. Still, that solution might well be useful for someone who is experiencing this problem with other kinds of JavaFX Shapes. – Xanatos Jan 23 '14 at 22:13

0 Answers0