dvi2bitmap dvi2bitmap1.0

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

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...
DviFilePosition * | copy ()
| 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

  f | the DVI file of interest
  x | the x-coordinate of the position
  y | the y-coordinate of the position
  u | the 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

  dvifp | use the DVI file referred to by this class
  x | the x-coordinate of the position
  y | the y-coordinate of the position
  u | the 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

  u | express 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

  u | express 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

  factor | a 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

  dx | the amount to shift in the x direction
  dy | the amount to shift in the y direction
  u | the 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) |  |
| inline static

Referenced by main().

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

- DviFilePosition.h
- DviFilePosition.cc