mi32/scrnunit.h File Reference

<mi32/scrnunit.h> More...

#include <mi32/stddefns.h>
Include dependency graph for scrnunit.h:
This graph shows which files directly or indirectly include this file:

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


Enumeration Type Documentation

enum SCREENUNIT

Screen unit enumeration values.

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

Enumerator:
SCREENUNIT_Inches 
SCREENUNIT_Millimeters 
SCREENUNIT_mm 
SCREENUNIT_Points 
SCREENUNIT_Pixels 
SCREENUNIT_1OverInches 
SCREENUNIT_MetersAtCurrentScale 
SCREENUNIT_Arbitrary 
SCREENUNIT_Object 
SCREENUNIT_COUNT 

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 Sun Oct 7 21:28:03 2012 for TNTsdk 2012 by  doxygen 1.6.1