The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.

dvi2bitmap  dvi2bitmap1.0
Public Member Functions | Static Public Member Functions | List of all members
DviFilePosition Class Reference

Represents a location within the DviFile. More...

#include <DviFilePosition.h>

Public Member Functions

 DviFilePosition (DviFile *, double x, double y, DviFile::DviUnits)
 Create a new marked position in a DVI file. More...
 
 DviFilePosition (DviFilePosition *, double x, double y, DviFile::DviUnits)
 Create a new marked position in a DVI file. More...
 
double getX (const DviFile::DviUnits u)
 Retrieve the x-coordinate of this position. More...
 
double getY (const DviFile::DviUnits u)
 Retrieve the y-coordinate of this position. More...
 
void shift (double dx, double dy, DviFile::DviUnits u)
 Shift the mark position by the given amount. More...
 
void scale (double factor)
 Scale the position by the given factor. More...
 
DviFilePositioncopy ()
 Return a copy of the object. More...
 

Static Public Member Functions

static verbosities verbosity (const verbosities level)
 

Detailed Description

Represents a location within the DviFile.

Coordinates x and y are relative to the top-left corner of the `page', with the pixel in the top-left corner having coordinates (0,0). Note that this is different from DVI coordinates, which have their origin at a point one inch in and one inch down from the top-left of the `paper'.

Constructor & Destructor Documentation

DviFilePosition::DviFilePosition ( DviFile f,
double  x,
double  y,
DviFile::DviUnits  u 
)

Create a new marked position in a DVI file.

Parameters
fthe DVI file of interest
xthe x-coordinate of the position
ythe y-coordinate of the position
uthe units of the (x,y) position

References DviFile::convertFromScaledPoints(), DviFile::convertToScaledPoints(), normal, and DviFile::unit_pixels.

Referenced by copy().

DviFilePosition::DviFilePosition ( DviFilePosition dvifp,
double  x,
double  y,
DviFile::DviUnits  u 
)

Create a new marked position in a DVI file.

Parameters
dvifpuse the DVI file referred to by this class
xthe x-coordinate of the position
ythe y-coordinate of the position
uthe units of the (x,y) position

References DviFile::convertToScaledPoints().

Member Function Documentation

DviFilePosition * DviFilePosition::copy ( )

Return a copy of the object.

References DviFilePosition(), and DviFile::unit_sp.

Referenced by Bitmap::getMark().

double DviFilePosition::getX ( const DviFile::DviUnits  u)

Retrieve the x-coordinate of this position.

Parameters
uexpress the answer in these units
Returns
the x-coordinate in the required units

References DviFile::convertFromScaledPoints().

Referenced by Bitmap::mark(), and Bitmap::write().

double DviFilePosition::getY ( const DviFile::DviUnits  u)

Retrieve the y-coordinate of this position.

Parameters
uexpress the answer in these units
Returns
the y-coordinate in the required units

References DviFile::convertFromScaledPoints().

Referenced by Bitmap::mark(), and Bitmap::write().

void DviFilePosition::scale ( double  factor)

Scale the position by the given factor.

The scaling is done in such a way that the coordinate (0,0) remains `fixed'.

Parameters
factora scaling factor, by which all distances are multiplied

References DviFile::convertFromScaledPoints(), normal, and DviFile::unit_pixels.

void DviFilePosition::shift ( double  dx,
double  dy,
DviFile::DviUnits  u 
)

Shift the mark position by the given amount.

Parameters
dxthe amount to shift in the x direction
dythe amount to shift in the y direction
uthe units in which dx and dy are expressed

References DviFile::convertFromScaledPoints(), DviFile::convertToScaledPoints(), normal, and DviFile::unit_pixels.

Referenced by Bitmap::getMark().

static verbosities DviFilePosition::verbosity ( const verbosities  level)
inlinestatic

Referenced by main().


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

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.