DATAKIT API  V2025.1
Dtk_Drawing Class Reference

This is the drawing class.
It basically contains Dtk_View array and Dtk_2dEntity array. More...

+ Inheritance diagram for Dtk_Drawing:

Public Member Functions

virtual Dtk_ErrorStatus _Store (void *)
 
Dtk_ErrorStatus AddOrigin (const Dtk_pnt &origin)
 Internal use only. More...
 
Dtk_ErrorStatus AddView (const Dtk_ViewPtr &inView, const Dtk_pnt &inOrigin)
 Adds a view into the drawing. More...
 
Dtk_ErrorStatus AddView (const Dtk_ViewPtr &inViewtoBeAdded)
 Adds a view into the drawing. More...
 
Dtk_Int32 DtkDynamicType (const Dtk_Int32 &inId)
 Retrieves the dynamic entity type. More...
 
int DtkDynamicType (const int &inId)
 
virtual void dump (FILE *file=stdout)
 
Dtk_2dEntityPtrGet2dEntity (const Dtk_Size_t &inPos)
 Retrieves the 2D entity - get/set -. More...
 
const Dtk_2dEntityPtrGet2dEntity (const Dtk_Size_t &inPos) const
 Retrieves the ith 2D entity - read only -. More...
 
Dtk_InfoPtr get_info () const
 
type_detk get_type_detk () const
 
const Dtk_IDGetID () const
 Get Internal UniqueID. More...
 
Dtk_Size_t GetNum2dEntities () const
 Retrieves the 2D entities number - read only -. More...
 
Dtk_Size_t GetNumOrigins () const
 Retrieves the origin points number - read only -. More...
 
Dtk_Size_t GetNumViews () const
 Retrieves the views number - read only -. More...
 
Dtk_pntGetOrigin (const Dtk_Size_t &inPos)
 Retrieves the origin Dtk_pnt - get/set -. More...
 
const Dtk_pntGetOrigin (const Dtk_Size_t &inPos) const
 Retrieves the ith origin Dtk_pnt - read only -. More...
 
virtual Dtk_Size_t GetSize () const
 
Dtk_ViewPtrGetView (const Dtk_Size_t &inPos)
 Retrieves the ith Dtk_View - get/set -. More...
 
const Dtk_ViewPtrGetView (const Dtk_Size_t &inPos) const
 Retrieves the ith Dtk_View - read only -. More...
 
Dtk_Double64Height ()
 Retrieves the drawing height - get/set -. More...
 
const Dtk_Double64Height () const
 Retrieves the drawing height - read only -. More...
 
Dtk_InfoPtrinfo ()
 
virtual void PrepareTransfo ()
 
Dtk_ErrorStatus Transform (const Dtk_transfo &inTransfo)
 Applies a transformation matrix to the entity. //! More...
 
Dtk_Double64Width ()
 Retrieves the drawing width - get/set -. More...
 
const Dtk_Double64Width () const
 Retrieves the drawing width - read only -. More...
 

Static Public Member Functions

static Dtk_DrawingPtr Create ()
 Base constructor. More...
 
static Dtk_DrawingPtr Create (const Dtk_Drawing &inToBeCopied)
 Copy constructor. More...
 
static Dtk_DrawingPtr Create (Dtk_Drawing &&inToMoved)
 \MoveConstructor{inToMoved} More...
 
static Dtk_DrawingDtkDynamicCast (Dtk_Object *s)
 Performs a dynamic cast - doesn't need RTTI -. More...
 

Protected Types

enum  { _typeID = DTK_TYPE_OBJECT }
 
enum  { _typeID = DTK_TYPE_ENTITY }
 
enum  { _typeID = DTK_TYPE_DRAWING }
 

Protected Member Functions

void _copy (const Dtk_Entity &s)
 
void _copy (const Dtk_Object &s)
 
void _init ()
 
void _reset ()
 

Protected Attributes

Dtk_Handle * _Private
 
unsigned long count_
 

Friends

class Dtk_SmartPtr< Dtk_Drawing >
 
std::ostream & operator<< (std::ostream &o, const Dtk_Drawing &d)
 

Detailed Description

This is the drawing class.
It basically contains Dtk_View array and Dtk_2dEntity array.

See also
Please use the Dtk_DrawingPtr class to handle it...

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
protectedinherited
Enumerator
_typeID 

◆ anonymous enum

anonymous enum
protectedinherited
Enumerator
_typeID 

◆ anonymous enum

anonymous enum
protected
Enumerator
_typeID 
6873  {
6875  };

Member Function Documentation

◆ _copy() [1/2]

void Dtk_Entity::_copy ( const Dtk_Entity s)
protectedinherited

◆ _copy() [2/2]

void Dtk_Object::_copy ( const Dtk_Object s)
protectedinherited

◆ _init()

void Dtk_Entity::_init ( )
protectedinherited

◆ _reset()

void Dtk_Entity::_reset ( )
protectedinherited

◆ _Store()

◆ AddOrigin()

Dtk_ErrorStatus Dtk_Drawing::AddOrigin ( const Dtk_pnt origin)

Internal use only.

◆ AddView() [1/2]

Dtk_ErrorStatus Dtk_Drawing::AddView ( const Dtk_ViewPtr inView,
const Dtk_pnt inOrigin 
)

Adds a view into the drawing.

Parameters
inViewDtk_View to be added.
inOriginOrigin of the view in the Dtk_Drawing.
Returns
DtkNoError if OK

◆ AddView() [2/2]

Dtk_ErrorStatus Dtk_Drawing::AddView ( const Dtk_ViewPtr inViewtoBeAdded)

Adds a view into the drawing.

Parameters
inViewtoBeAddedDtk_View to be added.
Returns
DtkNoError if OK

◆ Create() [1/3]

static Dtk_DrawingPtr Dtk_Drawing::Create ( )
static

Base constructor.

◆ Create() [2/3]

static Dtk_DrawingPtr Dtk_Drawing::Create ( const Dtk_Drawing inToBeCopied)
static

Copy constructor.

Parameters
inToBeCopiedObject to copy.

◆ Create() [3/3]

static Dtk_DrawingPtr Dtk_Drawing::Create ( Dtk_Drawing &&  inToMoved)
static

\MoveConstructor{inToMoved}

◆ DtkDynamicCast()

static Dtk_Drawing* Dtk_Drawing::DtkDynamicCast ( Dtk_Object s)
static

Performs a dynamic cast - doesn't need RTTI -.

◆ DtkDynamicType() [1/2]

Dtk_Int32 Dtk_Drawing::DtkDynamicType ( const Dtk_Int32 inId)

Retrieves the dynamic entity type.

◆ DtkDynamicType() [2/2]

◆ dump()

virtual void Dtk_Object::dump ( FILE *  file = stdout)
virtualinherited

◆ Get2dEntity() [1/2]

Dtk_2dEntityPtr& Dtk_Drawing::Get2dEntity ( const Dtk_Size_t inPos)

Retrieves the 2D entity - get/set -.

Parameters
inPos2D entity index.
Returns
the inPos'th 2D entity.
See also
Get2dEntity(const Dtk_Size_t&) const

◆ Get2dEntity() [2/2]

const Dtk_2dEntityPtr& Dtk_Drawing::Get2dEntity ( const Dtk_Size_t inPos) const

Retrieves the ith 2D entity - read only -.

Parameters
inPos2D entity index.
Returns
the inPos'th 2D entity.
See also
Get2dEntity(const Dtk_Size_t&)

◆ get_info()

Dtk_InfoPtr Dtk_Entity::get_info ( ) const
inherited

◆ get_type_detk()

type_detk Dtk_Drawing::get_type_detk ( ) const
virtual
Returns
The type of the entity type - DTK_TYPE_DRAWING -

Implements Dtk_Entity.

6913  {
6914  return DTK_TYPE_DRAWING;
6915  }

◆ GetID()

const Dtk_ID& Dtk_Entity::GetID ( ) const
inherited

Get Internal UniqueID.

Returns
InternalID

◆ GetNum2dEntities()

Dtk_Size_t Dtk_Drawing::GetNum2dEntities ( ) const

Retrieves the 2D entities number - read only -.

Returns
The 2D entities number.

◆ GetNumOrigins()

Dtk_Size_t Dtk_Drawing::GetNumOrigins ( ) const

Retrieves the origin points number - read only -.

Returns
The origin points number.

◆ GetNumViews()

Dtk_Size_t Dtk_Drawing::GetNumViews ( ) const

Retrieves the views number - read only -.

Returns
The views number.

◆ GetOrigin() [1/2]

Dtk_pnt& Dtk_Drawing::GetOrigin ( const Dtk_Size_t inPos)

Retrieves the origin Dtk_pnt - get/set -.

Parameters
inPosorigin Dtk_pnt index.
Returns
the inPos'th origin Dtk_pnt.
See also
GetOrigin(const Dtk_Size_t&) const

◆ GetOrigin() [2/2]

const Dtk_pnt& Dtk_Drawing::GetOrigin ( const Dtk_Size_t inPos) const

Retrieves the ith origin Dtk_pnt - read only -.

Parameters
inPosorigin Dtk_pnt index.
Returns
the inPos'th origin Dtk_pnt.
See also
GetOrigin(const Dtk_Size_t&)

◆ GetSize()

◆ GetView() [1/2]

Dtk_ViewPtr& Dtk_Drawing::GetView ( const Dtk_Size_t inPos)

Retrieves the ith Dtk_View - get/set -.

Parameters
inPosView index.
Returns
the inPos'th Dtk_View.
See also
GetView(const Dtk_Size_t&) const

◆ GetView() [2/2]

const Dtk_ViewPtr& Dtk_Drawing::GetView ( const Dtk_Size_t inPos) const

Retrieves the ith Dtk_View - read only -.

Parameters
inPosView index.
Returns
the inPos'th Dtk_View.
See also
GetView(const Dtk_Size_t&)

◆ Height() [1/2]

Dtk_Double64& Dtk_Drawing::Height ( )

Retrieves the drawing height - get/set -.

Returns
the drawing height.
See also
Height() const

◆ Height() [2/2]

const Dtk_Double64& Dtk_Drawing::Height ( ) const

Retrieves the drawing height - read only -.

Returns
the drawing height.
See also
Height()

◆ info()

Dtk_InfoPtr& Dtk_Entity::info ( )
inherited

◆ PrepareTransfo()

virtual void Dtk_Entity::PrepareTransfo ( )
virtualinherited

Reimplemented in Dtk_OffsetSurface.

◆ Transform()

Dtk_ErrorStatus Dtk_Drawing::Transform ( const Dtk_transfo inTransfo)
virtual

Applies a transformation matrix to the entity. //!

Parameters
inTransfoThe transformation matrix to apply.

Implements Dtk_Entity.

◆ Width() [1/2]

Dtk_Double64& Dtk_Drawing::Width ( )

Retrieves the drawing width - get/set -.

Returns
the drawing width.
See also
Width() const

◆ Width() [2/2]

const Dtk_Double64& Dtk_Drawing::Width ( ) const

Retrieves the drawing width - read only -.

Returns
the drawing width.
See also
Width()

Friends And Related Function Documentation

◆ Dtk_SmartPtr< Dtk_Drawing >

friend class Dtk_SmartPtr< Dtk_Drawing >
friend

◆ operator<<

std::ostream& operator<< ( std::ostream &  o,
const Dtk_Drawing d 
)
friend

Field Documentation

◆ _Private

Dtk_Handle* Dtk_Drawing::_Private
protected

◆ count_

unsigned long Dtk_Object::count_
protectedinherited
Dtk_Drawing::_typeID
@ _typeID
Definition: util_draw_dtk.hpp:6874
DTK_TYPE_ENTITY
@ DTK_TYPE_ENTITY
Definition: define.h:466
DTK_TYPE_OBJECT
@ DTK_TYPE_OBJECT
Definition: define.h:464
Dtk_Entity::_typeID
@ _typeID
Definition: util_ent_dtk.hpp:333
Dtk_Object::_typeID
@ _typeID
Definition: dtk_object.hpp:13
DTK_TYPE_DRAWING
@ DTK_TYPE_DRAWING
Definition: define.h:445