Open CASCADE Technology  6.5.4
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Protected Attributes
WNT_ImageManager Class Reference

This class defines image management

#include <WNT_ImageManager.hxx>

Inheritance diagram for WNT_ImageManager:
Inheritance graph
[legend]

Public Member Functions

 WNT_ImageManager (const WNT_WindowPtr &aWindow)
 Creates a class instance

virtual void Destroy ()
 Deletes all resources associated with the class instance.

 ~WNT_ImageManager ()
void SetFormat (const WNT_TypeOfImage aFormat=WNT_TOI_XWD)
 Sets image format for output.

void Add (const Handle< WNT_Image > &anImage)
 Adds <anImage> to manager.

Handle_WNT_Image Image (const Standard_Integer anIndex)
 returns Image stored at <anIndex>.

Standard_Integer Load (const Standard_CString aFileName)
 Loads image from file and returns its index in the
sequence.
Warning: Returns 0 if loading was failed.

Standard_Boolean Save (const Standard_CString aFileName, const Standard_Integer aX, const Standard_Integer aY, const Standard_Integer aWidth, const Standard_Integer aHeight) const
 Stories image to the file according to <myFormat>
class field. Returns True on success, otherwise
returns False.

Standard_Boolean SaveBuffer (const Standard_CString aFileName, const Standard_Integer aX, const Standard_Integer aY, const Standard_Integer aWidth, const Standard_Integer aHeight) const
 Stories contents of the double buffer window pixmap.
See "Save" method.

void Draw (const Standard_Integer anIndex, const Standard_Integer Xc, const Standard_Integer Yc, const Standard_Integer aWidth, const Standard_Integer aHeight, const Standard_Real anAngle=0.0)
 Displays the image according to the DoubleBuffer state
of the associated window.

void Delete (const Standard_Integer anIndex)
 Deletes an image at index <anIndex>.

void Discard (const Standard_Integer anIndex)
 Places an image to the trash

Aspect_Handle Scale (const Standard_Integer anIndex, const Standard_Real aScaleX, const Standard_Real aScaleY, const Standard_Boolean aReplace=Standard_False)
 Scales the specified image.

Standard_Integer Size () const
 Returns number of loaded images.

Aspect_Handle ImageHandle (const Standard_Integer anIndex)
 Returns image handle.

void Dim (const Standard_Integer anIndex, Standard_Integer &aWidth, Standard_Integer &aHeight)
 Returns image dimensions.

Standard_Integer HashCode (const Standard_Integer anIndex)
 Returns image's hash code.

Standard_Integer Index (const Standard_Integer aHashCode)
 Returns image's index.

Standard_Integer StringHashCode (const Standard_CString aString)
 Returns hash code of the string.

Standard_Integer Open (const Aspect_Handle aDC, const Standard_Integer aWidth, const Standard_Integer aHeight, const Standard_Integer aHashCode)
 Creates new empty image and returns its index

Protected Attributes

Standard_Address myWindow
WNT_SequenceOfImage myImages
WNT_SequenceOfImage myTrash
WNT_TypeOfImage myFormat
Handle_WNT_Image myLastImage
Standard_Integer myLastIndex

Constructor & Destructor Documentation


Member Function Documentation

virtual void WNT_ImageManager::Destroy ( ) [virtual]
Handle_WNT_Image WNT_ImageManager::Image ( const Standard_Integer  anIndex)

Field Documentation

Handle_WNT_Image WNT_ImageManager::myLastImage [protected]

The documentation for this class was generated from the following file: