scrnunit.h File Reference

<mi32/scrnunit.h> Definitions for SCREENUNIT constants and functions More...

#include <mi32/stddefns.h>

Include dependency graph for scrnunit.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Enumerations

enum  SCREENUNIT {
  SCREENUNIT_Inches = 0, SCREENUNIT_Millimeters = 1, SCREENUNIT_mm = SCREENUNIT_Millimeters, SCREENUNIT_Points = 2,
  SCREENUNIT_Pixels = 3, SCREENUNIT_1OverInches = 4, SCREENUNIT_MetersAtCurrentScale = 5, SCREENUNIT_Arbitrary = 6,
  SCREENUNIT_Object = 7, SCREENUNIT_COUNT = 8
}

Functions

double ConvertScreenUnits (double val, int iunit, int ounit, double MapScale=1.0)
double ConvertScreenUnits (double val, double mmPerPixel, double MapScale, int iunit, int ounit)
double GetScreenPixelSizeMM ()
double MwinGetPixelSizeMM (void *hdc)


Detailed Description

<mi32/scrnunit.h> Definitions for SCREENUNIT constants and functions

Definition in file scrnunit.h.


Enumeration Type Documentation

enum SCREENUNIT
 

Screen unit enumeration values.

These values are stored in files and thus must not change.

Enumeration values:
SCREENUNIT_Inches 
SCREENUNIT_Millimeters 
SCREENUNIT_mm 
SCREENUNIT_Points 
SCREENUNIT_Pixels 
SCREENUNIT_1OverInches 
SCREENUNIT_MetersAtCurrentScale 
SCREENUNIT_Arbitrary 
SCREENUNIT_Object 
SCREENUNIT_COUNT 

Definition at line 60 of file scrnunit.h.


Function Documentation

double ConvertScreenUnits double  val,
int  iunit,
int  ounit,
double  MapScale = 1.0
 

Convert SCREENUNIT value using pixel size determined from screen.

Returns:
Converted value
Parameters:
val  Input value
iunit  Input units (SCREENUNIT_...)
ounit  Output units (SCREENUNIT_...)
MapScale  Map scale

double ConvertScreenUnits double  val,
double  mmPerPixel,
double  MapScale,
int  iunit,
int  ounit
 

Convert SCREENUNIT value using given "pixel size".

Returns:
Converted value
Parameters:
val  Input value
mmPerPixel  Millimeters per pixel
MapScale  Map scale
iunit  Input units (SCREENUNIT_...)
ounit  Output units (SCREENUNIT_...)

double GetScreenPixelSizeMM  ) 
 

Get screen pixel size in millimeters.

double MwinGetPixelSizeMM void *  hdc  ) 
 

Get screen pixel size in millimeters using device context (WIN32_NATIVE only).

Parameters:
hdc  Windows device context, 0 for default


Generated on Tue Dec 14 13:19:16 2004 for TNTsdk by  doxygen 1.3.8-20040913