KDE 4.5 PyKDE API Reference

- KDE's Python API

# ClipPainter Class Reference

`from PyKDE4.marble import *`

Inherits: QPainter
Subclasses: Marble.GeoPainter
Namespace: Marble.ClipPainter

## Detailed Description

Abstract class:
  This class can be used as a base class for new classes, but can not be instantiated directly.

A QPainter that does viewport clipping for polygons

This class introduces fast polygon/polyline clipping for QPainter to increase the performance. Clipping is accomplished using an algorithm (by Torsten Rahn) that processes each polyline once. To keep things fast each possible scenario of two subsequent points is implemented case by case in a specialized handler which creates interpolated points and helper points.

## Methods

| __init__ (self)
| __init__ (self, QPaintDevice a0, bool a1)
| drawPolygon (self, QPolygonF a0, Qt::FillRule fillRule=Qt.OddEvenFill)
| drawPolyline (self, QPolygonF a0)
| drawPolyline (self, QPolygonF a0, QVector<QPointF> labelNodes, Marble.LabelPositionFlags labelPositionFlag=Marble.LineCenter)
bool | isClipping (self)
| setClipping (self, bool enable)

## Method Documentation

__init__ | ( |  | self ) |

__init__ | ( | self, |
|  | QPaintDevice | a0,
|  | bool | a1
| ) |  |  |

drawPolygon | ( | self, |
|  | QPolygonF | a0,
|  | Qt::FillRule | fillRule=Qt.OddEvenFill
| ) |  |  |

drawPolyline | ( | self, |
|  | QPolygonF | a0
| ) |  |  |

drawPolyline | ( | self, |
|  | QPolygonF | a0,
|  | QVector<QPointF> | labelNodes,
|  | Marble.LabelPositionFlags | labelPositionFlag=Marble.LineCenter
| ) |  |  |

bool isClipping | ( |  | self ) |

setClipping | ( | self, |
|  | bool | enable
| ) |  |  |