# Visualization
TKService
WNT

# WNT_ImageManager Class Reference

This class defines image management
.

`#include <WNT_ImageManager.hxx>`

## Public Member Functions

Standard_EXPORT | WNT_ImageManager (const WNT_WindowPtr &aWindow)
| Creates a class instance .
virtual Standard_EXPORT void | Destroy ()
| Deletes all resources associated with the class instance. .
| ~WNT_ImageManager ()
Standard_EXPORT void | SetFormat (const WNT_TypeOfImage aFormat=WNT_TOI_XWD)
| Sets image format for output. .
Standard_EXPORT void | Add (const Handle(WNT_Image)&anImage)
| Adds <animage> to manager. .
Standard_EXPORT Handle_WNT_Image | Image (const Standard_Integer anIndex)
| returns Image stored at <anindex>.
Standard_EXPORT 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_EXPORT 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_EXPORT 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. .
Standard_EXPORT 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. .
Standard_EXPORT void | Delete (const Standard_Integer anIndex)
| Deletes an image at index <anindex>. .
Standard_EXPORT void | Discard (const Standard_Integer anIndex)
| Places an image to the trash .
Standard_EXPORT 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_EXPORT Standard_Integer | Size () const
| Returns number of loaded images. .
Standard_EXPORT Aspect_Handle | ImageHandle (const Standard_Integer anIndex)
| Returns image handle. .
Standard_EXPORT void | Dim (const Standard_Integer anIndex, Standard_Integer &aWidth, Standard_Integer &aHeight)
| Returns image dimensions. .
Standard_EXPORT Standard_Integer | HashCode (const Standard_Integer anIndex)
| Returns image's hash code. .
Standard_EXPORT Standard_Integer | Index (const Standard_Integer aHashCode)
| Returns image's index. .
Standard_EXPORT Standard_Integer | StringHashCode (const Standard_CString aString)
| Returns hash code of the string. .
Standard_EXPORT 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 .
Standard_EXPORT const | Handle (Standard_Type)&DynamicType() const

## Protected Attributes

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

## Constructor & Destructor Documentation

Standard_EXPORT WNT_ImageManager::WNT_ImageManager | ( | const WNT_WindowPtr & | aWindow | ) |

WNT_ImageManager::~WNT_ImageManager | ( |  | ) | `[inline]`

## Member Function Documentation

Standard_EXPORT void WNT_ImageManager::Add | ( | const Handle(WNT_Image)& | anImage | ) |

Standard_EXPORT void WNT_ImageManager::Delete | ( | const Standard_Integer | anIndex | ) |

virtual Standard_EXPORT void WNT_ImageManager::Destroy | ( |  | ) | `[virtual]`

Standard_EXPORT void WNT_ImageManager::Dim | ( | const Standard_Integer | anIndex,
|  | Standard_Integer & | aWidth,
|  | Standard_Integer & | aHeight
| ) |

Standard_EXPORT void WNT_ImageManager::Discard | ( | const Standard_Integer | anIndex | ) |

Standard_EXPORT void WNT_ImageManager::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`
| ) |

Standard_EXPORT const WNT_ImageManager::Handle | ( | Standard_Type |  | ) | const

Standard_EXPORT Standard_Integer WNT_ImageManager::HashCode | ( | const Standard_Integer | anIndex | ) |

Standard_EXPORT Handle_WNT_Image WNT_ImageManager::Image | ( | const Standard_Integer | anIndex | ) |

Standard_EXPORT Aspect_Handle WNT_ImageManager::ImageHandle | ( | const Standard_Integer | anIndex | ) |

Standard_EXPORT Standard_Integer WNT_ImageManager::Index | ( | const Standard_Integer | aHashCode | ) |

Standard_EXPORT Standard_Integer WNT_ImageManager::Load | ( | const Standard_CString | aFileName | ) |

Standard_EXPORT Standard_Integer WNT_ImageManager::Open | ( | const Aspect_Handle | aDC,
|  | const Standard_Integer | aWidth,
|  | const Standard_Integer | aHeight,
|  | const Standard_Integer | aHashCode
| ) |

Standard_EXPORT Standard_Boolean WNT_ImageManager::Save | ( | const Standard_CString | aFileName,
|  | const Standard_Integer | aX,
|  | const Standard_Integer | aY,
|  | const Standard_Integer | aWidth,
|  | const Standard_Integer | aHeight
| ) | const

Standard_EXPORT Standard_Boolean WNT_ImageManager::SaveBuffer | ( | const Standard_CString | aFileName,
|  | const Standard_Integer | aX,
|  | const Standard_Integer | aY,
|  | const Standard_Integer | aWidth,
|  | const Standard_Integer | aHeight
| ) | const

Standard_EXPORT Aspect_Handle WNT_ImageManager::Scale | ( | const Standard_Integer | anIndex,
|  | const Standard_Real | aScaleX,
|  | const Standard_Real | aScaleY,
|  | const Standard_Boolean | aReplace = `Standard_False`
| ) |

Standard_EXPORT void WNT_ImageManager::SetFormat | ( | const WNT_TypeOfImage | aFormat = `WNT_TOI_XWD` | ) |

Standard_EXPORT Standard_Integer WNT_ImageManager::Size | ( |  | ) | const

Standard_EXPORT Standard_Integer WNT_ImageManager::StringHashCode | ( | const Standard_CString | aString | ) |

## Field Documentation

WNT_TypeOfImage WNT_ImageManager::myFormat `[protected]`

WNT_SequenceOfImage WNT_ImageManager::myImages `[protected]`

Handle_WNT_Image WNT_ImageManager::myLastImage `[protected]`

Standard_Integer WNT_ImageManager::myLastIndex `[protected]`

WNT_SequenceOfImage WNT_ImageManager::myTrash `[protected]`

Standard_Address WNT_ImageManager::myWindow `[protected]`

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

- WNT_ImageManager.hxx