KoViewConverter Class Reference

The interface for view conversions. More...

#include <KoViewConverter.h>

Inheritance diagram for KoViewConverter:

KoZoomHandler List of all members.

Public Member Functions

virtual QPointF documentToView (const QPointF &documentPoint) const =0
 Convert a coordinate in pt to pixels.
virtual QPointF viewToDocument (const QPointF &viewPoint) const =0
 Convert a coordinate in pixels to pt.
virtual QRectF documentToView (const QRectF &documentRect) const =0
 Convert a rectangle in pt to pixels.
virtual QRectF viewToDocument (const QRectF &viewRect) const =0
 Convert a rectangle in pixels to pt.
virtual QSizeF documentToView (const QSizeF &documentSize) const =0
 Convert a size in pt to pixels.
virtual QSizeF viewToDocument (const QSizeF &viewSize) const =0
 Convert a size in pixels to pt.
virtual double documentToViewX (double documentX) const =0
 Convert a single x coordinate in pt to pixels.
virtual double documentToViewY (double documentY) const =0
 Convert a single y coordinate in pt to pixels.
virtual double viewToDocumentX (double viewX) const =0
 Convert a single x coordinate in pixels to pt.
virtual double viewToDocumentY (double viewY) const =0
 Convert a single y coordinate in pixels to pt.
virtual void zoom (double *zoomX, double *zoomY) const =0
 Retrieve the zoom levels of the individual x and y axes.

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.


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 double KoViewConverter::documentToViewX ( double  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 double KoViewConverter::documentToViewY ( double  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 double KoViewConverter::viewToDocumentX ( double  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 double KoViewConverter::viewToDocumentY ( double  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 ( double *  zoomX,
double *  zoomY 
) const [pure virtual]

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

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

Implemented in KoZoomHandler.


The documentation for this class was generated from the following file:
Generated on Sun Jul 20 22:37:42 2008 for libs by  doxygen 1.4.7