If you are not using the BACKIMAGE attribute, IupBackgroundBox doesn't
draw on the canvas, and all the canvas callbacks are available.

 IupBackgroundBox is not a different control than a IupCanvas. It is
exactly the same, but it has support for distributing elements on top of
it. It was designed so you can draw on the background that lays behind
other elements.

The IupFlatFrame element is an example. It draws its own IupFrame like
container. But I would like to avoid the CD dependency in this case so I
used the IupDraw API instead. But CD could be used.

CD drawing was designed in another age when we can draw anytime on the
canvas.

 Drawing behind a native element has some limitations. You have to
cooperate with the other controls. IupDraw was designed with that in mind.
Again this does not invalidate the use of CD.

 And then we reach the same conclusion as you did, when drawing outside the
ACTION callback sometimes you will get weird results when the child
elements are also drawn. It may work but I don't think it will always work.
Especially in modern OS where drawing is buffered.

Best,
Scuri


Em ter., 22 de jun. de 2021 às 14:36, Isaac Raway <is...@mm.st> escreveu:

> I attempted to draw directly to it as with a canvas, but this didn't seem
> to work properly for some reason. I think it is because my code draws at
> times other than in response to an ACTION which seems to not be supported
> for this control?
>
> Get Outlook for Android <https://aka.ms/AAb9ysg>
>
> _______________________________________________
> 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