40 #include <wx/mstream.h> 64 wxCHECK_MSG(
Type() == aItem.
Type(), *
this,
65 wxT(
"Cannot assign object type " ) + aItem.
GetClass() + wxT(
" to type " ) +
98 wxString::Format( wxT(
"SCH_BITMAP object cannot swap data with %s object." ),
119 wxPoint pos =
m_pos + aOffset;
153 void SCH_BITMAP::Show(
int nestLevel, std::ostream& os )
const 158 NestedSpace( nestLevel, os ) <<
'<' << s.Lower().mb_str() <<
m_pos <<
"/>\n";
201 aList.emplace_back(
_(
"Bitmap" ), wxEmptyString );
void GetMsgPanelInfo(EDA_DRAW_FRAME *aFrame, std::vector< MSG_PANEL_ITEM > &aList) override
Populate aList of MSG_PANEL_ITEM objects with it's internal state for display purposes.
wxString MessageTextFromValue(EDA_UNITS aUnits, int aValue, bool aAddUnitLabel, EDA_DATA_TYPE aType)
Convert a value to a string using double notation.
Plot settings, and plotting engines (PostScript, Gerber, HPGL and DXF)
void Move(const wxPoint &aMoveVector)
Move the rectangle by the aMoveVector.
Container for all the knowledge about how graphical objects are drawn on any output surface/device.
Implementation of conversion functions that require both schematic and board internal units.
void Rotate(const wxPoint &aCenter) override
Rotate the item around aCenter 90 degrees in the clockwise direction.
void Print(const RENDER_SETTINGS *aSettings, const wxPoint &aOffset) override
Print a schematic item.
const COLOR4D & GetLayerColor(int aLayer) const
Return the color used to draw a layer.
void PlotImage(PLOTTER *aPlotter, const wxPoint &aPos, const KIGFX::COLOR4D &aDefaultColor, int aDefaultPensize) const
Plot bitmap on plotter.
void Plot(PLOTTER *aPlotter) const override
Plot the schematic item to aPlotter.
void MirrorVertically(int aCenter) override
Mirror item vertically about aCenter.
void RotatePoint(int *pX, int *pY, double angle)
The base class for create windows for drawing purpose.
const EDA_RECT GetBoundingBox() const override
Return the orthogonal bounding box of this object for display purposes.
void Mirror(bool aVertically)
Mirror image vertically (i.e.
bool Contains(const wxPoint &aPoint) const
const EDA_RECT GetBoundingBox() const
Return the orthogonal, bounding box of this object for display purposes.
void MIRROR(T &aPoint, const T &aMirrorRef)
Updates aPoint with the mirror of aPoint relative to the aMirrorRef.
This class handle bitmap images in KiCad.
bool HitTest(const wxPoint &aPosition, int aAccuracy=0) const override
Test if aPosition is inside or on the boundary of this item.
void SwapData(SCH_ITEM *aItem) override
Swap the internal data structures aItem with the schematic item.
wxDC * GetPrintDC() const
to handle and draw images bitmaps
BITMAPS GetMenuImage() const override
Return a pointer to an image to be used in menus.
Object to handle a bitmap image that can be inserted in a schematic.
SCH_BITMAP & operator=(const SCH_ITEM &aItem)
SCH_LAYER_ID GetLayer() const
Return the layer this item is on.
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Output a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
Base plotter engine class.
RENDER_SETTINGS * RenderSettings()
BITMAPS
A list of all bitmap identifiers.
Handle the component boundary box.
EDA_ITEM * Clone() const override
Create a duplicate of this item with linked list members set to NULL.
A base class for most all the KiCad significant classes used in schematics and boards.
bool Intersects(const EDA_RECT &aRect) const
Test for a common area between rectangles.
virtual wxString GetClass() const override
Return the class name.
void DrawBitmap(wxDC *aDC, const wxPoint &aPos)
int GetDefaultPenWidth() const
SCH_BITMAP(const wxPoint &pos=wxPoint(0, 0))
bool ReadImageFile(const wxString &aFullFilename)
Reads and stores in memory an image file.
bool ReadImageFile(const wxString &aFullFilename)
Read and store an image file.
void MirrorHorizontally(int aCenter) override
Mirror item horizontally about aCenter.
virtual void ViewGetLayers(int aLayers[], int &aCount) const override
void Rotate(bool aRotateCCW)
Rotate image CW or CCW.
wxString GetClass() const override
Return the class name.
Base class for any item which can be embedded within the SCHEMATIC container class,...
EDA_UNITS GetUserUnits() const
Return the user units currently in use.
SCH_ITEM & operator=(const SCH_ITEM &aPin)
EDA_RECT & Inflate(wxCoord dx, wxCoord dy)
Inflate the rectangle horizontally by dx and vertically by dy.
KICAD_T Type() const
Returns the type of object.