Logo Search packages:      
Sourcecode: djvulibre version File versions

GRectMapper Class Reference

#include <GRect.h>

List of all members.


Detailed Description

Maps points from one rectangle to another rectangle. This class represents a relation between the points of two rectangles. Given the coordinates of a point in the first rectangle (input rectangle), function {map} computes the coordinates of the corresponding point in the second rectangle (the output rectangle). This function actually implements an affine transform which maps the corners of the first rectangle onto the matching corners of the second rectangle. The scaling operation is performed using integer fraction arithmetic in order to maximize accuracy.

Definition at line 263 of file GRect.h.


Public Member Functions

void clear ()
GRect get_input ()
GRect get_output ()
 GRectMapper ()
void map (GRect &rect)
void map (int &x, int &y)
void mirrorx ()
void mirrory ()
void rotate (int count=1)
void set_input (const GRect &rect)
void set_output (const GRect &rect)
void unmap (GRect &rect)
void unmap (int &x, int &y)

Private Member Functions

void precalc ()

Private Attributes

int code
GRect rectFrom
GRect rectTo
GRatio rh
GRatio rw

Friends

int operator* (int n, GRatio r)
int operator/ (int n, GRatio r)

Classes

struct  GRatio

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

Generated by  Doxygen 1.6.0   Back to index