KiCad PCB EDA Suite
Loading...
Searching...
No Matches
DS_DATA_ITEM_BITMAP Class Reference

#include <ds_data_item.h>

Inheritance diagram for DS_DATA_ITEM_BITMAP:
DS_DATA_ITEM

Public Types

enum  DS_ITEM_TYPE {
  DS_TEXT , DS_SEGMENT , DS_RECT , DS_POLYPOLYGON ,
  DS_BITMAP
}
 

Public Member Functions

 DS_DATA_ITEM_BITMAP (BITMAP_BASE *aImage)
 
void SyncDrawItems (DS_DRAW_ITEM_LIST *aCollector, KIGFX::VIEW *aView) override
 
int GetPPI () const
 
void SetPPI (int aBitmapPPI)
 
const std::vector< DS_DRAW_ITEM_BASE * > & GetDrawItems () const
 
void SetStart (double aPosx, double aPosy, enum CORNER_ANCHOR aAnchor=RB_CORNER)
 
void SetEnd (double aPosx, double aPosy, enum CORNER_ANCHOR aAnchor=RB_CORNER)
 
DS_ITEM_TYPE GetType () const
 
PAGE_OPTION GetPage1Option () const
 
void SetPage1Option (PAGE_OPTION aChoice)
 
const VECTOR2I GetStartPosIU (int ii=0) const
 
const VECTOR2I GetEndPosIU (int ii=0) const
 
const VECTOR2D GetStartPos (int ii=0) const
 
const VECTOR2D GetEndPos (int ii=0) const
 
virtual int GetPenSizeIU ()
 
void MoveTo (const VECTOR2D &aPosition)
 Move item to a new position.
 
void MoveToIU (const VECTOR2I &aPosition)
 Move item to a new position.
 
void MoveStartPointTo (const VECTOR2D &aPosition)
 Move the starting point of the item to a new position.
 
void MoveStartPointToIU (const VECTOR2I &aPosition)
 Move the starting point of the item to a new position.
 
void MoveEndPointTo (const VECTOR2D &aPosition)
 Move the ending point of the item to a new position.
 
void MoveEndPointToIU (const VECTOR2I &aPosition)
 Move the ending point of the item to a new position.
 
virtual bool IsInsidePage (int ii) const
 
const wxString GetClassName () const
 

Public Attributes

BITMAP_BASEm_ImageBitmap
 
wxString m_Name
 
wxString m_Info
 
POINT_COORD m_Pos
 
POINT_COORD m_End
 
double m_LineWidth
 
int m_RepeatCount
 
VECTOR2D m_IncrementVector
 
int m_IncrementLabel
 

Protected Attributes

DS_ITEM_TYPE m_type
 
PAGE_OPTION m_pageOption
 
std::vector< DS_DRAW_ITEM_BASE * > m_drawItems
 

Detailed Description

Definition at line 355 of file ds_data_item.h.

Member Enumeration Documentation

◆ DS_ITEM_TYPE

Enumerator
DS_TEXT 
DS_SEGMENT 
DS_RECT 
DS_POLYPOLYGON 
DS_BITMAP 

Definition at line 98 of file ds_data_item.h.

Constructor & Destructor Documentation

◆ DS_DATA_ITEM_BITMAP()

DS_DATA_ITEM_BITMAP::DS_DATA_ITEM_BITMAP ( BITMAP_BASE aImage)
inline

Definition at line 358 of file ds_data_item.h.

References m_ImageBitmap.

Member Function Documentation

◆ GetClassName()

const wxString DS_DATA_ITEM::GetClassName ( ) const
inherited

◆ GetDrawItems()

◆ GetEndPos()

◆ GetEndPosIU()

◆ GetPage1Option()

PAGE_OPTION DS_DATA_ITEM::GetPage1Option ( ) const
inlineinherited
Returns
true if the item has a end point (segment; rect) of false (text, polygon).

Definition at line 133 of file ds_data_item.h.

References DS_DATA_ITEM::m_pageOption.

Referenced by PROPERTIES_FRAME::CopyPrmsFromItemToPanel(), DS_DATA_MODEL_IO::formatOptions(), DS_DRAW_ITEM_BASE::GetMsgPanelInfo(), and DS_DRAW_ITEM_BASE::ViewGetLayers().

◆ GetPenSizeIU()

int DS_DATA_ITEM::GetPenSizeIU ( )
virtualinherited

◆ GetPPI()

int DS_DATA_ITEM_BITMAP::GetPPI ( ) const

◆ GetStartPos()

◆ GetStartPosIU()

◆ GetType()

◆ IsInsidePage()

bool DS_DATA_ITEM::IsInsidePage ( int  ii) const
virtualinherited
Returns
true if the item is inside the rectangle defined by the 4 corners, false otherwise.

Reimplemented in DS_DATA_ITEM_POLYGONS.

Definition at line 342 of file ds_data_item.cpp.

References DS_DATA_ITEM::GetEndPos(), DS_DATA_ITEM::GetStartPos(), DS_DATA_MODEL::GetTheInstance(), DS_DATA_MODEL::m_LT_Corner, DS_DATA_MODEL::m_RB_Corner, VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by DS_DATA_ITEM::SyncDrawItems(), DS_DATA_ITEM_TEXT::SyncDrawItems(), and SyncDrawItems().

◆ MoveEndPointTo()

void DS_DATA_ITEM::MoveEndPointTo ( const VECTOR2D aPosition)
inherited

Move the ending point of the item to a new position.

This has meaning only for items defined by 2 points (segments and rectangles).

Parameters
aPositionis the new position of the ending point, in mm.

Definition at line 213 of file ds_data_item.cpp.

References DS_DATA_ITEM::DS_RECT, DS_DATA_ITEM::DS_SEGMENT, DS_DATA_MODEL::GetTheInstance(), DS_DATA_ITEM::GetType(), LB_CORNER, LT_CORNER, POINT_COORD::m_Anchor, DS_DATA_ITEM::m_End, DS_DATA_MODEL::m_LT_Corner, POINT_COORD::m_Pos, DS_DATA_MODEL::m_RB_Corner, RB_CORNER, RT_CORNER, VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by DS_DATA_ITEM::MoveEndPointToIU(), and DS_DATA_ITEM::MoveTo().

◆ MoveEndPointToIU()

void DS_DATA_ITEM::MoveEndPointToIU ( const VECTOR2I aPosition)
inherited

Move the ending point of the item to a new position.

This has meaning only for items defined by 2 points (segments and rectangles).

Parameters
aPositionis the new position of the ending point in graphic units

Definition at line 256 of file ds_data_item.cpp.

References DS_DATA_MODEL::GetTheInstance(), DS_DATA_MODEL::m_WSunits2Iu, DS_DATA_ITEM::MoveEndPointTo(), VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by PL_POINT_EDITOR::updateItem().

◆ MoveStartPointTo()

void DS_DATA_ITEM::MoveStartPointTo ( const VECTOR2D aPosition)
inherited

Move the starting point of the item to a new position.

Parameters
aPositionthe new position of the starting point, in mm.

Definition at line 171 of file ds_data_item.cpp.

References DS_DATA_MODEL::GetTheInstance(), LB_CORNER, LT_CORNER, POINT_COORD::m_Anchor, DS_DATA_MODEL::m_LT_Corner, POINT_COORD::m_Pos, DS_DATA_ITEM::m_Pos, DS_DATA_MODEL::m_RB_Corner, RB_CORNER, RT_CORNER, VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by DS_DATA_ITEM::MoveStartPointToIU(), and DS_DATA_ITEM::MoveTo().

◆ MoveStartPointToIU()

void DS_DATA_ITEM::MoveStartPointToIU ( const VECTOR2I aPosition)
inherited

Move the starting point of the item to a new position.

Parameters
aPositionis the new position of item in graphic units.

Definition at line 204 of file ds_data_item.cpp.

References DS_DATA_MODEL::GetTheInstance(), DS_DATA_MODEL::m_WSunits2Iu, DS_DATA_ITEM::MoveStartPointTo(), VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by PL_DRAWING_TOOLS::PlaceItem(), and PL_POINT_EDITOR::updateItem().

◆ MoveTo()

void DS_DATA_ITEM::MoveTo ( const VECTOR2D aPosition)
inherited

◆ MoveToIU()

void DS_DATA_ITEM::MoveToIU ( const VECTOR2I aPosition)
inherited

Move item to a new position.

Parameters
aPositionthe new position of the starting point in graphic units.

Definition at line 145 of file ds_data_item.cpp.

References DS_DATA_MODEL::GetTheInstance(), DS_DATA_MODEL::m_WSunits2Iu, DS_DATA_ITEM::MoveTo(), VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by PL_DRAWING_TOOLS::DrawShape(), and PL_EDIT_TOOL::moveItem().

◆ SetEnd()

void DS_DATA_ITEM::SetEnd ( double  aPosx,
double  aPosy,
enum CORNER_ANCHOR  aAnchor = RB_CORNER 
)
inlineinherited

◆ SetPage1Option()

void DS_DATA_ITEM::SetPage1Option ( PAGE_OPTION  aChoice)
inlineinherited

◆ SetPPI()

void DS_DATA_ITEM_BITMAP::SetPPI ( int  aBitmapPPI)

◆ SetStart()

void DS_DATA_ITEM::SetStart ( double  aPosx,
double  aPosy,
enum CORNER_ANCHOR  aAnchor = RB_CORNER 
)
inlineinherited

◆ SyncDrawItems()

Member Data Documentation

◆ m_drawItems

◆ m_End

◆ m_ImageBitmap

◆ m_IncrementLabel

◆ m_IncrementVector

◆ m_Info

◆ m_LineWidth

◆ m_Name

◆ m_pageOption

PAGE_OPTION DS_DATA_ITEM::m_pageOption
protectedinherited

◆ m_Pos

◆ m_RepeatCount

◆ m_type

DS_ITEM_TYPE DS_DATA_ITEM::m_type
protectedinherited

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