[Qt-interest] Polyline clipping

Sean Harmer sean.harmer at maps-technology.com
Tue Aug 25 15:35:41 CEST 2009


Hi Andre,

On Tuesday 25 Aug 2009 08:28:34 Andre Haupt wrote:
> Hi all,
>
> Is there a way to clip a polyline (non closed QPolygonF) by a rectangle
> *before* drawing the polyline with QPainter::drawPolyline()?
>
> This clipping would of course produce a bunch of new polylines, maybe
> a QList<QPolygonF>?
>
> I did not find such a method in the docs. Or didn't i look hard enough?
I cannot recall such a method in Qt but it should not be too hard to do this 
yourself. Fairly simple to find the intersection of two line segments.

Sorry I can't be of more help.

Sean



More information about the Qt-interest-old mailing list