Sorry to double post, I figured out how to rotate the curve. I am now confused as to how to rotate the symbols on the curve. If anyone could provide insight that would be excellent!
Sorry to double post, I figured out how to rotate the curve. I am now confused as to how to rotate the symbols on the curve. If anyone could provide insight that would be excellent!
Do you mean to actually rotate the symbols themselves (like a square becomes a diamond when rotated 90 degrees), or just rotate the locations of the symbols to correspond to the new curve location?
To rotate the symbol locations, you apply the same transformation as you do for the points in the curve. I don't think there is any way to rotate the symbol icons themselves, except by deriving a new class from QwtSymbol and applying the transform to the QPainter in the paint() method before calling QwtSymbol:: paint(). (Maybe it is in the paint event, don't have Qwt sources in front of me so I don't know exactly where drawing takes place).
If you do that, you may have to translate the center of the symbol to the origin first before rotating, then translate back to its correct location. Be sure to remove the transform from the painter before leaving your paint method, otherwise everything that follows will be wonky.
Edit: It is possible that QwtPlot caches symbols like it does tick labels and other things. So you may also have to force it to clear the cache before your rotated symbols will be drawn correctly. Don't know this for sure either.
hypnotic401 (21st June 2011)
I figured it out. It was in the way I was rotating the painter. The correct way of doing it you had listed as your first option. I transformed the painter to the rectangles center (of the qwtsymbol) then rotate the painter and translated it back to the original center. Thank you for you input though! I ended up using my friend google XD
SEGMENTATION FAULT: At who the hell knows where.
Bookmarks