QCanvasSpline(3qt)

πŸ“¦ version 3.3.8b, in fedora 43, fedora 44

🌸 NAME 🌸

okay so bestie, let me introduce you to QCanvasSpline β€” it's literally multi-bezier splines on a QCanvas. that's the whole vibe. πŸ’…


✨ SYNOPSIS ✨

#include <qcanvas.h>

Inherits QCanvasPolygon.

πŸ‘‘ Public Members

QCanvasSpline ( QCanvas * canvas )
~QCanvasSpline ()
void setControlPoints ( QPointArray ctrl, bool close = TRUE )
QPointArray controlPoints () const
bool closed () const
virtual int rtti () const

πŸ¦‹ DESCRIPTION πŸ¦‹

so the QCanvasSpline class provides multi-bezier splines on a QCanvas. that's the main character energy right there. ✨

a QCanvasSpline is a sequence of 4-point bezier curves joined together to make a curved shape. it's giving... curves. slay.

you set the control points of the spline with setControlPoints().

here's the tea though πŸ«– β€” if the bezier is closed(), then the first control point will be re-used as the last control point. so a closed bezier must have a multiple of 3 control points, and an open bezier must have one extra point. no cap, that's just how it is.

⚠️ also important bestie: the beziers are not necessarily joined "smoothly". to ensure this, set control points appropriately (general reference texts about beziers will explain this in detail). so like, don't come for me if your curve looks janky β€” that's a you-and-your-control-points problem 😭

like any other canvas item, splines can be moved with QCanvasItem::move() and QCanvasItem::moveBy(), or by setting coordinates with QCanvasItem::setX(), QCanvasItem::setY() and QCanvasItem::setZ(). move that thing, queen. πŸ’…

See also Graphics Classes and Image Processing Classes.


πŸ’– MEMBER FUNCTION DOCUMENTATION πŸ’–

QCanvasSpline::QCanvasSpline ( QCanvas * canvas )

create a spline with no control points on the canvas canvas. a blank canvas, an empty slate, a fresh start. πŸŽ€

See also setControlPoints().


QCanvasSpline::~QCanvasSpline ()

destroy the spline. rip to the spline, it lived a good life. πŸ’€


bool QCanvasSpline::closed () const

returns TRUE if the control points are a closed set; otherwise returns FALSE. is it closed or is it open? the suspense. πŸ™ˆ


QPointArray QCanvasSpline::controlPoints () const

returns the current set of control points.

See also setControlPoints() and closed().


int QCanvasSpline::rtti () const [virtual]

returns 8 (QCanvasItem::Rtti_Spline). that's its whole identity number, its little ID card. πŸͺͺ

See also QCanvasItem::rtti().

Reimplemented from QCanvasPolygon.


void QCanvasSpline::setControlPoints ( QPointArray ctrl, bool close = TRUE )

set the spline control points to ctrl.

if close is TRUE, then the first point in ctrl will be re-used as the last point, and the number of control points must be a multiple of 3. if close is FALSE, one additional control point is required, and the number of control points must be one of (4, 7, 10, 13, ...).

🚨 if the number of control points doesn't meet the above conditions, the number of points will be truncated to the largest number of points that do meet the requirement. so extra points just get βœ‚οΈ chopped. it's not an error, it's just... trimming the edges, bestie.

Example: canvas/canvas.cpp.


πŸ”₯ SEE ALSO πŸ”₯


Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the license file included in the distribution for a complete license statement.


🌈 AUTHOR 🌈

Generated automatically from the source code. (yes bestie, a machine wrote it. iconic behavior honestly. πŸ€–βœ¨)


πŸ’€ BUGS πŸ’€

if you find a bug in Qt, please report it as described in http://doc.trolltech.com/bughowto.html. good bug reports help us to help you. thank you. πŸ™

the definitive Qt documentation is provided in HTML format; it is located at $QTDIR/doc/html and can be read using Qt Assistant or with a web browser. this man page is provided as a convenience for those users who prefer man pages, although this format is not officially supported by Trolltech. (so like, don't @ them about it, fr fr.)

if you find errors in this manual page, please report them to qt-bugs@trolltech.com. please include the name of the manual page (qcanvasspline.3qt) and the Qt version (3.3.8). 🫢


and that's a wrap on QCanvasSpline(3qt), bestie β€” brought to you by Trolltech AS, dated 2 February 2007, and yes the Qt version in question is 3.3.8. mwah. πŸ’‹βœ¨

πŸ“¦ where this page comes from