Main Page | Modules | Class Hierarchy | Class List | File List | Class Members | Related Pages

ZoomFactor Class Reference

#include <Zoom.h>

List of all members.

Public Member Functions

 ZoomFactor (float x=0, float y=0, float zoom=1, int resX=1, int resY=1)
void setOrg (QCoords a)
QPoint convert (float, float)
QCoords invert (int, int)
QCoords invert (QPoint)
void setZoomFactor (double)
void setRes (int resX, int resY)
double getZoomFactor ()
double convertYLength (double)
double convertXLength (double)
double getEffectiveXZoomFactor ()
double getEffectiveYZoomFactor ()
double getZoom ()
void zoom (float, QCoords)
QString toString ()

Public Attributes

double x
double y


Detailed Description

class representing a zoom factor *


Constructor & Destructor Documentation

ZoomFactor::ZoomFactor float  x1 = 0,
float  y1 = 0,
float  z = 1,
int  rx = 1,
int  ry = 1
 

In this method I use a static value of 700/210 this is the ratio that i use for converting millimeter to pixel. But there should be a thinking of all the considerations of

  • screen resolution
  • print resolution
  • zoom factor
    Parameters:
    x1 x left corner
    y1 y left corner
    z zoom factor
    *


Member Function Documentation

QPoint ZoomFactor::convert float  x1,
float  y1
 

Convert a point in the system cooordinate to the view coordinate system

*

double ZoomFactor::convertXLength double  plength  ) 
 

Convert an x length in the system cooordinate to the view coordinate system

Parameters:
length *

double ZoomFactor::convertYLength double  plength  ) 
 

Convert an y length in the system cooordinate to the view coordinate system

Parameters:
length *

double ZoomFactor::getEffectiveXZoomFactor  ) 
 

Returns:
the effective x zoom factor. i.e the zoomFactor multiplied by the x resolution

double ZoomFactor::getEffectiveYZoomFactor  ) 
 

Returns:
the effective y zoom factor. i.e the zoomFactor multiplied by the y resolution

double ZoomFactor::getZoomFactor  ) 
 

Returns:
the zoom factor

QCoords ZoomFactor::invert int  x1,
int  y1
 

Converts the size

void ZoomFactor::setOrg QCoords  f  ) 
 

set the origin of a zoom factor *

void ZoomFactor::setRes int  rx,
int  ry
 

sets the resolution

Parameters:
rx is the x resolution dpi (Dot per Inch)
ry is the y resolution in dpi

void ZoomFactor::setZoomFactor double  d  ) 
 

set the zoom factor

Parameters:
d the new zoom factor

QString ZoomFactor::toString  ) 
 

For debug purpose only

Returns:
the string representation of a zoom

void ZoomFactor::zoom float  newzoom,
QCoords  rightBottomCorner
 

Parameters:
newzoom ZoomFactor
rightBottomCorner Right bootom corner of the zoom This method do a centered zoom
*


The documentation for this class was generated from the following files:
Generated on Tue Jun 1 21:13:38 2004 for Alternate Take by doxygen 1.3.6