Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

ImageResize::SizeRequest Class Reference

List of all members.

Public Member Functions

 SizeRequest ()
RequestType get_type () const
 Returns the type of the size request, or RT_none if the request has not been specified.

void set_pixel_size (int pixel_size)
 Sets the size request to store an explicit pixel size.

int get_pixel_size () const
 Returns the explicit pixel size stored within the size request.

int get_pixel_size (int orig_pixel_size) const
 Returns the explicit pixel size stored within the size request, or if a ratio has been stored, returns the computed pixel size based on the original size.

void set_ratio (double ratio)
 Sets the size request to store a specific ratio.

double get_ratio () const
 Returns the specific ratio stored within the size request.

double get_ratio (int orig_pixel_size) const
 Returns the specific ratio stored within the size request, or if a pixel size has been stored, returns the computed ratio based on the original size.


Private Attributes

RequestType _type
union {
   int   _pixel_size
   double   _ratio
_e

Constructor & Destructor Documentation

ImageResize::SizeRequest::SizeRequest  )  [inline]
 

Definition at line 31 of file imageResize.I.

References _type, INLINE, and ImageResize::RequestType.


Member Function Documentation

int ImageResize::SizeRequest::get_pixel_size int  orig_pixel_size  )  const [inline]
 

Returns the explicit pixel size stored within the size request, or if a ratio has been stored, returns the computed pixel size based on the original size.

Definition at line 95 of file imageResize.I.

References _e, _type, INLINE, and nassertr.

int ImageResize::SizeRequest::get_pixel_size  )  const [inline]
 

Returns the explicit pixel size stored within the size request.

Definition at line 77 of file imageResize.I.

References _e.

double ImageResize::SizeRequest::get_ratio int  orig_pixel_size  )  const [inline]
 

Returns the specific ratio stored within the size request, or if a pixel size has been stored, returns the computed ratio based on the original size.

Definition at line 151 of file imageResize.I.

double ImageResize::SizeRequest::get_ratio  )  const [inline]
 

Returns the specific ratio stored within the size request.

Definition at line 131 of file imageResize.I.

ImageResize::RequestType ImageResize::SizeRequest::get_type void   )  const [inline]
 

Returns the type of the size request, or RT_none if the request has not been specified.

Definition at line 46 of file imageResize.I.

References _e, _type, and INLINE.

void ImageResize::SizeRequest::set_pixel_size int  pixel_size  )  [inline]
 

Sets the size request to store an explicit pixel size.

Definition at line 61 of file imageResize.I.

References _e.

void ImageResize::SizeRequest::set_ratio double  ratio  )  [inline]
 

Sets the size request to store a specific ratio.

Definition at line 115 of file imageResize.I.

References _e, and INLINE.


Member Data Documentation

union { ... } ImageResize::SizeRequest::_e [private]
 

Referenced by get_pixel_size(), get_type(), set_pixel_size(), and set_ratio().

int ImageResize::SizeRequest::_pixel_size [private]
 

Definition at line 67 of file imageResize.h.

double ImageResize::SizeRequest::_ratio [private]
 

Definition at line 68 of file imageResize.h.

RequestType ImageResize::SizeRequest::_type [private]
 

Definition at line 65 of file imageResize.h.

Referenced by get_pixel_size(), get_type(), and SizeRequest().


The documentation for this class was generated from the following files:
Generated on Fri May 2 03:27:22 2003 for Panda-Tool by doxygen1.3