Trying to understand how to read object coordinates flags from xmap #2448
Replies: 2 comments 2 replies
-
It is simple: Basically almost everything is attached to the first point of a (straight or curved) primitve. With beziers, there are start point (on path), first handle, second handle, end point (on path. You can sort-of see it in the symbol editor:
So the first point carries a curve start property. It is the lowest bit of the flags. Lines 77 to 96 in 3d5bc45 It is really written out here: Lines 220 to 229 in 3d5bc45
Off-topic for the file format. This is for the operation of deleting the point between two bezier segments. |
Beta Was this translation helpful? Give feedback.
-
|
The actual calculation and drawing of the bezier is done by https://doc.qt.io/qt-6/qpainterpath.html#cubicTo. |
Beta Was this translation helpful? Give feedback.



Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
How does the flags work really? I did read about them on the wiki, I'm used to Java, so doesn't understand the c++ code so well.
But how do I know which is the control points for my bézier calculation when reading the xmap file? I haven't found any logic in it really, it seems as sometimes it's the coordinate that's before and after the node, but sometimes it just jumps over coordinates, a bit weird.
I also got a bit scared when seeing this in the code:
mapper/src/core/objects/object.cpp
Line 1621 in 3d5bc45
// Wilmer
Beta Was this translation helpful? Give feedback.
All reactions