Runtime

org.eclipse.gmf.runtime.draw2d.ui.mapmode
Interface IMapMode


public interface IMapMode

Objects implementing this interface are responsible for mapping the units in the model to pixles. For an example of how to use this interface

See Also:
org.eclipse.gmf.runtime.gef.ui.internal.figure.surface.mapmode.HiMetricMapMode

Method Summary
 int DPtoLP(int deviceUnit)
          Convert a Device Unit into a Logical Unit
 Translatable DPtoLP(Translatable t)
          Convert a Translatable to Logical Units (i.e.
 int LPtoDP(int logicalUnit)
          Convert a Logical Unit into a Device Unit
 Translatable LPtoDP(Translatable t)
          Convert a Translatable to Device Units (pixels)
 

Method Detail

LPtoDP

int LPtoDP(int logicalUnit)
Convert a Logical Unit into a Device Unit

Parameters:
logicalUnit - the value to be converted
Returns:
the value represented in device units

DPtoLP

int DPtoLP(int deviceUnit)
Convert a Device Unit into a Logical Unit

Parameters:
deviceUnit - the value to be converted
Returns:
the value represented in logical units

LPtoDP

Translatable LPtoDP(Translatable t)
Convert a Translatable to Device Units (pixels)

Parameters:
t - the Translatable to convert
Returns:
the parameter t that was scaled for convenience.

DPtoLP

Translatable DPtoLP(Translatable t)
Convert a Translatable to Logical Units (i.e. Hi-Metrics)

Parameters:
t - the Translatable to convert
Returns:
the parameter t that was scaled for convenience.

Runtime

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.