WT_Drawable Class Reference

#include <drawable.h>

Inheritance diagram for WT_Drawable:

Inheritance graph
[legend]
Collaboration diagram for WT_Drawable:

Collaboration graph
[legend]
List of all members.

Detailed Description

Base class for all drawable objects.

Definition at line 31 of file drawable.h.

Public Member Functions

WT_Logical_Box bounds (WT_File *file=NULL)
 Returns the approximate bounds of the drawable (in drawing units.).
virtual WT_Result delay (WT_File &file) const
 Delays the serialization of this object.
virtual WT_Result dump (WT_File &file) const
 Forces the serialization of the object to the file.
virtual WT_Type object_type () const
 Returns the object type WT_Type::Drawable.
virtual WT_Boolean merge (WT_Drawable const &current)
 Merge a same-class drawable with this one.
virtual void update_bounds (WT_File *file)
 Forces the drawable bounds to be updated.

Protected Member Functions

void update_bounds (const WT_Logical_Point &pt, WT_File *file=NULL)
 Given the point, update the drawable bounds to include the point.
void update_bounds (const WT_Point_Set_Data &set, WT_File *file=NULL)
 Given the point set, update the drawable bounds to include the points.
void update_bounds (const WT_Logical_Point *, int count, WT_File *file=NULL)
 Given the point array, update the drawable bounds to include the points.
 WT_Drawable ()
 Constructs a WT_Drawable object.
virtual ~WT_Drawable ()
 Destroys a WT_Drawable object.

Protected Attributes

WT_Logical_Box m_bounds
 The drawable bounds.
WT_Boolean m_bounds_set
 Flag to determine if bounds need to be calculated.

Friends

class WT_File
class WT_Class_Factory


Member Function Documentation

WT_Logical_Box WT_Drawable::bounds WT_File file = NULL  ) 
 

Returns the approximate bounds of the drawable (in drawing units.).

Parameters:
file  Optional current file object (examines current rendition's lineweight if non-null.)

virtual WT_Result WT_Drawable::delay WT_File file  )  const [virtual]
 

Delays the serialization of this object.

Stores the object for later serialization (in case the following object is coincident and can be merged with 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::Internal_Error The drawable object does not implement the delay() method.

Reimplemented in WT_Macro_Draw, WT_Polyline, WT_Polymarker, and WT_Polytriangle.

virtual WT_Result WT_Drawable::dump 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. Clients should always call serialize() so as to take advantage of the optimizations gained through delayed serialization and merging.
Return values:
WT_Result::Success The operation was successful.
Parameters:
file  The file being written.

Reimplemented in WT_Macro_Draw, WT_Polyline, WT_Polymarker, and WT_Polytriangle.

virtual WT_Boolean WT_Drawable::merge WT_Drawable const &  current  )  [virtual]
 

Merge a same-class drawable with this one.

Exceptions:
WT_Result::Internal_Error The drawable object does not implement the merge() method.
Return values:
WD_True The drawable was merged.

Reimplemented in WT_Macro_Draw, WT_Polyline, WT_Polymarker, and WT_Polytriangle.


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