> Sent: Monday, January 29, 2018 at 5:53 PM
> From: "Sze Howe Koh" <szehowe....@gmail.com>
> To: "Jason H" <jh...@gmx.com>
> Cc: "interestqt-project.org" <interest@qt-project.org>
> Subject: Re: [Interest] How to make a looping element?
>
> On 30 January 2018 at 03:07, Jason H <jh...@gmx.com> wrote:
> >
> > This is more like a rotation.. I'm looking for the other kind of rotation 
> > where bearing % 360 can go from 359 to 1, without sweeping backwards while 
> > animating the sweep.  Rather than sweep, I'd prefer to seek
> > 0----90----180----270----360
> >  ------>----------> increase
> > <------------------ sweep back (how can I avoid this?)
> 
> Two things come to mind:
> 
> 1. Use relative moves instead of absolute moves. E.g. instead of "359°
> to 1°", do "359° + 2°"
> 2. Support values <= 0° and >= 360°. E.g. instead of "359° to 1°", do
> "359° to 361°". After the animation is done, you can normalize "361°"
> -> "1°" (optional)

I got a somewhat usable result by checking the delta and if over 350, it 
disables the animation entirely and when it falls back below 120, it 
re-enables. This produces a little jumpiness a few degrees around 0, but is 
otherwise very good.

_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to