Support #1119
closedlayers on painted/generated images
0%
Description
Dear developers!
I was wandering if it is possible to set layers on a painted image (WPaintedWidget).
I've to generate a complex diagram with a selection tool. While dragging on it a selection rectangle would be appeared.
Iin my solution I have to re-generate the whole picture in every step of dragging which makes the process very slow.
If I could store graphical data in layers, it would bring a considerable speed-up I guess.
Is there any solution to solve this?
Thank you in advance!
Best regards,
Daniel
Updated by Koen Deforche almost 13 years ago
- Status changed from New to Resolved
Hey,
Indeed, you can render multiple wwidgets (including WPaintedWidgets) on top of each other.
The best way to do this is to create a WContainerWidget with two children, and then apply the following CSS:
.parent {
position: relative;
width: 200px;
height: 100px;
}
.parent .child {
position: absolute;
left: 0px;
top: 0px;
width: 200px;
height: 100px;
}
Note that you will need to use fixed width and height (this can also be done using resize() on the widgets involved).
With more complexity, you can also support dynamically sized widgets.
Regards,
koen
Updated by Koen Deforche over 12 years ago
- Status changed from Resolved to Closed
- Target version set to 3.2.1