public final class

Scale

extends Object
java.lang.Object
   ↳ com.pspdfkit.annotations.measurements.Scale

Class Overview

A ratio of the size of an object as displayed on a document page to the size of a corresponding real-world object. Scale objects are used for measurement annotations. This class is immutable - you must create a new Scale object if you want to change any of the members.

Summary

Nested Classes
enum Scale.UnitFrom Units available for the source scale value. 
enum Scale.UnitTo Units available for the target scale value. 
Fields
public final Scale.UnitFrom unitFrom Unit for the source scale value.
public final Scale.UnitTo unitTo Unit for the target scale value (distance in the real world).
public final float valueFrom Value in specified units for the source scale.
public final float valueTo Value in specified units for the target scale.
Public Constructors
Scale(float valueFrom, Scale.UnitFrom unitFrom, float valueTo, Scale.UnitTo unitTo)
Creates an instance of a measurement Scale object.
Public Methods
static Scale defaultScale()
The default scale value used on a fresh document.
boolean equals(Object other)
int hashCode()
[Expand]
Inherited Methods
From class java.lang.Object

Fields

public final Scale.UnitFrom unitFrom

Unit for the source scale value.

public final Scale.UnitTo unitTo

Unit for the target scale value (distance in the real world).

public final float valueFrom

Value in specified units for the source scale. i.e. distance on the PDF page

public final float valueTo

Value in specified units for the target scale. i.e. distance in the real world.

Public Constructors

public Scale (float valueFrom, Scale.UnitFrom unitFrom, float valueTo, Scale.UnitTo unitTo)

Creates an instance of a measurement Scale object.

Public Methods

public static Scale defaultScale ()

The default scale value used on a fresh document. valueFrom = 1.0f valueTo = 1.0f unitFrom = IN unitTo = IN

Returns
  • A new Scale object with the defaults set.

public boolean equals (Object other)

public int hashCode ()