RFR: 8211294: [windows] TextArea content is blurry with 125% scaling
Frederic Thevenet
fthevenet at openjdk.java.net
Mon Dec 14 12:08:54 UTC 2020
On Sat, 12 Dec 2020 22:31:56 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:
>
>
> One more comment: given the quality problems that necessarily arise when the translation of a cached image is not on an integer boundary, part of the solution might be to snap the cached image to a pixel boundary as is done in this PR, but we would need to ensure that this doesn't impact smooth scrolling of a TextArea.
I've done some quick tests with the minimal sample below, and could not notice any performance impact with this patch compared to 15.0.1.
java
public class TextScroll extends Application {
@Override
public void start(Stage stage) throws Exception {
var textArea = new TextArea();
var txt = new File(getClass().getResource("/Scrollpane.java").getFile());
textArea.setText(Files.readString(txt.toPath(), StandardCharsets.UTF_8));
var root = new ScrollPane(textArea);
root.setFitToHeight(true);
root.setFitToWidth(true);
Scene scene;
scene = new Scene(root, 800, 600);
stage.setTitle("Scroll test");
stage.setScene(scene);
stage.show();
}
public static void main(String[] args) {
launch(args);
}
}
-------------
PR: https://git.openjdk.java.net/jfx/pull/308
More information about the openjfx-dev
mailing list