// This file is generated by WOK (CPPExt). // Please do not edit this file; modify original file instead. // The copyright and license terms as defined for the original file apply to // this header file considered to be the "object code" form of the original source. #ifndef _Graphic2d_Image_HeaderFile #define _Graphic2d_Image_HeaderFile #ifndef _Standard_HeaderFile #include #endif #ifndef _Standard_DefineHandle_HeaderFile #include #endif #ifndef _Handle_Graphic2d_Image_HeaderFile #include #endif #ifndef _Handle_Image_Image_HeaderFile #include #endif #ifndef _Standard_ShortReal_HeaderFile #include #endif #ifndef _Aspect_CardinalPoints_HeaderFile #include #endif #ifndef _Standard_Boolean_HeaderFile #include #endif #ifndef _Graphic2d_Primitive_HeaderFile #include #endif #ifndef _Handle_Graphic2d_GraphicObject_HeaderFile #include #endif #ifndef _Quantity_Length_HeaderFile #include #endif #ifndef _Handle_Graphic2d_Drawer_HeaderFile #include #endif #ifndef _Standard_Integer_HeaderFile #include #endif #ifndef _Aspect_FStream_HeaderFile #include #endif class Image_Image; class Graphic2d_GraphicObject; class Graphic2d_Drawer; //! This class defines the primitive Image
class Graphic2d_Image : public Graphic2d_Primitive { public: //! Defines an image with its center location;
//! , defines the position in the space model.
//! , defines an offset in the device space.
//! The image will be placed at this offset
//! according to the type of placement.
Standard_EXPORT Graphic2d_Image(const Handle(Graphic2d_GraphicObject)& aGraphicObject,const Handle(Image_Image)& anImage,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); //! Modifies the center location of the image .
Standard_EXPORT void SetCenter(const Quantity_Length X,const Quantity_Length Y) ; //! Modifies the offset of the image .
Standard_EXPORT void SetOffset(const Quantity_Length dx,const Quantity_Length dy) ; //! Modifies the type of placement of the image .
Standard_EXPORT void SetPlacement(const Aspect_CardinalPoints aPlacement) ; //! Modifies the center location of the image
//! by translating it.
Standard_EXPORT void Translate(const Quantity_Length DX,const Quantity_Length DY) ; //! Clear the reference to this image if something
//! inside have changed,Forced the reload of this at Draw()
//! time.
Standard_EXPORT void Clear() ; //! Defines the limit between a large image and a
//! small image.
//! Warning: A small image have Height*Width <= SmallSize ().
//! Default 4096 = 64*64
Standard_EXPORT static void SetSmallSize(const Standard_Integer aSize) ; //! Returns the limit between a large image and a
//! small image.
//! Warning: A small image have Height*Width <= SmallSize ().
Standard_EXPORT static Standard_Integer SmallSize() ; //! returns the position in the space model
Standard_EXPORT void Position(Quantity_Length& X,Quantity_Length& Y) const; //! returns the offset in the device space
Standard_EXPORT void Offset(Quantity_Length& aX,Quantity_Length& aY) const; //! returns the type of placement
Standard_EXPORT Aspect_CardinalPoints Placement() const; //! returns the image
Standard_EXPORT Handle_Image_Image Image() const; Standard_EXPORT virtual void Save(Aspect_FStream& aFStream) const; DEFINE_STANDARD_RTTI(Graphic2d_Image) protected: //! Draws the image at the required center location
//! defined by the SetCenter method.
Standard_EXPORT void Draw(const Handle(Graphic2d_Drawer)& aDrawer) ; //! Returns Standard_True if the image is picked,
//! Standard_False if not.
Standard_EXPORT Standard_Boolean Pick(const Standard_ShortReal X,const Standard_ShortReal Y,const Standard_ShortReal aPrecision,const Handle(Graphic2d_Drawer)& aDrawer) ; private: //! Fills the image in the drawer .
Standard_EXPORT void FillAndDraw(const Handle(Graphic2d_Drawer)& aDrawer) const; //! Evaluates the center of the image in the device space.
//! Called by the methods Graphic2d_Image::Draw,
//! Graphic2d_Image::Pick and Graphic2d_Image::FillAndDraw.
Standard_EXPORT void ComputeCenter(const Handle(Graphic2d_Drawer)& aDrawer,Standard_ShortReal& cx,Standard_ShortReal& cy) const; Handle_Image_Image myImage; Standard_ShortReal myX; Standard_ShortReal myY; Standard_ShortReal mydx; Standard_ShortReal mydy; Aspect_CardinalPoints myPlacement; Standard_Boolean myIsModified; }; // other Inline functions and methods (like "C++: function call" methods) #endif