PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → How to combine drawing and shapes
How to combine drawing and shapes
Iniciado por guest, 18,nov. 2017 15:11 - 2 respuestas
Publicado el 18,noviembre 2017 - 15:11
Hi all - this is a little complicated. Let's just say I MUST be able to create shapes using a Stack and Push and Pop for example. That requires me to place an Image control on an Internal Window. That works perfectly.

I also need to allow freehand drawing on an Image using the dDrawing functions. That works perfectly.

But how do I combine the two? Or is there a freehand function using a Stack? I know a stack is just that but instead of creating a Shape it would be nice to allow free hand text.

What I did was to create an Image Control in a Stack. I then disabled the ability to edit and initiated my Drawing functions. But I was unable to draw on the Image in the stack.

Has anyone done anything like this? Thx.
Publicado el 18,noviembre 2017 - 16:00
Hi John

I haven't done this exactly, but I don't see why it wouldn't work...

If the code you use for drawing works on your image control alone, but not when the image control has other controls on top, then move the other controls away while yo are drawing, or change their z values to put them below the drawing control...

You could also try using an image control with an invisible background, stacked on top of everything else, and draw in that one...

Best regards
Publicado el 18,noviembre 2017 - 16:04
Thx Fabrice. I will try the invisible Image technique. However whatever is done in there is not added to the "stack" as it will have a different name. Maybe I could just add that transparent image to the stack manually so to speak?