Measurement Class

Pageflex Document Action API

Pageflex Document Action API Measurement Class
Namespaces > Pageflex.Scripting > Measurement
The Measurement class represents a measured length. It is used for document element properties representing size and position.
Syntax
C# Visual Basic Managed C++
public class Measurement
Public Class Measurement
public ref class Measurement
Members
All Members Constructors Methods Properties Fields Events



Icon Member Description
MeasurementNew(Int32)
Create a Measurement from a value specified in internal units.
MeasurementNew(String)
Create a Measurement from a String containing a number with units, such as "1.3cm".
MeasurementNew(Double, Units)
Create a Measurement from a number and unit specifier.
static member Addition(Measurement, Measurement)
Adding two Measurements creates a Measurement with the sum of their internal values.
Ag
Gets the value of the measurement in units of agates.
Ci
Gets the value of the measurement in units of ciceros.
Cm
Gets the value of the measurement in units of centimeters.
Convert(Units)
Returns the value of the Measurement using the specified units.
Di
Gets the value of the measurement in units of didots.
static member Division(Measurement, Int32)
Dividing a Measurement by a scalar value creates a Measurement with its internal value so divided.
static member Division(Measurement, UInt32)
Dividing a Measurement by a scalar value creates a Measurement with its internal value so divided.
Dividing a Measurement by a scalar value creates a Measurement with its internal value so divided.
static member Division(Measurement, Double)
Dividing a Measurement by a scalar value creates a Measurement with its internal value so divided.
Dividing a Measurement by a scalar value creates a Measurement with its internal value so divided.
static member Division(Measurement, Measurement)
Dividing two Measurements returns the quotient of their internal values.
Equals(Object) (Inherited from Object.)
Finalize() (Inherited from Object.)
GetHashCode()
The hash code of a Measurement is the hash code of its internal value.
(Overrides Object.GetHashCode().)
GetType() (Inherited from Object.)
static member GreaterThan(Measurement, Measurement)
Comparing two Measurements compares their internal values.
static member GreaterThanOrEqual(Measurement, Measurement)
Comparing two Measurements compares their internal values.
static member Implicit(String)
Converts a string representing a measurement (such as "1.3cm") to a Measurement object.
In
Gets the value of the measurement in units of inches.
Iu
Gets the value of the measurement in internal units.
static member LessThan(Measurement, Measurement)
Comparing two Measurements compares their internal values.
static member LessThanOrEqual(Measurement, Measurement)
Comparing two Measurements compares their internal values.
MemberwiseClone() (Inherited from Object.)
Mm
Gets the value of the measurement in units of millimeters.
static member Multiply(Measurement, Int32)
Multiplying a Measurement by a scalar value creates a Measurement with its internal value so multiplied.
static member Multiply(Int32, Measurement)
Multiplying a Measurement by a scalar value creates a Measurement with its internal value so multiplied.
Multiplying a Measurement by a scalar value creates a Measurement with its internal value so multiplied.
static member Multiply(Measurement, UInt32)
Multiplying a Measurement by a scalar value creates a Measurement with its internal value so multiplied.
Multiplying a Measurement by a scalar value creates a Measurement with its internal value so multiplied.
static member Multiply(UInt32, Measurement)
Multiplying a Measurement by a scalar value creates a Measurement with its internal value so multiplied.
Multiplying a Measurement by a scalar value creates a Measurement with its internal value so multiplied.
static member Multiply(Measurement, Double)
Multiplying a Measurement by a scalar value creates a Measurement with its internal value so multiplied.
Multiplying a Measurement by a scalar value creates a Measurement with its internal value so multiplied.
static member Multiply(Double, Measurement)
Multiplying a Measurement by a scalar value creates a Measurement with its internal value so multiplied.
Multiplying a Measurement by a scalar value creates a Measurement with its internal value so multiplied.
static member Multiply(Measurement, Measurement)
Multiplying two Measurements returns the product of their internal values.
static member OneAg
One agate, in internal units.
static member OneCi
One cicero, in internal units.
static member OneCm
One centimeter, in internal units.
static member OneDi
One didot, in internal units.
static member OneIn
One inch, in internal units.
static member OneIu
One internal unit, in internal units.
static member OneMm
One millimeter, in internal units.
static member OnePi
One pica, in internal units.
static member OnePt
One point, in internal units.
Pi
Gets the value of the measurement in units of picas.
Pt
Gets the value of the measurement in units of points.
static member Subtraction(Measurement, Measurement)
Subtracting two Measurements creates a Measurement with the difference of their internal values.
ToString()
Returns a string showing the Measurement's value in internal units, such as "2771iu".
(Overrides Object.ToString().)
static member UnaryNegation(Measurement)
Negating a measurement creates a Measurement with its internal value negated.
static member UnaryPlus(Measurement)
A positive Measurement is the Measurement itself.
Remarks
Document layout is fundamentally about the size and position of document elements. Thus many document element properties relate to size or position, such as a shape's width or a paragraph's font size. Such properties use Measurement objects to represent their values.

In most cases, programmers don't need to think about Measurement objects because they can use unit strings such as "1.3cm" instead which are automatically converted to Measurement objects. For example:

1shape.Width = "4cm";   // width is 4 centimeters
2shape.X += "0.1in";    // move by 0.1 inch
3paragraph.FontSize = "12pt"; // font size is 12 points
In most cases Measurement objects may be treated as numbers when writing arithmetic code, for example:
1shape.Height *= 2; // double the shape's height
2double aspectRatio = image.Width / image.Height; // compute image's aspect ratio

Inheritance Hierarchy
Object
Measurement

Assembly: PFScript Version: 8.0.7.1407 (Module: PFScript)