InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
flash_export::SizeAndFitSettings Class Reference

#include <DynamicDocumentsTypes.h>

Public Types

typedef object_type data_type
 

Public Member Functions

 SizeAndFitSettings ()
 
 SizeAndFitSettings (SizeSelection const &sizeSelection, FitToSelection const &fitToSelection, uint32 const &widthAmount, uint32 const &heightAmount, PMReal const &scaleAmount)
 
bool16 operator== (const SizeAndFitSettings &other) const
 
bool16 operator!= (const SizeAndFitSettings &other) const
 
void ReadWrite (IPMStream *s)
 

Public Attributes

SizeSelection fSizeSelection
 
FitToSelection fFitToSelection
 
uint32 fWidthAmount
 
uint32 fHeightAmount
 
PMReal fScaleAmount
 

Detailed Description

Size and fit settings are used to control how SWF and XFL output are scaled during an export.

Note: InDesign does not support anisomorphic scaling. A single scaling factor will be used during exports for both horizontal and vertical scaling. This will preserve the source document's aspect ratio.

The simplest setting is a constant scaling factor that is applied during the export. For instance, to scale the contents of a document by 200% while exporting, use a SizeSelection of kScale and a scale amount of 200. The FitToSelection, width, and height values are ignored in this case.

To scale the contents of a document so that they will fit as tightly as possible within one of a set of predefined bounding rectangles, use a SizeSelection of kFitTo and a FitToSelection indicating which bounding rectangle to use. The width, height and scaling amount values are ignored in this case.

To scale the contents of a document so that they will fit as tightly as possible within a specified bounding rectangle, use a SizeSelection of kWidthAndHeight and width and height values corresponding to the dimensions you need. The FitToSelection and scale values are ignored in this case.

Note that when kFitTo or kWidthAndHeight are chosen, the actual scaling factor may vary depending on the size of the source document. Likewise, the actual output dimensions may vary as InDesign calculates these based on the scaling factor.

Constructor & Destructor Documentation

flash_export::SizeAndFitSettings::SizeAndFitSettings ()
inline

Default constructor.

flash_export::SizeAndFitSettings::SizeAndFitSettings (SizeSelection const & sizeSelection,
FitToSelection const & fitToSelection,
uint32 const & widthAmount,
uint32 const & heightAmount,
PMReal const & scaleAmount 
)
inline

SizeAndFitSettings constructor. May be used to used to initialize an instance of the class with given values.

Parameters
sizeSelectionOne of SizeSelection enum indicating which sizing and fitting mode is used
fitToSelectionOne of FitToSelection enum indicating which predefined bounding box to fit to. Ignored if sizeSelection is not kFitTo.
widthAmountWidth to use in fitting and scaling if sizeSelection is kWidthAndHeight. Ignored otherwise.
heightAmountHeight to use in fitting and scaling if sizeSelection is kWidthAndHeight. Ignored otherwise.
scaleAmountConstant scaling amount used if sizeSelection is kScale. Ignored otherwise.

Member Function Documentation

bool16 flash_export::SizeAndFitSettings::operator!= (const SizeAndFitSettingsother) const
inline
Not equal operator for comparison.

Parameters
otherIN the object to compare with.
Returns
bool16 kTrue means NOT equal, otherwise kFalse.
bool16 flash_export::SizeAndFitSettings::operator== (const SizeAndFitSettingsother) const
inline
Equal operator for comparison.

Parameters
otherIN the object to compare with.
Returns
bool16 kTrue means equal, otherwise kFalse.
void flash_export::SizeAndFitSettings::ReadWrite (IPMStreams)
inline
Persist SizeAndFitSettings

Parameters
sIN stream where we read/write object of SizeAndFitSettings.

Member Data Documentation

FitToSelection flash_export::SizeAndFitSettings::fFitToSelection

One of FitToSelection enum indicating which predefined bounding box to fit to. Ignored if fSizeSelection is not kFitTo.

uint32 flash_export::SizeAndFitSettings::fHeightAmount

Height to use in fitting and scaling if fSizeSelection is kWidthAndHeight. Ignored otherwise.

PMReal flash_export::SizeAndFitSettings::fScaleAmount

Constant scaling amount used if fSizeSelection is kScale. Ignored otherwise.

SizeSelection flash_export::SizeAndFitSettings::fSizeSelection

One of SizeSelection enum indicating which sizing and fitting mode is used

uint32 flash_export::SizeAndFitSettings::fWidthAmount

Width to use in fitting and scaling if fSizeSelection is kWidthAndHeight. Ignored otherwise.