<Swing Dev> [9] Review request for 8142966 Wrong cursor position in text components on HiDPI display

Alexandr Scherbatiy alexandr.scherbatiy at oracle.com
Tue May 10 06:54:54 UTC 2016


On 5/5/2016 2:24 PM, Sergey Bylokhov wrote:

> On 05.05.16 14:11, Alexandr Scherbatiy wrote:
>>> Note that the component GConfig is not necessary the config which is
>>> used in drawing, and can be different from the GConfig of Graphics
>>> passed to the paint() method.
>>     This is still necessary change for the components size calculation
>> where graphics transform is not provided.
>
> I did not get it, the component can have one GraphicsCOnfiguration but 
> the graphics to which it paints can be from some other place like 
> backbuffer in Swing, or something like that. So you calculate the size 
> of the component based on one GC, but actually another one will be used.

    If a backbuffer has scale 1 on HiDPI display it will show a blurry 
text and some other artifacts like that. I believe it should have HiDPI 
scale.
    The fix only aligns the Swing font rendering context with the same 
transform scale.

    Thanks,
    Alexandr.
>
>>     Some of these changes can require the public API updated like
>> javax.swing.text.Utilities.drawTabbedText()/getTabbedTextOffset()
>> methods which use integer values instead of fractional.
>>     I would prefer to fix it in separate issues.
>
> Why not do it it at once? It will be better that push something and 
> then rollback.
>




More information about the swing-dev mailing list