[Interest] Multiple rectangles or any shapes in Scene Graph plugin?
Mark
markg85 at gmail.com
Wed Jun 5 19:14:05 CEST 2013
Hi,
Another day, another Scene Graph question.
In plain QML it's very easy to make a few rectangles laying on top of
each other. I'm having trouble doing the same thing in a Scene Graph
QML Component plugin (updatePaintNode specifically).
What i want to do is draw a few shapes. One is a plain simple
rectangle where i want to draw multiple lines (to make a grid). each
line is probably it's own QSGGeometry::Point2D so there is issue one.
How can i have multiple lines?
Even if i get that done, i still want to put another "layer" on top of
that grid to display something. Like a line graph/chart.
Or is the right approach to think very abstract here and have - lets
say - 3 different custom components.
1. background
2. grid
3. custom shape on top of grid
If that's the case then i'd still like to know how i can draw multiple
lines from within updatePaintNode :)
In QML that would look like this:
CustomRectangle {
width: 200
height: 200
CustomGrid {
anchors.fill: parent
}
CustomShape {
anchors.fill: parent
}
}
Note: in case you're wondering. The result i'm trying to get is
somewhat like this [1] only with settable colors.
Regards,
Mark
[1] http://i.stack.imgur.com/Zk2RG.png
More information about the Interest
mailing list