WT_Projection Class Reference
[Rendition attributes]

#include <projection.h>

Inheritance diagram for WT_Projection:

Inheritance graph
[legend]
Collaboration diagram for WT_Projection:

Collaboration graph
[legend]
List of all members.

Detailed Description

Rendition attribute describing the indicates what portion of the drawing space is to be rendered.

See also:
WT_Rendition

Definition at line 35 of file projection.h.

Public Types

enum  WT_Projection_Type { Normal = 0, Stretch = 1, Chop = 2 }
 The projection type value, indicates how the drawing space is to be rendered. More...

Public Member Functions

 WT_Projection ()
 Creates a WT_Projection object.
 WT_Projection (const WT_Projection_Type projection_type)
 Creates a WT_Projection object with the given projection type.
 WT_Projection (WT_Projection const &projection)
 Copy Constructor.
virtual ~WT_Projection ()
WT_Projection_Type type () const
 Returns the visibility state.
WT_Projection_Typetype ()
WT_ID object_id () const
 Returns the WT_ID for this object.
WT_Type object_type () const
 Returns the object type WT_Type::Attribute.
WT_Result materialize (WT_Opcode const &opcode, WT_File &file)
 Materializes the contents of the object from the file and the given opcode.
WT_Result process (WT_File &file)
 Calls the configured action handler for this object (passes in the file reference.).
WT_Result skip_operand (WT_Opcode const &opcode, WT_File &file)
 Causes the file reading to proceed to the end of this object.
WT_Result serialize (WT_File &file) const
 Forces the serialization of the object to the file.
WT_Result sync (WT_File &file) const
 Serializes the attribute out to the file, if necessary.
WT_Boolean operator== (WT_Attribute const &attrib) const
 Returns WD_True if the attributes are equal.

Static Public Member Functions

static WT_Result interpret_string (char const *string, WT_Projection_Type &projection_type)
 Converts the given string to a valid enum WT_Projection_Type.
static WT_Result default_process (WT_Projection &item, WT_File &file)
 Provides a default action handler for this attribute (e.g. sets the current rendition's corresponding attribute.).

Friends

class WT_Rendition
class WT_W2D_Class_Factory
class WT_Opcode


Member Enumeration Documentation

enum WT_Projection::WT_Projection_Type
 

The projection type value, indicates how the drawing space is to be rendered.

Enumerator:
Normal  The selected view is symmetrically scaled so that it completely fits within the containing window without distortion. In the case that the window’s aspect ratio is larger than the view’s aspect ratio, the view is scaled such that, horizontally, it fits tightly within the containing window. However, the view is scaled vertically such that a larger region of the logical coordinate space is viewed than was requested. When the window’s aspect ratio is less than the view’s aspect ratio, the view fits tightly in the vertical direction, and an excess of logical space is viewed horizontally (from what was requested).
Stretch  The selected view is asymmetrically scaled so that it exactly fills the containing window in both dimensions, and thus is distorted when the aspect ratios differ (circles become ellipses).
Chop  Similar to normal, however, the areas of excess logical space are not rendered. This results in leaving a gap on two sides of the containing window where no geometry is rendered.

Definition at line 44 of file projection.h.


Constructor & Destructor Documentation

WT_Projection::WT_Projection const WT_Projection_Type  projection_type  )  [inline]
 

Creates a WT_Projection object with the given projection type.

Parameters:
projection_type  The projection type, one of enum WT_Projection_Type.

Definition at line 87 of file projection.h.


Member Function Documentation

static WT_Result WT_Projection::default_process WT_Projection item,
WT_File file
[static]
 

Provides a default action handler for this attribute (e.g. sets the current rendition's corresponding attribute.).

Warning:
This is used by the framework and should not be called by client code.
Parameters:
item  The attribute to process.
file  The file being read.

static WT_Result WT_Projection::interpret_string char const *  string,
WT_Projection_Type projection_type
[static]
 

Converts the given string to a valid enum WT_Projection_Type.

Checks the given string against "normal", "stretch", and "chop" and sets the returns one of enum WT_Projection_Type.

Return values:
WT_Result::Success The operation was successful.
Parameters:
string  The string to examine.
projection_type  Output parameter. If found, the coresponding WT_Projection_Type, one of enum WT_Projection_Type.

WT_Result WT_Projection::materialize WT_Opcode const &  opcode,
WT_File file
[inline, virtual]
 

Materializes the contents of the object from the file and the given opcode.

Reads in the object data and causes the file reading to proceed to the end of this object.

Warning:
This is used by the framework and should not be called by client code.
Return values:
WT_Result::Success The operation was successful.
WT_Result::Opcode_Not_Valid_For_This_Object The object does not support the opcode type.
WT_Result::Internal_Error Something went very wrong.

Implements WT_Object.

Definition at line 122 of file projection.h.

WT_Result WT_Projection::process WT_File file  )  [virtual]
 

Calls the configured action handler for this object (passes in the file reference.).

Warning:
This is used by the framework and should not be called by client code.

Implements WT_Object.

WT_Result WT_Projection::serialize WT_File file  )  const [virtual]
 

Forces the serialization of the object to the file.

Warning:
This is used by the framework and should not be called by client code.
Return values:
WT_Result::Success The operation was successful.

Implements WT_Attribute.

WT_Result WT_Projection::skip_operand WT_Opcode const &  opcode,
WT_File file
[virtual]
 

Causes the file reading to proceed to the end of this object.

Warning:
This is used by the framework and should not be called by client code.
Bug:
Not all objects perform skip_operand() correctly; this is a known problem. For best results, if client code must use WT_File::get_next_object_shell() manually, it should also call the corresponding WT_Object::materialize() method to avoid this problem.
See also:
WT_File::get_next_object_shell(), WT_File_Heuristics::set_deferred_delete().

Reimplemented from WT_Object.

WT_Result WT_Projection::sync WT_File file  )  const [virtual]
 

Serializes the attribute out to the file, if necessary.

Only outputs relevant desired rendition changes to the file.

Warning:
This is used by the framework and should not be called by client code.
Return values:
WT_Result::Success The operation was successful.
See also:
WT_File::desired_rendition().

Implements WT_Attribute.


The documentation for this class was generated from the following file:
Generated on Tue Jan 6 22:41:25 2009 for Autodesk DWF Whip 2D Toolkit by  doxygen 1.4.5