libs/flake

KoViewConverter Class Reference

The interface for view conversions. More...

#include <KoViewConverter.h>

Inheritance diagram for KoViewConverter:

List of all members.

Public Member Functions

 KoViewConverter ()
virtual ~KoViewConverter ()
virtual QSizeF documentToView (const QSizeF &documentSize) const =0
virtual QRectF documentToView (const QRectF &documentRect) const =0
virtual QPointF documentToView (const QPointF &documentPoint) const =0
virtual qreal documentToViewX (qreal documentX) const =0
virtual qreal documentToViewY (qreal documentY) const =0
virtual QSizeF viewToDocument (const QSizeF &viewSize) const =0
virtual QRectF viewToDocument (const QRectF &viewRect) const =0
virtual QPointF viewToDocument (const QPointF &viewPoint) const =0
virtual qreal viewToDocumentX (qreal viewX) const =0
virtual qreal viewToDocumentY (qreal viewY) const =0
virtual void zoom (qreal *zoomX, qreal *zoomY) const =0

Detailed Description

The interface for view conversions.

All KoShape based objects are using a postscript-point (pt) based measurement system which requires a conversion to view coordinates (in pixel sizes) at the moment we are painting, and a conversion to the normalized coordinate system if we receive mouse events so we can figure out which KoShape object was touched.

Definition at line 33 of file KoViewConverter.h.


Constructor & Destructor Documentation

KoViewConverter::KoViewConverter (  )  [inline]

Definition at line 36 of file KoViewConverter.h.

virtual KoViewConverter::~KoViewConverter (  )  [inline, virtual]

Definition at line 37 of file KoViewConverter.h.


Member Function Documentation

virtual QSizeF KoViewConverter::documentToView ( const QSizeF documentSize  )  const [pure virtual]

Convert a size in pt to pixels.

Parameters:
documentSize the size in pt.
Returns:
the size in pixels.

Implemented in KoZoomHandler.

virtual QRectF KoViewConverter::documentToView ( const QRectF documentRect  )  const [pure virtual]

Convert a rectangle in pt to pixels.

Parameters:
documentRect the rect in the document coordinate system of a KoShape.

Implemented in KoZoomHandler.

virtual QPointF KoViewConverter::documentToView ( const QPointF documentPoint  )  const [pure virtual]

Convert a coordinate in pt to pixels.

Parameters:
documentPoint the point in the document coordinate system of a KoShape.

Implemented in KoZoomHandler.

virtual qreal KoViewConverter::documentToViewX ( qreal  documentX  )  const [pure virtual]

Convert a single x coordinate in pt to pixels.

Parameters:
documentX the x coordinate in pt.
Returns:
the x coordinate in pixels.

Implemented in KoZoomHandler.

virtual qreal KoViewConverter::documentToViewY ( qreal  documentY  )  const [pure virtual]

Convert a single y coordinate in pt to pixels.

Parameters:
documentY the y coordinate in pt.
Returns:
the y coordinate in pixels.

Implemented in KoZoomHandler.

virtual QSizeF KoViewConverter::viewToDocument ( const QSizeF viewSize  )  const [pure virtual]

Convert a size in pixels to pt.

Parameters:
viewSize the size in pixels.
Returns:
the size in pt.

Implemented in KoZoomHandler.

virtual QRectF KoViewConverter::viewToDocument ( const QRectF viewRect  )  const [pure virtual]

Convert a rectangle in pixels to pt.

Parameters:
viewRect the rect in the coordinate system of the widget, or window.

Implemented in KoZoomHandler.

virtual QPointF KoViewConverter::viewToDocument ( const QPointF viewPoint  )  const [pure virtual]

Convert a coordinate in pixels to pt.

Parameters:
viewPoint the point in the coordinate system of the widget, or window.

Implemented in KoZoomHandler.

virtual qreal KoViewConverter::viewToDocumentX ( qreal  viewX  )  const [pure virtual]

Convert a single x coordinate in pixels to pt.

Parameters:
viewX the x coordinate in pixels.
Returns:
the x coordinate in pt.

Implemented in KoZoomHandler.

virtual qreal KoViewConverter::viewToDocumentY ( qreal  viewY  )  const [pure virtual]

Convert a single y coordinate in pixels to pt.

Parameters:
viewY the y coordinate in pixels.
Returns:
the y coordinate in pt.

Implemented in KoZoomHandler.

virtual void KoViewConverter::zoom ( qreal *  zoomX,
qreal *  zoomY 
) const [pure virtual]

Retrieve the zoom levels of the individual x and y axes.

Parameters:
zoomX a pointer to a qreal which will be modified to the horizontal zoom.
zoomY a pointer to a qreal which will be modified to the vertical zoom.

Implemented in KoZoomHandler.


The documentation for this class was generated from the following file: