On Wed, 10 May 2023 17:45:17 GMT, Sergey Bylokhov <s...@openjdk.org> wrote:

>> So, I added this code specifically to have improved rendering for the 25% 
>> cases, like 125%, 225%, 325% as rendering was a little off for these scale 
>> values and empirically based on what we saw it looked better with this 
>> calculation.
>> It is also important to note that windows is not consistent in what size it 
>> provides for a part(button) . For example for 150% it provides part size as 
>> 20 and we calculate it as 20 in above code.  For 175% windows still provides 
>> 20 again (while we would expect higher value) and we calculate it as 23 and 
>> it works out good. But as I said earlier for 125% or 225% it works best with 
>> above code.
>> The 20 vs 19 thing that I mentioned above was to just show that clipRound 
>> doesn't calculate it same was as my code and can have rendering 
>> repercussions as it is very sensitive to pixel variation , even 1 pixel 
>> variation causes  rendering artifacts.
>
>>So, I added this code specifically to have improved rendering for the 25% 
>>cases, like 125%, 225%, 325% as rendering was a little off f
> 
> But why it looks off if the clipRound is used? Does that size scales worse or 
> does it cut the image at some direction?

With clipRound this is what I see with 150% Scaling: 

![image](https://github.com/openjdk/jdk/assets/79671271/600730d5-9eb3-42c9-a9d2-e40b42fb29b0)

With the current code change this is what I see with 150% Scaling:

![image](https://github.com/openjdk/jdk/assets/79671271/66fc6278-08ea-474a-b26c-2fd007859093)

I see it scaled down with clipRound.
I think this because of the calculation difference I mentioned above, as this 
is very sensitive and even 1pixel here or there can cause rendering issues.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/13701#discussion_r1193198693

Reply via email to