InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
DynamicDocumentsTypes.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Greg St. Pierre
6 //
7 // $Author$
8 //
9 // $DateTime$
10 //
11 // $Revision$
12 //
13 // $Change$
14 //
15 // Copyright 1997-2010 Adobe Systems Incorporated. All rights reserved.
16 //
17 // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance
18 // with the terms of the Adobe license agreement accompanying it. If you have received
19 // this file from a source other than Adobe, then your use, modification, or
20 // distribution of it requires the prior written permission of Adobe.
21 //
22 //========================================================================================
23 
24 
25 #include "IPMStream.h"
26 
33 namespace flash_export
34 {
39  {
40  kJPEGFormat,
41  kGIFFormat,
42  kPNGFormat,
43  kAutomaticFormat
44  };
45 
50  {
51  kJPEGCompression,
52  kLosslessCompression,
53  kAutomaticCompression
54  };
55 
60  {
61  kJPEGQuality_Minimum,
62  kJPEGQuality_Low,
63  kJPEGQuality_Medium,
64  kJPEGQuality_High,
65  kJPEGQuality_Maximum
66  };
67 
72  {
73  kNoResampling,
74  kAverageResampling,
75  kSubsampleResampling,
76  kBicubicResampling
77  };
78 
83  {
84  kLiveText = 0, // default
85  kRasterizeText,
86  kVectorizeText,
87  kVellumText
88  };
89 
94  {
95  kIgnoreTransparency,
96  kFlattenTransparency,
97  kNativeTransparency
98  };
99 
104  {
105  kIncludeAll,
106  kAppearanceOnly
107  };
108 
113  {
114  kFitTo,
115  kWidthAndHeight,
116  kScale
117  };
118 
123  {
124  k1280x800,
125  k1240x620,
126  k1024x768,
127  k984x588,
128  k800x600,
129  k760x420,
130  k640x480,
131  k600x300
132  };
133 
138  {
139  kMinCurveQuality = 1,
140  kLowCurveQuality = 3,
141  kMedCurveQuality = 5,
142  kHighCurveQuality = 7,
143  kMaxCurveQuality = 10
144  };
145 
146  enum SWFScaleMode // Indicates the current scaling of the SWF file within Flash Player.
147  {
148  kNoScale = 0, // makes the size of the Flash content fixed, so that it remains unchanged even as the size of the player window changes. Cropping may occur if the player window is smaller than the Flash content.
149  kExactFit = 1, // makes the entire Flash content visible in the specified area without trying to preserve the original aspect ratio. Distortion can occur.
150  kShowAll = 2, // (Default in Flash Player) makes the entire Flash content visible in the specified area without distortion while maintaining the original aspect ratio of the. Borders can appear on two sides of the application.
151  kNoBorder = 3 // scales the Flash content to fill the specified area, without distortion but possibly with some cropping, while maintaining the original aspect ratio of the application.
152  };
153 
182  {
183  public:
184  typedef object_type data_type;
185 
190 
196 
201  uint32 fWidthAmount;
202 
208 
214 
218  fSizeSelection(kScale),
219  fFitToSelection(k1024x768),
220  fWidthAmount(1024),
221  fHeightAmount(768),
222  fScaleAmount(100.0)
223  {
224  }
225 
236  SizeAndFitSettings(SizeSelection const &sizeSelection,
237  FitToSelection const &fitToSelection,
238  uint32 const &widthAmount,
239  uint32 const &heightAmount,
240  PMReal const &scaleAmount) :
241  fSizeSelection(sizeSelection),
242  fFitToSelection(fitToSelection),
243  fWidthAmount(widthAmount),
244  fHeightAmount(heightAmount),
245  fScaleAmount(scaleAmount)
246  {
247  }
248 
253  bool16 operator==(const SizeAndFitSettings& other) const
254  {
255  return ( (fSizeSelection == other.fSizeSelection) &&
256  (fFitToSelection == other.fFitToSelection) &&
257  (fWidthAmount == other.fWidthAmount) &&
258  (fHeightAmount == other.fHeightAmount) &&
259  (fScaleAmount == other.fScaleAmount) );
260  }
261 
266  bool16 operator!=(const SizeAndFitSettings& other) const
267  {
268  return ( (fSizeSelection != other.fSizeSelection) ||
269  (fFitToSelection != other.fFitToSelection) ||
270  (fWidthAmount != other.fWidthAmount) ||
271  (fHeightAmount != other.fHeightAmount) ||
272  (fScaleAmount != other.fScaleAmount) );
273  }
274 
279  {
280  XFER_ENUM(s, fSizeSelection);
281  XFER_ENUM(s, fFitToSelection);
282  s->XferInt32((int32&)fWidthAmount);
283  s->XferInt32((int32&)fHeightAmount);
285  }
286  };
287 }