krita/ui

KisImageViewConverter Class Reference

ViewConverter to convert from flake-internal points to krita-internal pixels and back. More...

#include <kis_image_view_converter.h>

Inheritance diagram for KisImageViewConverter:

List of all members.

Public Member Functions

 KisImageViewConverter (const KisImageWSP image)
QSizeF documentToView (const QSizeF &documentSize) const
QRectF documentToView (const QRectF &documentRect) const
QPointF documentToView (const QPointF &documentPoint) const
qreal documentToViewX (qreal documentX) const
qreal documentToViewY (qreal documentY) const
QSizeF viewToDocument (const QSizeF &viewSize) const
QRectF viewToDocument (const QRectF &viewRect) const
QPointF viewToDocument (const QPointF &viewPoint) const
qreal viewToDocumentX (qreal viewX) const
qreal viewToDocumentY (qreal viewY) const
void zoom (qreal *zoomX, qreal *zoomY) const

Detailed Description

ViewConverter to convert from flake-internal points to krita-internal pixels and back.

You can use this class whereever the flake tools or shapes come in contact with the krita-image.

For usage remember that the document here is the flake-points. And the view is the krita-pixels.

Definition at line 36 of file kis_image_view_converter.h.


Constructor & Destructor Documentation

KisImageViewConverter::KisImageViewConverter ( const KisImageWSP  image  ) 

constructor

Parameters:
image the image this viewConver works for.

Definition at line 21 of file kis_image_view_converter.cpp.


Member Function Documentation

QSizeF KisImageViewConverter::documentToView ( const QSizeF documentSize  )  const

convert from krita to flake units

Definition at line 51 of file kis_image_view_converter.cpp.

QRectF KisImageViewConverter::documentToView ( const QRectF documentRect  )  const

convert from flake to krita units

Definition at line 39 of file kis_image_view_converter.cpp.

QPointF KisImageViewConverter::documentToView ( const QPointF documentPoint  )  const

convert from flake to krita units

Definition at line 29 of file kis_image_view_converter.cpp.

qreal KisImageViewConverter::documentToViewX ( qreal  documentX  )  const [inline]

convert from flake to krita units

Definition at line 64 of file kis_image_view_converter.h.

qreal KisImageViewConverter::documentToViewY ( qreal  documentY  )  const [inline]

convert from flake to krita units

Definition at line 69 of file kis_image_view_converter.h.

QSizeF KisImageViewConverter::viewToDocument ( const QSizeF viewSize  )  const

convert from krita to flake units

Definition at line 56 of file kis_image_view_converter.cpp.

QRectF KisImageViewConverter::viewToDocument ( const QRectF viewRect  )  const

convert from krita to flake units

Definition at line 45 of file kis_image_view_converter.cpp.

QPointF KisImageViewConverter::viewToDocument ( const QPointF viewPoint  )  const

convert from krita to flake units

Definition at line 34 of file kis_image_view_converter.cpp.

qreal KisImageViewConverter::viewToDocumentX ( qreal  viewX  )  const [inline]

convert from krita to flake units

Definition at line 74 of file kis_image_view_converter.h.

qreal KisImageViewConverter::viewToDocumentY ( qreal  viewY  )  const [inline]

convert from krita to flake units

Definition at line 79 of file kis_image_view_converter.h.

void KisImageViewConverter::zoom ( qreal *  zoomX,
qreal *  zoomY 
) const

reimplemented from superclass

Definition at line 61 of file kis_image_view_converter.cpp.


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