Hi,

  The SHOW attribute will scroll only if the given cell is not visible.

  The ORIGIN attribute always positions the given cell at the top left
corner regardless if it was visible or not.

  A matrix with lots of lines will be slow only if its lines are visible.
The matrix renders only the visible cells.

  Scrolling with the wheel is slow because it will redraw many times, one
for every wheel event which is usually much more that the scrollbar itself
being dragged.

  Scrolling with ORIGIN shouldn't be a problem. One thing that occurs to me
is that the scrollbar must be also updated, if you turn off the scrollbars
the process may be faster, but you will be able to scroll only using the
ORIGIN attribute. But you can turn it off only when performance is needed,
for instance.

  I notice that in GTK 3 a scroll is drawing the matrix twice. I don't
think it is a GTK problem. It may be something related with the redraw
function we use, but I couldn't solve it.

Best,
Scuri


Em qua., 2 de dez. de 2020 às 12:27, Johann Philippe via Iup-users <
iup-users@lists.sourceforge.net> escreveu:

> Duration is between 5 and 7 milliseconds per matrix when setting "ORIGIN"
> attribute.
>
> Le mercredi 2 décembre 2020 à 16:02:11 UTC+1, Johann Philippe via
> Iup-users <iup-users@lists.sourceforge.net> a écrit :
>
>
> Dear all,
>
> I'm using several IupMatrix (more than 10, can be up to 20) in my musical
> application (on Linux, mint 20), and those matrixes can have a lot of
> lines.
> I noticed that scrolling is a bit slow when I scroll with mouse wheel.
> And it's even worst when the scrolling is done programatically with the
> "ORIGIN" attribute.
> When I say slow, I mean it's more than a few milliseconds, which is a big
> deal in a musical software, where many graphic elements are redrawn at
> something like 30 frame per second. In some context, the matrixes "ORIGIN"
> attribute can be reset several times per second, which is slowing the other
> graphical elements.
> Is it related to the IupMatrix itself ?
> Is there a quicker way to scroll programatically?
> Is the "SHOW" attribute quicker ? And if so, I couldn't find a way to make
> it work.
>
> Thank you !
>
> Johann
> _______________________________________________
> Iup-users mailing list
> Iup-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/iup-users
> _______________________________________________
> Iup-users mailing list
> Iup-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/iup-users
>
_______________________________________________
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users

Reply via email to