47 : fWidth(width), fHeight(height), fWidthScale(scale.first), fHeightScale(scale.second), fEnumerationTag(0)
51 : fWidth(width), fHeight(height), fWidthScale(1.0), fHeightScale(1.0), fEnumerationTag(0)
55 : fWidth(width), fHeight(height), fWidthScale(72.0/square_inch.
X()), fHeightScale(72.0/square_inch.
Y()), fEnumerationTag(0)
59 : fWidth(r.
Width()), fHeight(r.
Height()), fWidthScale(1.0), fHeightScale(1.0), fEnumerationTag(0)
63 : fWidth(0.), fHeight(0.), fWidthScale(1.0), fHeightScale(1.0), fEnumerationTag(tag)
65 ASSERT(fEnumerationTag > 0);
79 PMReal OutputHeight()
const 84 PMPoint OutputDimensions()
const 86 return PMPoint( OutputWidth(), OutputHeight());
94 return fWidth*fWidthScale;
97 PMReal DesignHeight()
const 99 return fHeight*fHeightScale;
102 PMPoint DesignDimensions()
const 104 return PMPoint( DesignWidth(), DesignHeight());
115 PMReal HeightScale()
const 124 return 72.0 / fWidthScale;
129 return 72.0 / fHeightScale;
133 bool16 operator==(
const PMPageSize& other)
const 135 if( fEnumerationTag || other.fEnumerationTag)
136 return fEnumerationTag == other.fEnumerationTag;
139 fWidth == other.fWidth
140 && fHeight == other.fHeight
141 && fWidthScale == other.fWidthScale
142 && fHeightScale == other.fHeightScale;
145 bool16 operator!=(
const PMPageSize& other)
const 147 return !(*
this == other);
153 PMReal OutputShape()
const 155 return ShapeMeasure_( fWidth, fHeight);
158 bool16 OutputIsWide()
const 160 return OutputShape() > 1.;
163 bool16 OutputIsTall()
const 165 return OutputShape() < 1.;
168 bool16 OutputIsSquare()
const 170 return OutputShape() == 1.;
173 bool16 OutputIsEmpty()
const 175 return fWidth*fHeight == 0.;
179 PMReal DesignShape()
const 181 return ShapeMeasure_( fWidth*fWidthScale, fHeight*fHeightScale);
184 bool16 DesignIsWide()
const 186 return DesignShape() > 1.;
189 bool16 DesignIsTall()
const 191 return DesignShape() <= 1.;
194 bool16 DesignIsSquare()
const 196 return DesignShape() == 1.;
199 bool16 DesignIsEmpty()
const 201 return fWidth*fWidthScale*fHeight*fHeightScale == 0.;
214 return std::atan2( std::fabs(ToDouble(w)), std::fabs(ToDouble(h)))/std::atan(1.);
217 PMReal fWidth, fHeight, fWidthScale, fHeightScale;
218 uint32 fEnumerationTag;