Open CASCADE Technology
6.5.4
|
The primitive ImageFile
#include <Graphic2d_ImageFile.hxx>
Public Member Functions | |
Graphic2d_ImageFile (const Handle< Graphic2d_GraphicObject > &aGraphicObject, OSD_File &aFile, const Quantity_Length X, const Quantity_Length Y, const Quantity_Length adx=0.0, const Quantity_Length ady=0.0, const Aspect_CardinalPoints aTypeOfPlacement=Aspect_CP_Center, const Quantity_Factor aScale=1.0) | |
Defines an image with its center location; <X>, <Y> defines the position in the space model. <adx>, <ady> defines an offset in the device space. <ascale> defines a scale factor applied to the original size of the image. The image will be placed at this offset according to the type of placement. CardinalPoints values : | |
void | SetCenter (const Quantity_Length X, const Quantity_Length Y) |
Modifies the center location of the image <me>. | |
void | SetOffset (const Quantity_Length dx, const Quantity_Length dy) |
Modifies the offset of the image <me>. | |
void | SetPlacement (const Aspect_CardinalPoints aPlacement) |
Modifies the type of placement of the image <me>. CardinalPoints values : | |
void | Translate (const Quantity_Length DX, const Quantity_Length DY) |
Modifies the center location of the image <me> by translating it. | |
void | SetScale (const Quantity_Factor aScale) |
Changes the scale factor of the image. | |
void | SetZoomable (const Standard_Boolean aFlag=Standard_False) |
The image <me> follows the scale factor of the view if the flag is Standard_True. | |
void | Clear () |
Clear the reference to this imagefile if something inside have changed,Forced the reload of this at Draw() time. | |
Quantity_Factor | Scale () const |
Returns the original scale factor applied to the image <me>. | |
Standard_Boolean | IsZoomable () const |
Returns Standard_True if the image <me> follows the scale factor of the view. | |
void | Position (Quantity_Length &X, Quantity_Length &Y) const |
returns the position in the space model | |
void | Offset (Quantity_Length &aX, Quantity_Length &aY) const |
returns the offset in the device space | |
Aspect_CardinalPoints | Placement () const |
returns the type of placement | |
OSD_File | ImageFile () const |
returns the image file | |
virtual void | Save (Aspect_FStream &aFStream) const |
Static Public Member Functions | |
static Standard_Boolean | Values (OSD_File &aFile, Standard_Integer &aWidth, Standard_Integer &aHeight, Standard_Integer &aDepth) |
Returns Standard_True, the Image pixel size and the Image planes depth, if the image file : | |
static void | SwapLong (const Standard_Address anAddress, const Standard_Integer aNumOfBytes) |
Swaps long ints | |
Protected Member Functions | |
void | Draw (const Handle< Graphic2d_Drawer > &aDrawer) |
Draws the image at the required center location defined by the SetCenter method. | |
Standard_Boolean | Pick (const Standard_ShortReal X, const Standard_ShortReal Y, const Standard_ShortReal aPrecision, const Handle< Graphic2d_Drawer > &aDrawer) |
Returns Standard_True if the image <me> is picked, Standard_False if not. |
Graphic2d_ImageFile::Graphic2d_ImageFile | ( | const Handle< Graphic2d_GraphicObject > & | aGraphicObject, |
OSD_File & | aFile, | ||
const Quantity_Length | X, | ||
const Quantity_Length | Y, | ||
const Quantity_Length | adx = 0.0 , |
||
const Quantity_Length | ady = 0.0 , |
||
const Aspect_CardinalPoints | aTypeOfPlacement = Aspect_CP_Center , |
||
const Quantity_Factor | aScale = 1.0 |
||
) |
void Graphic2d_ImageFile::Draw | ( | const Handle< Graphic2d_Drawer > & | aDrawer | ) | [protected, virtual] |
Implements Graphic2d_Primitive.
OSD_File Graphic2d_ImageFile::ImageFile | ( | ) | const |
void Graphic2d_ImageFile::Offset | ( | Quantity_Length & | aX, |
Quantity_Length & | aY | ||
) | const |
Standard_Boolean Graphic2d_ImageFile::Pick | ( | const Standard_ShortReal | X, |
const Standard_ShortReal | Y, | ||
const Standard_ShortReal | aPrecision, | ||
const Handle< Graphic2d_Drawer > & | aDrawer | ||
) | [protected, virtual] |
Implements Graphic2d_Primitive.
void Graphic2d_ImageFile::Position | ( | Quantity_Length & | X, |
Quantity_Length & | Y | ||
) | const |
virtual void Graphic2d_ImageFile::Save | ( | Aspect_FStream & | aFStream | ) | const [virtual] |
Implements Graphic2d_Primitive.
Quantity_Factor Graphic2d_ImageFile::Scale | ( | ) | const |
void Graphic2d_ImageFile::SetPlacement | ( | const Aspect_CardinalPoints | aPlacement | ) |
static void Graphic2d_ImageFile::SwapLong | ( | const Standard_Address | anAddress, |
const Standard_Integer | aNumOfBytes | ||
) | [static] |
static Standard_Boolean Graphic2d_ImageFile::Values | ( | OSD_File & | aFile, |
Standard_Integer & | aWidth, | ||
Standard_Integer & | aHeight, | ||
Standard_Integer & | aDepth | ||
) | [static] |
- is not open <br> - exists <br> - have the extension .xwd <br>
NOTE that only XWD image file type are recognized.