88 std::map<size_t, EDA_ITEM_FLAGS> itemFlags;
97 aCollector->
Remove( item );
118 wxFAIL_MSG( wxS(
"Unknown drawing sheet item type" ) );
126 aCollector->
Append( item );
165 drawItem->SetPosition(
GetStartPosUi( drawItem->GetIndexInPeer() ) );
166 drawItem->SetEnd(
GetEndPosUi( drawItem->GetIndexInPeer() ) );
348 for(
int kk = 0; kk < 1; kk++ )
388 std::map<int, EDA_ITEM_FLAGS> itemFlags;
397 aCollector->
Remove( item );
414 poly_shape->SetFlags( itemFlags[ j ] );
433 aCollector->
Append( poly_shape );
436 aView->
Add( poly_shape );
472 for(
unsigned ii = 1; ii <
m_Corners.size(); ii++ )
516 return VECTOR2I(
int( pos.
x ),
int( pos.
y ) );
539 bool multilines =
false;
563 std::map<size_t, EDA_ITEM_FLAGS> itemFlags;
569 itemFlags[ i ] =
text->GetFlags();
589 text->SetFlags( itemFlags[ j ] );
601 text->SetMultilineAllowed( multilines );
629 if( lbchar >=
'0' && lbchar <=
'9' )
642 bool multiline =
false;
644 for(
unsigned ii = 0; ii <
m_FullText.Len(); ii++ )
692 #define FSCALE 1000.0
698 dummy.SetMultilineAllowed(
true );
719 std::map<size_t, EDA_ITEM_FLAGS> itemFlags;
728 aCollector->
Remove( item );
758 aCollector->
Append( bitmap );
761 aView->
Add( bitmap );
const wxImage * GetOriginalImageData() const
void SetPixelSizeIu(double aPixSize)
void SetScale(double aScale)
coord_type GetHeight() const
coord_type GetWidth() const
BITMAP_BASE * m_ImageBitmap
void SyncDrawItems(DS_DRAW_ITEM_LIST *aCollector, KIGFX::VIEW *aView) override
void SetPPI(int aBitmapPPI)
unsigned GetPolyIndexStart(unsigned aContour) const
unsigned GetPolyIndexEnd(unsigned aContour) const
void SetBoundingBox()
Calculate the bounding box of the set polygons.
const VECTOR2I GetCornerPositionUi(unsigned aIdx, int aRepeat=0) const
void SyncDrawItems(DS_DRAW_ITEM_LIST *aCollector, KIGFX::VIEW *aView) override
bool IsInsidePage(int ii) const override
virtual int GetPenSizeUi() override
const VECTOR2D GetCornerPosition(unsigned aIdx, int aRepeat=0) const
std::vector< VECTOR2D > m_Corners
bool ReplaceAntiSlashSequence()
Replace the '\''n' sequence by EOL and the sequence '\''\' by only one '\' inside m_FullText.
void SyncDrawItems(DS_DRAW_ITEM_LIST *aCollector, KIGFX::VIEW *aView) override
virtual int GetPenSizeUi() override
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 SetConstrainedTextSize()
Calculate m_ConstrainedTextSize from m_TextSize to keep the X size and the full Y size of the text sm...
GR_TEXT_H_ALIGN_T m_Hjustify
KIGFX::COLOR4D m_TextColor
VECTOR2D m_BoundingBoxSize
VECTOR2D m_ConstrainedTextSize
DS_DATA_ITEM_TEXT(const wxString &aTextBase)
GR_TEXT_V_ALIGN_T m_Vjustify
Drawing sheet structure type definitions.
void MoveToUi(const VECTOR2I &aPosition)
Move item to a new position.
DS_DATA_ITEM(DS_ITEM_TYPE aType)
const VECTOR2D GetEndPos(int ii=0) const
const VECTOR2D GetStartPos(int ii=0) const
void MoveStartPointTo(const VECTOR2D &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.
virtual int GetPenSizeUi()
DS_ITEM_TYPE GetType() const
void MoveTo(const VECTOR2D &aPosition)
Move item to a new position.
const VECTOR2I GetStartPosUi(int ii=0) const
void MoveEndPointToUi(const VECTOR2I &aPosition)
Move the ending point of the item to a new position.
std::vector< DS_DRAW_ITEM_BASE * > m_drawItems
const wxString GetClassName() const
void MoveStartPointToUi(const VECTOR2I &aPosition)
Move the starting point of the item to a new position.
VECTOR2D m_IncrementVector
const VECTOR2I GetEndPosUi(int ii=0) const
virtual void SyncDrawItems(DS_DRAW_ITEM_LIST *aCollector, KIGFX::VIEW *aView)
virtual bool IsInsidePage(int ii) const
Handle the graphic items list to draw/plot the frame and title block.
VECTOR2D m_DefaultTextSize
static DS_DATA_MODEL & GetTheInstance()
static function: returns the instance of DS_DATA_MODEL used in the application
double m_DefaultLineWidth
double m_DefaultTextThickness
Base class to handle basic graphic items.
Store the list of graphic items: rect, lines, polygons and texts to draw/plot the title block and fra...
int GetDefaultPenSize() const
wxString BuildFullText(const wxString &aTextbase)
void Append(DS_DRAW_ITEM_BASE *aItem)
double GetMilsToIUfactor()
Get the scalar to convert pages units (mils) to draw/plot units.
void Remove(DS_DRAW_ITEM_BASE *aItem)
Non filled rectangle with thick segment.
void SetFlags(EDA_ITEM_FLAGS aMask)
EDA_ITEM_FLAGS GetFlags() const
A color representation with 4 components: red, green, blue, alpha.
Hold a (potentially large) number of VIEW_ITEMs and renders them on a graphics device provided by the...
virtual void Add(VIEW_ITEM *aItem, int aDrawPriority=-1)
Add a VIEW_ITEM to the view.
virtual void Remove(VIEW_ITEM *aItem)
Remove a VIEW_ITEM from the view.
Represent a set of closed polygons.
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...
int NewOutline()
Creates a new hole in a given outline.
int GetPenSizeForBold(int aTextSize)
std::vector< FAB_LAYER_COLOR > dummy
void RotatePoint(int *pX, int *pY, const EDA_ANGLE &aAngle)
constexpr ret_type KiROUND(fp_type v)
Round a floating point number to an integer using "round halfway cases away from zero".