207 void Rotate(
bool aRotateCCW );
This class handle bitmap images in KiCad.
wxMemoryBuffer m_imageData
void Rotate(bool aRotateCCW)
Rotate image CW or CCW.
bool LoadLegacyData(LINE_READER &aLine, wxString &aErrorMsg)
Load an image data saved by #SaveData.
double GetScalingFactor() const
This scaling factor depends on m_pixelSizeIu and m_scale.
void SetImageType(wxBitmapType aType)
Set the bitmap type (png, jpeg, etc.)
const wxImage * GetOriginalImageData() const
void PlotImage(PLOTTER *aPlotter, const VECTOR2I &aPos, const KIGFX::COLOR4D &aDefaultColor, int aDefaultPensize) const
Plot bitmap on plotter.
VECTOR2I GetSizePixels() const
EDA_ANGLE Rotation() const
void Mirror(FLIP_DIRECTION aFlipDirection)
Mirror image vertically (i.e.
const BOX2I GetBoundingBox() const
Return the orthogonal, bounding box of this object for display purposes.
double GetPixelSizeIu() const
wxBitmapType GetImageType() const
Return the bitmap type (png, jpeg, etc.)
void ImportData(BITMAP_BASE &aItem)
Copy aItem image to this object and update m_bitmap.
const wxMemoryBuffer & GetImageDataBuffer() const
bool SaveImageData(wxOutputStream &aOutStream) const
Write the bitmap data to aOutStream.
wxImage * m_originalImage
void rebuildBitmap(bool aResetID=true)
void SetPixelSizeIu(double aPixSize)
void ConvertToGreyscale()
void UpdateImageDataBuffer()
Resets the image data buffer using the current image data.
const wxImage * GetImageData() const
bool ReadImageFile(const wxString &aFullFilename)
Reads and stores in memory an image file.
void DrawBitmap(wxDC *aDC, const VECTOR2I &aPos, const KIGFX::COLOR4D &aBackgroundColor=KIGFX::COLOR4D::UNSPECIFIED) const
void SetScale(double aScale)
A color representation with 4 components: red, green, blue, alpha.
static const COLOR4D UNSPECIFIED
For legacy support; used as a value to indicate color hasn't been set yet.
An abstract class from which implementation specific LINE_READERs may be derived to read single lines...
Base plotter engine class.
VECTOR2< int32_t > VECTOR2I