89 std::map<size_t, EDA_ITEM_FLAGS> itemFlags;
98 aCollector->
Remove( item );
119 wxFAIL_MSG(
"Unknown drawing sheet item type" );
127 aCollector->
Append( item );
166 drawItem->SetPosition(
GetStartPosUi( drawItem->GetIndexInPeer() ) );
167 drawItem->SetEnd(
GetEndPosUi( drawItem->GetIndexInPeer() ) );
349 for(
int kk = 0; kk < 1; kk++ )
390 std::map<int, EDA_ITEM_FLAGS> itemFlags;
399 aCollector->
Remove( item );
416 poly_shape->SetFlags( itemFlags[ j ] );
434 aCollector->
Append( poly_shape );
437 aView->
Add( poly_shape );
473 for(
unsigned ii = 1; ii <
m_Corners.size(); ii++ )
517 return wxPoint(
int(pos.
x),
int(pos.
y) );
538 bool multilines =
false;
562 std::map<size_t, EDA_ITEM_FLAGS> itemFlags;
568 itemFlags[ i ] =
text->GetFlags();
588 text->SetFlags( itemFlags[ j ] );
600 text->SetMultilineAllowed( multilines );
628 if( lbchar >=
'0' && lbchar <=
'9' )
641 bool multiline =
false;
643 for(
unsigned ii = 0; ii <
m_FullText.Len(); ii++ )
691 #define FSCALE 1000.0 697 dummy.SetMultilineAllowed(
true );
718 std::map<size_t, EDA_ITEM_FLAGS> itemFlags;
727 aCollector->
Remove( item );
754 aCollector->
Append( bitmap );
757 aView->
Add( bitmap );
const DPOINT GetEndPos(int ii=0) const
unsigned GetPolyIndexStart(unsigned aContour) const
bool IsInsidePage(int ii) const override
Handle the graphic items list to draw/plot the frame and title block.
void SetConstrainedTextSize()
Calculate m_ConstrainedTextSize from m_TextSize to keep the X size and the full Y size of the text sm...
DS_DATA_ITEM(DS_ITEM_TYPE aType)
EDA_TEXT_VJUSTIFY_T m_Vjustify
const DPOINT GetStartPos(int ii=0) const
wxString BuildFullText(const wxString &aTextbase)
Return the full text corresponding to the aTextbase, after replacing format symbols by the correspond...
int GetPenSizeForBold(int aTextSize)
const wxPoint GetEndPosUi(int ii=0) const
void SetScale(double aScale)
void SetBoundingBox()
Calculate the bounding box of the set polygons.
void MoveEndPointToUi(const wxPoint &aPosition)
Move the ending point of the item to a new position.
double m_DefaultLineWidth
virtual bool IsInsidePage(int ii) const
virtual void Remove(VIEW_ITEM *aItem)
Remove a VIEW_ITEM from the view.
void SetFlags(EDA_ITEM_FLAGS aMask)
std::vector< DPOINT > m_Corners
void RotatePoint(int *pX, int *pY, double angle)
DS_DATA_ITEM_TEXT(const wxString &aTextBase)
void SyncDrawItems(DS_DRAW_ITEM_LIST *aCollector, KIGFX::VIEW *aView) override
virtual int GetPenSizeUi() override
unsigned GetPolyIndexEnd(unsigned aContour) const
double m_DefaultTextThickness
virtual void SyncDrawItems(DS_DRAW_ITEM_LIST *aCollector, KIGFX::VIEW *aView)
EDA_TEXT_HJUSTIFY_T m_Hjustify
static LIB_SYMBOL * dummy()
Used to draw a dummy shape when a LIB_SYMBOL is not found in library.
Base class to handle basic graphic items.
const wxPoint GetCornerPositionUi(unsigned aIdx, int aRepeat=0) const
void MoveTo(const DPOINT &aPosition)
Move item to a new position.
void SyncDrawItems(DS_DRAW_ITEM_LIST *aCollector, KIGFX::VIEW *aView) override
static DS_DATA_MODEL & GetTheInstance()
static function: returns the instance of DS_DATA_MODEL used in the application
DS_ITEM_TYPE GetType() const
int GetDefaultPenSize() const
std::vector< DS_DRAW_ITEM_BASE * > m_drawItems
BITMAP_BASE * m_ImageBitmap
const wxString GetClassName() const
Represent a set of closed polygons.
double GetMilsToIUfactor()
Get the scalar to convert pages units (mils) to draw/plot units.
void SetPPI(int aBitmapPPI)
int NewOutline()
Creates a new hole in a given outline.
void SetPixelSizeIu(double aPixSize)
const DPOINT GetCornerPosition(unsigned aIdx, int aRepeat=0) const
virtual int GetPenSizeUi() override
EDA_ITEM_FLAGS GetFlags() const
virtual int GetPenSizeUi()
Non filled rectangle with thick segment.
void MoveStartPointToUi(const wxPoint &aPosition)
Move the starting point of the item to a new position.
void Append(DS_DRAW_ITEM_BASE *aItem)
DSIZE m_ConstrainedTextSize
bool ReplaceAntiSlashSequence()
Replace the '\''n' sequence by EOL and the sequence '\''\' by only one '\' inside m_FullText.
Drawing sheet structure type definitions.
Handle the component boundary box.
void MoveStartPointTo(const DPOINT &aPosition)
Move the starting point of the item to a new position.
constexpr ret_type KiROUND(fp_type v)
Round a floating point number to an integer using "round halfway cases away from zero".
void MoveEndPointTo(const DPOINT &aPosition)
Move the ending point of the item to a new position.
Store the list of graphic items: rect, lines, polygons and texts to draw/plot the title block and fra...
virtual void Add(VIEW_ITEM *aItem, int aDrawPriority=-1)
Add a VIEW_ITEM to the view.
Hold a (potentially large) number of VIEW_ITEMs and renders them on a graphics device provided by the...
void MoveToUi(const wxPoint &aPosition)
Move item to a new position.
void IncrementLabel(int aIncr)
Try to build text which is an increment of m_TextBase has meaning only if m_TextBase is a basic text ...
void SyncDrawItems(DS_DRAW_ITEM_LIST *aCollector, KIGFX::VIEW *aView) override
void Remove(DS_DRAW_ITEM_BASE *aItem)
const wxPoint GetStartPosUi(int ii=0) const
int Append(int x, int y, int aOutline=-1, int aHole=-1, bool aAllowDuplication=false)
Add a new vertex to the contour indexed by aOutline and aHole (defaults to the outline of the last po...
A color representation with 4 components: red, green, blue, alpha.