Package com.itextpdf.text.pdf.spatial
Class MeasureRectilinear
java.lang.Object
com.itextpdf.text.pdf.PdfObject
com.itextpdf.text.pdf.PdfDictionary
com.itextpdf.text.pdf.spatial.Measure
com.itextpdf.text.pdf.spatial.MeasureRectilinear
- All Implemented Interfaces:
Serializable
Rectilinear Measure dictionary.
- Since:
- 5.1.0
- See Also:
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) PdfName
Gets the subtype.void
A number format array for measurement of area.void
A factor that shall be used to convert the largest units along the y axis to the largest units along the x axis.void
A number format array for measurement of distance in any direction.void
An array of two numbers that shall specify the origin of the measurement coordinate system in default user space coordinates.void
A number format array for measurement of the slope of a line.void
setScaleRatio
(PdfString scaleratio) A text string expressing the scale ratio of the drawing in the region corresponding to this dictionary.void
A number format array for measurement of angles.void
A number format array for measurement of change along the x axis and, if Y is not present, along the y axis as well.void
A number format array for measurement of change along the y axis.Methods inherited from class com.itextpdf.text.pdf.PdfDictionary
checkType, clear, contains, get, getAsArray, getAsBoolean, getAsDict, getAsIndirectObject, getAsName, getAsNumber, getAsStream, getAsString, getDirectObject, getKeys, isCatalog, isFont, isOutlineTree, isPage, isPages, merge, mergeDifferent, put, putAll, putEx, remove, size, toPdf, toString
Methods inherited from class com.itextpdf.text.pdf.PdfObject
canBeInObjStm, getBytes, getIndRef, isArray, isBoolean, isDictionary, isIndirect, isName, isNull, isNumber, isStream, isString, length, setContent, setIndRef, type
-
Constructor Details
-
MeasureRectilinear
public MeasureRectilinear()
-
-
Method Details
-
getSubType
PdfName getSubType()Gets the subtype. In this case RL for a rectilinear coordinate system.- Specified by:
getSubType
in classMeasure
- Returns:
- the name of the SubType.
-
setScaleRatio
A text string expressing the scale ratio of the drawing in the region corresponding to this dictionary. Universally recognized unit abbreviations should be used, either matching those of the number format arrays in this dictionary or those of commonly used scale ratios.
If the scale ratio differs in the x and y directions, both scales should be specified.- Parameters:
scaleratio
-
-
setX
A number format array for measurement of change along the x axis and, if Y is not present, along the y axis as well. The first element in the array shall contain the scale factor for converting from default user space units to the largest units in the measuring coordinate system along that axis.
The directions of the x and y axes are in the measuring coordinate system and are independent of the page rotation. These directions shall be determined by the BBox of the containingViewport
- Parameters:
x
-
-
setY
A number format array for measurement of change along the y axis. The first element in the array shall contain the scale factor for converting from default user space units to the largest units in the measuring coordinate system along the y axis.(Required when the x and y scales have different units or conversion factors)- Parameters:
y
-
-
setD
A number format array for measurement of distance in any direction. The first element in the array shall specify the conversion to the largest distance unit from units represented by the first element in X. The scale factors from X, Y (if present) and CYX (if Y is present) shall be used to convert from default user space to the appropriate units before applying the distance function.- Parameters:
d
-
-
setA
A number format array for measurement of area. The first element in the array shall specify the conversion to the largest area unit from units represented by the first element in X, squared. The scale factors from X, Y (if present) and CYX (if Y is present) shall be used to convert from default user space to the appropriate units before applying the area function.- Parameters:
a
-
-
setT
A number format array for measurement of angles. The first element in the array shall specify the conversion to the largest angle unit from degrees. The scale factor from CYX (if present) shall be used to convert from default user space to the appropriate units before applying the angle function.- Parameters:
t
- a PdfArray containing PdfNumber objects
-
setS
A number format array for measurement of the slope of a line. The first element in the array shall specify the conversion to the largest slope unit from units represented by the first element in Y divided by the first element in X. The scale factors from X, Y (if present) and CYX (if Y is present) shall be used to convert from default user space to the appropriate units before applying the slope function.- Parameters:
s
- a PdfArray containing PdfNumber objects
-
setO
An array of two numbers that shall specify the origin of the measurement coordinate system in default user space coordinates. The directions by which x and y increase in value from this origin shall be determined byViewport.setBBox(com.itextpdf.text.Rectangle)
entry.
Default value: the first coordinate pair (lower-left corner) of the rectangle specified by the viewport's BBox entry.- Parameters:
o
- an XYArray
-
setCYX
A factor that shall be used to convert the largest units along the y axis to the largest units along the x axis. It shall be used for calculations (distance, area, and angle) where the units are be equivalent; if not specified, these calculations may not be performed (which would be the case in situations such as x representing time and y representing temperature). Other calculations (change in x, change in y, and slope) shall not require this value.- Parameters:
cyx
-
-