QwtClipper(3)

πŸ’… QwtClipper(3) β€” Library Functions Manual

okay bestie, welcome to the glow-up era of clipping πŸ’– this is the QwtClipper page out of the Qwt User's Guide, and it's literally just clipping algorithms. that's the whole vibe. no cap.


✨ NAME ✨

QwtClipper β€” some clipping algorithms. that's it. that's the name. iconic minimalism πŸŽ€


🌸 SYNOPSIS 🌸

πŸ¦‹ Functions

QWT_EXPORT void clipPolygon (const QRect &, QPolygon &, bool
    closePolygon=false)
QWT_EXPORT void clipPolygon (const QRectF &, QPolygon &, bool
    closePolygon=false)
QWT_EXPORT void clipPolygonF (const QRectF &, QPolygonF &, bool
    closePolygon=false)
QWT_EXPORT QPolygon clippedPolygon (const QRect &, const QPolygon &,
    bool closePolygon=false)
QWT_EXPORT QPolygon clippedPolygon (const QRectF &, const QPolygon &,
    bool closePolygon=false)
QWT_EXPORT QPolygonF clippedPolygonF (const QRectF &, const QPolygonF &,
    bool closePolygon=false)
QWT_EXPORT QVector< QwtInterval > clipCircle (const QRectF &, const
    QPointF &, double radius)

seven whole functions, all QWT_EXPORT, all here to clip your stuff πŸ”₯


🌈 Detailed Description 🌈

Some clipping algorithms.

that's the official description and honestly? she said what she said πŸ’… this class is the clip queen β€” polygons, circles, rectangles, all of it.


πŸ‘‘ Function Documentation πŸ‘‘

πŸ“ QVector< QwtInterval > QwtClipper::clipCircle (const QRectF & clipRect, const QPointF & center, double radius)

Circle clipping πŸŒ€

so clipCircle() divides a circle into intervals of angles, and those intervals represent arcs of the circle. and the cutest part: when the circle is completely inside the clip rectangle, you get an interval [0.0, 2 * M_PI] back. full circle, no notes, she ate πŸ’–

Parameters

  • clipRect β€” Clip rectangle
  • center β€” Center of the circle
  • radius β€” Radius of the circle

Returns

Arcs of the circle ✨

Definition at line 477 of file qwt_clipper.cpp.


🧚 QPolygon QwtClipper::clippedPolygon (const QRect & clipRect, const QPolygon & polygon, bool closePolygon = false)

Sutherland-Hodgman polygon clipping βœ‚οΈ

Parameters

  • clipRect β€” Clip rectangle
  • polygon β€” Polygon
  • closePolygon β€” True, when the polygon is closed

Returns

Clipped polygon 🫢

Definition at line 437 of file qwt_clipper.cpp.


🌸 QPolygon QwtClipper::clippedPolygon (const QRectF & clipRect, const QPolygon & polygon, bool closePolygon = false)

Sutherland-Hodgman polygon clipping βœ‚οΈ (the QRectF remix πŸ’«)

Parameters

  • clipRect β€” Clip rectangle
  • polygon β€” Polygon
  • closePolygon β€” True, when the polygon is closed

Returns

Clipped polygon 🫢

Definition at line 420 of file qwt_clipper.cpp.


πŸ’œ QPolygonF QwtClipper::clippedPolygonF (const QRectF & clipRect, const QPolygonF & polygon, bool closePolygon = false)

Sutherland-Hodgman polygon clipping βœ‚οΈ but make it float β€” note the F on the end, she's fancy 🌟

Parameters

  • clipRect β€” Clip rectangle
  • polygon β€” Polygon
  • closePolygon β€” True, when the polygon is closed

Returns

Clipped polygon 🫢

Definition at line 455 of file qwt_clipper.cpp.


πŸŽ€ void QwtClipper::clipPolygon (const QRect & clipRect, QPolygon & polygon, bool closePolygon = false)

Sutherland-Hodgman polygon clipping βœ‚οΈ

heads up bestie: polygon here is IN/OUT β€” she gets mutated in place, no return value, she just changes 😭

Parameters

  • clipRect β€” Clip rectangle
  • polygon β€” Polygon IN/OUT
  • closePolygon β€” True, when the polygon is closed

Definition at line 390 of file qwt_clipper.cpp.


⭐ void QwtClipper::clipPolygon (const QRectF & clipRect, QPolygon & polygon, bool closePolygon = false)

Sutherland-Hodgman polygon clipping βœ‚οΈ (yes, the QRectF version, she's a different overload, don't @ me)

again: polygon is IN/OUT β€” in-place mutation energy πŸ‘‘

Parameters

  • clipRect β€” Clip rectangle
  • polygon β€” Polygon IN/OUT
  • closePolygon β€” True, when the polygon is closed

Definition at line 369 of file qwt_clipper.cpp.


πŸ¦‹ void QwtClipper::clipPolygonF (const QRectF & clipRect, QPolygonF & polygon, bool closePolygon = false)

Sutherland-Hodgman polygon clipping βœ‚οΈ floating-point edition πŸ’«

and yup, polygon is IN/OUT here too β€” mutated right in place ✨

Parameters

  • clipRect β€” Clip rectangle
  • polygon β€” Polygon IN/OUT
  • closePolygon β€” True, when the polygon is closed

Definition at line 404 of file qwt_clipper.cpp.


🫢 Author 🫢

Generated automatically by Doxygen for Qwt User's Guide from the source code.

(no human author credited, it's a robot doing its thing πŸ€–πŸ’…)


aaaaand that's the whole page, bestie β€” every function, every parameter, every default, every Definition at line reference, all accounted for, no cap πŸ’–βœ¨

real talk: closePolygon = false everywhere, so unless you flip it to true for closed polygons, she's open by default πŸŽ€

and that's a wrap on QwtClipper(3) from the Qwt User's Guide β€” this cutie came straight from the source code, so go forth and clip slayfully πŸ‘‘πŸ’œ πŸ¦‹

πŸ“¦ where this page comes from