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

List:       openjdk-2d-dev
Subject:    Re: Re[2]: Any interest in JDK-8264999 (stroke miter edge case in Marlin)
From:       Laurent_Bourgès <bourges.laurent () gmail ! com>
Date:       2022-05-29 7:31:36
Message-ID: CAKjRUT6XjXmY_O_qsPLYZ4XELgnFf71_Dr4C5vEUj-UqqFu_5g () mail ! gmail ! com
[Download RAW message or body]

One more general comment on this bug:
what is expected when lineTo() does not change last point after all other
possible operations ?
- lineTo, lineto (this bug)
- quadTo, lineto
- cubicTo, lineto
- moveto, lineto: point (ok)
- close, lineto(star: equiv to close, move start, lineto start: point start
(ok ?)

If any drawing operation in progress (lineto, quadto, curveto), then skip
repeated end point is the specified behaviour.

Laurent

Le mer. 25 mai 2022, 08:57, Laurent Bourgès <bourges.laurent@gmail.com> a
écrit :

> In Stroker, this lines seems causing the problem:
> 
> https://github.com/openjdk/jdk/blob/a0cccb54791d954bf08da5aac9b9794e370617c8/src/java.desktop/share/classes/sun/java2d/marlin/Stroker.java#L568
>  
> If delta is 0, then tangent is (1, 0) !
> Should be:
> If drawOp was lineTo and delta is 0, return (skip).
> 
> I wonder if there are other renderer suffering the same problem.
> Phil, how could we generalize this kind of path operation filtering ?
> 
> My 2 cents,
> Laurent
> 
> Le mer. 25 mai 2022, 08:15, Laurent Bourgès <bourges.laurent@gmail.com> a
> écrit :
> 
> > Jeremy,
> > 
> > Probably your fix could be plugged in marlin pathTo() :
> > 
> > https://github.com/openjdk/jdk/blob/742644e291039e4f2f30cf80718669c06da5809c/src/java.desktop/share/classes/sun/java2d/marlin/DMarlinRenderingEngine.java#L768
> >  
> > Or in Stroker lineTo...
> > 
> > Laurent
> > 
> > Le mar. 24 mai 2022, 22:55, Jeremy Wood <mickleness@gmail.com> a écrit :
> > 
> > > I may still move it in the Stroker classes. There are a few other things
> > > I want to look at, too. This is a very rough draft I put together in
> > > under an hour; I just wanted to make sure it was worth pursuing before I
> > > put more time into it.
> > > 
> > > - Jeremy
> > > 
> > > 
> > > ------ Original Message ------
> > > From "Laurent Bourgès" <bourges.laurent@gmail.com>
> > > To "Jeremy Wood" <mickleness@gmail.com>
> > > Cc client-libs-dev@openjdk.java.net
> > > Date 5/24/2022 4:35:21 PM
> > > Subject Re: Any interest in JDK-8264999 (stroke miter edge case in
> > > Marlin)
> > > 
> > > > Thanks Jereremy for the notification I was not aware of this one.
> > > > 
> > > > I wonder if the problem should be fixed inside the marlin renderer
> > > > Stroker that should ignore such useless lineTo...
> > > > 
> > > > I will read your code and try to figure out potential causes in stroker
> > > > and give you my feedback.
> > > > 
> > > > Laurent
> > > > 
> > > > Le mar. 24 mai 2022, 19:52, Jeremy Wood <mickleness@gmail.com> a écrit
> > > > > 
> > > > > This is a P3 ticket currently assigned to Philip Race:
> > > > > https://bugs.openjdk.java.net/browse/JDK-8264999
> > > > > 
> > > > > If I put together a PR: Is anyone available/willing to help review it?
> > > > > 
> > > > > I made a rough draft
> > > > > <
> > > https://github.com/openjdk/jdk/compare/master...mickleness:JDK-8264999?expand=1
> > > > 
> > > > > of a potential solution last night. I can continue to work on this, or
> > > > > I
> > > > > can move on if the interest isn't there.
> > > > > 
> > > > > (No urgency at all.)
> > > > > 
> > > > > Regards,
> > > > > - Jeremy
> > > > > <https://>
> > > 
> > 


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

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