[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-openjfx-dev
Subject:    Re: Proposal for Enhancement to PixelBuffer/WritableImage to support pixelScale
From:       Tom Schindl <tom.schindl () bestsolution ! at>
Date:       2021-12-02 23:40:33
Message-ID: 43c17ef0-0867-fd64-16b0-f1c104f28954 () bestsolution ! at
[Download RAW message or body]

ok answering my own question it is quite simple using 
setFitWidth/setFitHeight already today.

ImageView renderingView ....

renderingView.setFitWidth(width / scaleFactor);
renderingView.setFitHeight(height / scaleFactor);

I already tested that before sending out this mail but unfortunately it 
did not work because I had a reflection effect on the parent node and it 
took the whole day to track down that I run a bug with the 
Reflection-Effect I documented at [1].

Tom

[1] https://bugs.openjdk.java.net/browse/JDK-8278170

Am 02.12.21 um 11:35 schrieb Tom Schindl:
> Hi,
> 
> I'm try to get a HiDPI-Image produced by an external application into 
> JavaFX using WritableImage.
> 
> In the end the situation is comparable to what you get today when 
> loading an image from an URL (eg sample@2.png) where JavaFX sets the 
> appropriate image pixelScale on "com.sun.prism.Image".
> 
> If I'm not completely mistaken I would need an new API on PixelBuffer to 
> containing the pixelScale who is used QuantumImage to create an 
> appropriate "com.sun.prism.Image" who has eg the pixelScale = 2.0 
> because I fed in a HiDPI-Image already.
> 
> Before filing an ehancement I wanted to bring this up here because maybe 
> I'm missing something obvious or maybe my proposal makes totally no sense.
> 
> Tom
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic