-
Bug
-
Resolution: Fixed
-
P3
-
fx2.0
-
Windows Vista x64, presidio-graphics-scrum-b478
During prism tests creation I noticed that, for example (0, 0) coordinates are interpreted not as pixel at (0, 0), but rather the top left edge of that pixel if it can be considered as rectangle. So if draw the following line:
Path path = new Path();
MoveTo moveTo = new MoveTo(5, 10);
LineTo lineTo = new LineTo(15, 10);
path.getElements().addAll(moveTo, lineTo);
path.setStroke(Color.RED);
I will actualy get two pixel height rectangle representing this line. If I adjust this line as following:
path.setTranslateX(0.5f);
path.setTranslateY(0.5f);
I'll get what I'd expect from the very beginning - a line that is one pixel width, occupaying exactly 10th row of pixels, starting with exactly 5th pixel ending on 14th pixel.
In my opinion coordinates should match to pixels the way they do when the adjustment above is in place.
Path path = new Path();
MoveTo moveTo = new MoveTo(5, 10);
LineTo lineTo = new LineTo(15, 10);
path.getElements().addAll(moveTo, lineTo);
path.setStroke(Color.RED);
I will actualy get two pixel height rectangle representing this line. If I adjust this line as following:
path.setTranslateX(0.5f);
path.setTranslateY(0.5f);
I'll get what I'd expect from the very beginning - a line that is one pixel width, occupaying exactly 10th row of pixels, starting with exactly 5th pixel ending on 14th pixel.
In my opinion coordinates should match to pixels the way they do when the adjustment above is in place.
- duplicates
-
JDK-8087928 1-pixel wide stroke rendered on integer pixel boundary is blurry
-
- Open
-