Draw bezier curve in qt

742 views
Skip to first unread message

illunara

unread,
Mar 7, 2013, 10:44:04 PM3/7/13
to python_in...@googlegroups.com
Hi everybody
How can i draw a bezier curve in QT?, is QPainterPath the one i need? Also, can i use a SVG file as a QRect?

Thanks

Justin Israel

unread,
Mar 7, 2013, 11:03:06 PM3/7/13
to python_in...@googlegroups.com
Ya, QPainterPath provides "cubicTo":
"Adds a cubic Bezier curve between the current position and the given endPoint using the control points specified by c1, andc2."

What do you mean by using an SVG as a QRect? Do you meant to get a bounding box from it?



--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To post to this group, send email to python_in...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



Tuan Nguyen

unread,
Mar 7, 2013, 11:29:10 PM3/7/13
to python_in...@googlegroups.com
Ah, yes, sorry Justin, i mean bounding box.


--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/CggcLwR1jVs/unsubscribe?hl=en-US.
To unsubscribe from this group and all its topics, send an email to python_inside_m...@googlegroups.com.

Justin Israel

unread,
Mar 7, 2013, 11:56:15 PM3/7/13
to python_in...@googlegroups.com
QSvgRenderer has a boundsOnElement() method which gives you the bounding box of a specific element in an svg file:

Tuan Nguyen

unread,
Mar 8, 2013, 12:11:15 AM3/8/13
to python_in...@googlegroups.com
Oh, it returns an QRectF, so we can use it later. As always, thank Justin XD
Reply all
Reply to author
Forward
0 new messages