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.
|
|
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.
|
|
Division(Measurement, Int32) |
Dividing a Measurement by a scalar value creates a Measurement with its internal value so divided.
|
|
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.
|
|
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.
|
|
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.) | |
GreaterThan(Measurement, Measurement) |
Comparing two Measurements compares their internal values.
|
|
GreaterThanOrEqual(Measurement, Measurement) |
Comparing two Measurements compares their internal values.
|
|
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.
|
|
LessThan(Measurement, Measurement) |
Comparing two Measurements compares their internal values.
|
|
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.
|
|
Multiply(Measurement, Int32) |
Multiplying a Measurement by a scalar value creates a Measurement with its internal value so multiplied.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
Multiply(Measurement, Measurement) |
Multiplying two Measurements returns the product of their internal values.
|
|
OneAg |
One agate, in internal units.
|
|
OneCi |
One cicero, in internal units.
|
|
OneCm |
One centimeter, in internal units.
|
|
OneDi |
One didot, in internal units.
|
|
OneIn |
One inch, in internal units.
|
|
OneIu |
One internal unit, in internal units.
|
|
OneMm |
One millimeter, in internal units.
|
|
OnePi |
One pica, in internal units.
|
|
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.
|
|
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().) |
|
UnaryNegation(Measurement) |
Negating a measurement creates a Measurement with its internal value negated.
|
|
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 Measurement objects may be treated as numbers
when writing arithmetic code, for example:
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
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)