PenProfile 2.x

com.livescribe.afp
Class Scale

java.lang.Object
  extended by com.livescribe.afp.Scale

public class Scale
extends Object

The Scale class provides utility functions for converting between Anoto Units (AU) and inches/millimeters. One Anoto Unit equals 0.3/8=0.0375 mm. Use the functions in this class to ensure that all conversions have the same precision.


Field Summary
static float AU_PER_INCH
          There are 25.4×8/0.3 AU per inch.
static float AU_PER_MM
          There are 8/0.3 AU per mm.
 
Method Summary
static float au2inch(int au)
          Deprecated. Use auToInch(int).
static float au2mm(int au)
          Deprecated. Use auToMM(int).
static float auToInch(int au)
          Converts between Anoto Units (AU) and inches.
static float auToMM(int au)
          Converts between Anoto Units (AU) and millimeters (mm).
static int inch2au(float inch)
          Deprecated. Use inchToAu(float).
static int inchToAu(float inch)
          Converts between inches and Anoto Units (AU).
static int mm2au(float mm)
          Deprecated. Use mmToAu(float).
static int mmToAu(float mm)
          Converts between millimeters (mm) and Anoto Units (AU).
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

AU_PER_MM

public static final float AU_PER_MM
There are 8/0.3 AU per mm.

See Also:
auToMM(int), mmToAu(float), Constant Field Values

AU_PER_INCH

public static final float AU_PER_INCH
There are 25.4×8/0.3 AU per inch.

See Also:
Constant Field Values
Method Detail

au2mm

public static float au2mm(int au)
Deprecated. Use auToMM(int).

Converts between Anoto Units (AU) and millimeters (mm).

Parameters:
au - number of AU
Returns:
number of mm

auToMM

public static float auToMM(int au)
Converts between Anoto Units (AU) and millimeters (mm).

Parameters:
au - number of AU
Returns:
the number of mm equivalent to the specified number of AU.
See Also:
AU_PER_MM

mm2au

public static int mm2au(float mm)
Deprecated. Use mmToAu(float).

Converts between millimeters (mm) and Anoto Units (AU).

Parameters:
mm - number of mm
Returns:
number of AU

mmToAu

public static int mmToAu(float mm)
Converts between millimeters (mm) and Anoto Units (AU). This truncates the result to the nearest integer.

Parameters:
mm - number of mm
Returns:
the number of AU equivalent to the specified number of mm.
See Also:
AU_PER_MM

au2inch

public static float au2inch(int au)
Deprecated. Use auToInch(int).

Converts between Anoto Units (AU) and inches

Parameters:
au - number of AU
Returns:
number of inches

auToInch

public static float auToInch(int au)
Converts between Anoto Units (AU) and inches.

Parameters:
au - number of AU
Returns:
the number of inches equivalent to the specified number of AU.
See Also:
AU_PER_INCH

inch2au

public static int inch2au(float inch)
Deprecated. Use inchToAu(float).

Converts between inches and Anoto Units (AU).

Parameters:
inch - number of inches
Returns:
number of AU

inchToAu

public static int inchToAu(float inch)
Converts between inches and Anoto Units (AU). This truncates the result to the nearest integer.

Parameters:
inch - number of inches
Returns:
the number of AU equivalent to the specified number of inches.
See Also:
AU_PER_INCH

PenProfile 2.x

Copyright © 2010 Livescribe Inc. All Rights Reserved.
Confidential and subject to NDA.