[prev in list] [next in list] [prev in thread] [next in thread]
List: openjdk-swing-dev
Subject: Re: <Swing Dev> [13] RFR JDK-8213535:Windows HiDPI html lightweight tooltips are truncated
From: Sergey Bylokhov <Sergey.Bylokhov () oracle ! com>
Date: 2019-04-15 18:06:10
Message-ID: 4e294d89-d320-56cb-6178-8da5b7c8649e () oracle ! com
[Download RAW message or body]
On 14/04/2019 22:24, Prasanta Sadhukhan wrote:
> > Currently this rectangle is created based on the size of the component, so this \
> > rectangle is smaller that the size. But it looks like after the fix the rectangle \
> > will be bigger. Probably the bug exists in getPreferredSize() where we return \
> > small size?
> > Can you please confirm that this check will always work as expected:
> > 176 if (!font.getTransform().equals(((Graphics2D)g).getTransform())) \
> > { 177 AffineTransform tx = ((Graphics2D) g).getTransform();
> > 178 double scaleX = tx.getScaleX();
> > 179 double scaleY = tx.getScaleY();
> > 180 paintTextR.width = (int) Math.ceil(paintTextR.width * \
> > scaleX); 181 paintTextR.height = (int) \
> > Math.ceil(paintTextR.height * scaleY); 182 }
> > 183 v.paint(g, paintTextR);
> >
> I have checked the regression tests for JToolTip with this fix without any issue.
> > In what coordinate space the final paintTextR will be? I assume that that the \
> > v.paint() expects coordinate in the users space.
> Iguess the paintTextR will be in user space as BasicHTML.paint() says the rectangle \
> as the region to render to.
But your conversion "size*scale" will convert the size of the component to the device \
space. It is still unclear how we will draw the text in the v.paint() in the \
rectangle, which is bigger than the size of the related component?
--
Best regards, Sergey.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic