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

This class defines the primitive Image

#include <Graphic2d_Image.hxx>

Inheritance diagram for Graphic2d_Image:
Inheritance graph
[legend]

Public Member Functions

 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)
 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.
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 Clear ()
 Clear the reference to this image if something
inside have changed,Forced the reload of this at Draw()
time.

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

Handle_Image_Image Image () const
 returns the image

virtual void Save (Aspect_FStream &aFStream) const

Static Public Member Functions

static void SetSmallSize (const Standard_Integer aSize)
 Defines the limit between a large image and a
small image.
Warning: A small image have Height*Width <= SmallSize ().
Default 4096 = 64*64

static Standard_Integer SmallSize ()
 Returns the limit between a large image and a
small image.
Warning: A small image have Height*Width <= SmallSize ().

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.


Constructor & Destructor Documentation

  • CP_North
  • CP_NorthEast
  • CP_East
  • CP_SouthEast
  • CP_South
  • CP_SouthWest
  • CP_West
  • CP_NorthWest
  • CP_Center

Member Function Documentation

void Graphic2d_Image::Draw ( const Handle< Graphic2d_Drawer > &  aDrawer) [protected, virtual]

Implements Graphic2d_Primitive.

Handle_Image_Image Graphic2d_Image::Image ( ) const

Implements Graphic2d_Primitive.

virtual void Graphic2d_Image::Save ( Aspect_FStream aFStream) const [virtual]

Implements Graphic2d_Primitive.

  • CP_North
  • CP_NorthEast
  • CP_East
  • CP_SouthEast
  • CP_South
  • CP_SouthWest
  • CP_West
  • CP_NorthWest
  • CP_Center

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