EDOBE XDOM TAKE 6 IR - PRODUCTSHEET Especificaciones Pagina 231

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 304
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 230
CHAPTER 8: ExtendScript Tools and Features Specifying measurement values 231
For example, all the following formats are equivalent:
myVal = new UnitValue (12, "cm");
myVal = new UnitValue ("12 cm");
myVal = UnitValue ("12 centimeters");
UnitValue object properties
UnitValue object functions
Converting pixel and percentage values
Converting measurements among different units requires a common base unit. For example, for length,
the meter is the base unit. All length units can be converted into meters, which makes it possible to
convert any length unit into any other length unit.
Pixels and percentages do not have a standard common base unit. Pixel measurements are relative to
display resolution, and percentages are relative to an absolute total size.
X To convert pixels into length units, you must know the size of a single pixel. The size of a pixel depends
on the display resolution. A common resolution measurement is 72 dpi, which means that there are 72
pixels to the inch. The conversion base for pixels at 72 dpi is 0.013889 inches (1/72 inch).
baseUnit
UnitValue A UnitValue object that defines the size of one pixel, or a total size to use as a
base for percentage values. This is used as the base conversion unit for pixels
and percentages; see Converting pixel and percentage values
.
Default is 0.013889 inches (1/72 in), which is the base conversion unit for
pixels at 72 dpi. Set to
null to restore the default.
type
String The unit type in abbreviated form; for example,cm” or “in.
value
Number The numeric measurement value.
as()
unitValueObj.as (unit)
unit
The unit type in abbreviated form; for example, “cm” or “in.
Returns the numeric value of this object in the given unit. If the unit is unknown or cannot be
computed, generates a run-time error.
convert()
unitValueObj.convert (unit)
unit
The unit type in abbreviated form; for example, “cm” or “in.
Converts this object to the given unit, resetting the
type and value accordingly.
Returns true if the conversion is successful. If the unit is unknown or the object cannot be
converted, generates a run-time error and returns false.
Vista de pagina 230
1 2 ... 226 227 228 229 230 231 232 233 234 235 236 ... 303 304

Comentarios a estos manuales

Sin comentarios