|
KiCad PCB EDA Suite
|
This class handle bitmap images in KiCad. More...
#include <bitmap_base.h>
Classes | |
| struct | PREVIEW_SAVE |
| Everything a preview image stands in for, kept so it can be put back exactly. More... | |
Public Member Functions | |
| BITMAP_BASE (const VECTOR2I &pos=VECTOR2I(0, 0)) | |
| BITMAP_BASE (const BITMAP_BASE &aSchBitmap) | |
| ~BITMAP_BASE () | |
| double | GetPixelSizeIu () const |
| void | SetPixelSizeIu (double aPixSize) |
| wxImage * | GetImageData () |
| const wxImage * | GetImageData () const |
| const wxImage * | GetOriginalImageData () const |
| double | GetScale () const |
| void | SetScale (double aScale) |
| KIID | GetImageID () const |
| void | ImportData (BITMAP_BASE &aItem) |
| Copy aItem image to this object and update m_bitmap. | |
| double | GetScalingFactor () const |
| This scaling factor depends on m_pixelSizeIu and m_scale. | |
| VECTOR2I | GetSize () const |
| VECTOR2I | GetSizePixels () const |
| int | GetPPI () const |
| int | GetLegacyPPI () const |
| Recompute the PPI the way it was computed before the pixels/cm truncation fix. | |
| const BOX2I | GetBoundingBox () const |
| Return the orthogonal, bounding box of this object for display purposes. | |
| void | DrawBitmap (wxDC *aDC, const VECTOR2I &aPos, const KIGFX::COLOR4D &aBackgroundColor=KIGFX::COLOR4D::UNSPECIFIED) const |
| bool | ReadImageFile (const wxString &aFullFilename) |
| Reads and stores in memory an image file. | |
| bool | ReadImageFile (wxInputStream &aInStream) |
| Reads and stores in memory an image file. | |
| bool | ReadImageFile (wxMemoryBuffer &aBuf) |
| Reads and stores in memory an image file. | |
| bool | SetImage (const wxImage &aImage) |
| Set the image from an existing wxImage. | |
| void | BeginPreviewImage (const wxImage &aImage) |
| Show finished pixels in place of the image, without disturbing the scale or the resolution. | |
| void | EndPreviewImage () |
| Put back the image a preview stood in for, and do nothing if none is showing. | |
| bool | SaveImageData (wxOutputStream &aOutStream) const |
| Write the bitmap data to aOutStream. | |
| bool | LoadLegacyData (LINE_READER &aLine, wxString &aErrorMsg) |
| Load an image data saved by SaveImageData. | |
| void | Mirror (FLIP_DIRECTION aFlipDirection) |
| Mirror image vertically (i.e. | |
| void | Rotate (bool aRotateCCW) |
| Rotate image CW or CCW. | |
| void | ConvertToGreyscale () |
| void | InvertColors () |
| Invert the colours of the image (e.g. | |
| void | ConvertColourToAlpha (const wxColour &aColour) |
| Convert aColour to transparent in the image, proportionally to the 'distance' of each pixel from aColour. | |
| bool | IsMirroredX () const |
| bool | IsMirroredY () const |
| EDA_ANGLE | Rotation () const |
| void | PlotImage (PLOTTER *aPlotter, const VECTOR2I &aPos, const KIGFX::COLOR4D &aDefaultColor, int aDefaultPensize) const |
| Plot bitmap on plotter. | |
| wxBitmapType | GetImageType () const |
| Return the bitmap type (png, jpeg, etc.) | |
| void | SetImageType (wxBitmapType aType) |
| Set the bitmap type (png, jpeg, etc.) | |
Private Member Functions | |
| void | updateImageDataBuffer () |
| Resets the image data buffer using the current image data. | |
| void | rebuildBitmap (bool aResetID=true) |
| Rebuild the internal bitmap used to draw/plot image. | |
| void | ensureBitmapUpToDate () const |
| Ensure the cached wxBitmap is up-to-date with the current wxImage. | |
| void | updatePPI () |
Static Private Member Functions | |
| static void | mirrorImageInPlace (wxImage &aImage, FLIP_DIRECTION aFlipDirection) |
| Mirror the wxImage pixel data in-place without allocating a new image. | |
| static void | invertImageInPlace (wxImage &aImage) |
| Invert the colour of every pixel of the wxImage in-place without allocating a new image. | |
Private Attributes | |
| double | m_scale |
| The scaling factor of the bitmap with m_pixelSizeIu, controls the actual draw size. | |
| wxMemoryBuffer | m_imageData |
| Cached encoded image data (PNG/JPEG). | |
| wxBitmapType | m_imageType |
| The image type (png, jpeg, etc.). | |
| std::optional< PREVIEW_SAVE > | m_previewSave |
| Set only while a preview is showing. | |
| wxImage * | m_image |
| The raw, uncompressed image data. | |
| wxImage * | m_originalImage |
| Raw image data, not transformed by rotate/mirror. | |
| wxBitmap * | m_bitmap |
| The bitmap used to draw/plot image. | |
| bool | m_bitmapDirty |
| True when m_bitmap needs rebuilding from m_image. | |
| double | m_pixelSizeIu |
| The scaling factor of the bitmap to convert the bitmap size (in pixels) to internal KiCad units. | |
| int | m_ppi |
| The bitmap definition. The default is 300PPI. | |
| KIID | m_imageId |
| bool | m_isMirroredX |
| bool | m_isMirroredY |
| EDA_ANGLE | m_rotation |
This class handle bitmap images in KiCad.
It is not intended to be used alone, but inside another class so all methods are protected or private. It is used in SCH_BITMAP class, DS_DRAW_ITEM_BITMAP, and possibly others in the future.
Definition at line 46 of file bitmap_base.h.
Definition at line 39 of file bitmap_base.cpp.
References ANGLE_0, m_bitmap, m_bitmapDirty, m_image, m_imageType, m_isMirroredX, m_isMirroredY, m_originalImage, m_pixelSizeIu, m_ppi, m_rotation, and m_scale.
Referenced by BITMAP_BASE(), and ImportData().
| BITMAP_BASE::BITMAP_BASE | ( | const BITMAP_BASE & | aSchBitmap | ) |
Definition at line 56 of file bitmap_base.cpp.
References BITMAP_BASE(), m_bitmap, m_bitmapDirty, m_image, m_imageData, m_imageId, m_imageType, m_isMirroredX, m_isMirroredY, m_originalImage, m_pixelSizeIu, m_ppi, m_rotation, and m_scale.
|
inline |
Definition at line 53 of file bitmap_base.h.
References m_bitmap, m_image, and m_originalImage.
| void BITMAP_BASE::BeginPreviewImage | ( | const wxImage & | aImage | ) |
Show finished pixels in place of the image, without disturbing the scale or the resolution.
Used for a temporary view, such as a conversion preview. Any rotation or mirroring already in the image is taken as final. Calling this again replaces the view; EndPreviewImage() puts the real image back.
Definition at line 584 of file bitmap_base.cpp.
References ANGLE_0, m_bitmapDirty, m_image, m_imageId, m_isMirroredX, m_isMirroredY, m_originalImage, m_previewSave, and m_rotation.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), DRAWING_TOOL::ConvertImageToOutlines(), and SCH_EDIT_TOOL::ConvertImageToOutlines().
| void BITMAP_BASE::ConvertColourToAlpha | ( | const wxColour & | aColour | ) |
Convert aColour to transparent in the image, proportionally to the 'distance' of each pixel from aColour.
Pixels matching aColour exactly become fully transparent. Pixels further away from it keep proportionally more opacity. The alpha channel is added if the image does not have one.
Definition at line 655 of file bitmap_base.cpp.
References ConvertColourToAlphaInPlace(), m_bitmapDirty, m_image, m_imageData, m_imageId, and m_originalImage.
| void BITMAP_BASE::ConvertToGreyscale | ( | ) |
Definition at line 629 of file bitmap_base.cpp.
References m_bitmapDirty, m_image, m_imageData, m_imageId, and m_originalImage.
| void BITMAP_BASE::DrawBitmap | ( | wxDC * | aDC, |
| const VECTOR2I & | aPos, | ||
| const KIGFX::COLOR4D & | aBackgroundColor = KIGFX::COLOR4D::UNSPECIFIED ) const |
Definition at line 321 of file bitmap_base.cpp.
References ensureBitmapUpToDate(), GetGRForceBlackPenState(), GetScalingFactor(), GetSize(), image, KiROUND(), m_bitmap, result, scale, KIGFX::COLOR4D::ToColour(), COLOR4D::UNSPECIFIED, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by DS_DRAW_ITEM_BITMAP::PrintWsItem().
| void BITMAP_BASE::EndPreviewImage | ( | ) |
Put back the image a preview stood in for, and do nothing if none is showing.
Definition at line 612 of file bitmap_base.cpp.
References m_bitmapDirty, m_image, m_imageId, m_isMirroredX, m_isMirroredY, m_originalImage, m_previewSave, and m_rotation.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), DRAWING_TOOL::ConvertImageToOutlines(), and SCH_EDIT_TOOL::ConvertImageToOutlines().
|
private |
Ensure the cached wxBitmap is up-to-date with the current wxImage.
Rebuilds the bitmap if it has been invalidated by a transform operation.
Definition at line 97 of file bitmap_base.cpp.
References m_bitmap, m_bitmapDirty, and m_image.
Referenced by DrawBitmap().
| const BOX2I BITMAP_BASE::GetBoundingBox | ( | ) | const |
Return the orthogonal, bounding box of this object for display purposes.
This box should be an enclosing perimeter for visible components of this object, and the units should be in the pcb or schematic coordinate system. It is OK to overestimate the size by a few counts.
Definition at line 310 of file bitmap_base.cpp.
References GetSize(), BOX2< Vec >::Inflate(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by BOOST_AUTO_TEST_CASE().
|
inline |
Definition at line 66 of file bitmap_base.h.
References m_image.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), compareImages(), DRAWING_TOOL::ConvertImageToOutlines(), SCH_EDIT_TOOL::ConvertImageToOutlines(), KIGFX::CAIRO_GAL_BASE::DrawBitmap(), PCB_IO_KICAD_SEXPR::format(), PCB_WRITER_V10::format(), PCB_WRITER_V9::format(), ORCAD_CONVERTER::placeBitmap(), SCH_IO_KICAD_LEGACY::saveBitmap(), SCH_IO_KICAD_SEXPR::saveBitmap(), SCH_WRITER_V10::saveBitmap(), and SCH_WRITER_V9::saveBitmap().
|
inline |
Definition at line 67 of file bitmap_base.h.
References m_image.
|
inline |
Definition at line 74 of file bitmap_base.h.
References m_imageId.
Referenced by BOOST_AUTO_TEST_CASE(), KIGFX::GL_BITMAP_CACHE::cacheBitmap(), KIGFX::GAL_MODERN::DrawBitmap(), and KIGFX::GL_BITMAP_CACHE::RequestBitmap().
|
inline |
Return the bitmap type (png, jpeg, etc.)
Definition at line 276 of file bitmap_base.h.
References m_imageType.
| int BITMAP_BASE::GetLegacyPPI | ( | ) | const |
Recompute the PPI the way it was computed before the pixels/cm truncation fix.
Used only to migrate the stored image scale of pre-fix designs. Returns the same value as GetPPI() whenever the embedded resolution has no fractional pixels/cm.
Definition at line 132 of file bitmap_base.cpp.
References KiROUND(), m_originalImage, and m_ppi.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), checkTransformedBoardUsesOnlyKnownTokens(), checkTransformedSchematicUsesOnlyKnownTokens(), compensateImageScale(), and compensateReferenceImageScales().
|
inline |
Definition at line 69 of file bitmap_base.h.
References m_originalImage.
Referenced by BOOST_AUTO_TEST_CASE(), KIGFX::GL_BITMAP_CACHE::cacheBitmap(), KIGFX::GAL_MODERN::DrawBitmap(), and DS_DATA_MODEL_IO::format().
|
inline |
Definition at line 63 of file bitmap_base.h.
References m_pixelSizeIu.
Referenced by BOOST_AUTO_TEST_CASE(), and BOOST_AUTO_TEST_CASE().
|
inline |
Definition at line 116 of file bitmap_base.h.
References m_ppi.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), checkTransformedBoardUsesOnlyKnownTokens(), checkTransformedSchematicUsesOnlyKnownTokens(), compensateImageScale(), compensateReferenceImageScales(), KIGFX::CAIRO_GAL_BASE::DrawBitmap(), KIGFX::GAL_MODERN::DrawBitmap(), KIGFX::OPENGL_GAL::DrawBitmap(), SCH_IO_KICAD_LEGACY::loadBitmap(), REFERENCE_IMAGE::operator==(), SCH_IO_KICAD_SEXPR_PARSER::parseImage(), PLEDITOR_PRINTOUT::PrintPage(), SCH_IO_KICAD_SEXPR::saveBitmap(), SCH_WRITER_V10::saveBitmap(), SCH_WRITER_V9::saveBitmap(), REFERENCE_IMAGE::Similarity(), and CONSTRAINT_BADGE_ITEM::ViewDraw().
|
inline |
Definition at line 71 of file bitmap_base.h.
References m_scale.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), DS_DATA_MODEL_IO::format(), REFERENCE_IMAGE::operator==(), and REFERENCE_IMAGE::Similarity().
|
inline |
This scaling factor depends on m_pixelSizeIu and m_scale.
m_pixelSizeIu gives the scaling factor between a pixel size and the internal units. m_scale is an user dependent value, and gives the "zoom" value.
Definition at line 92 of file bitmap_base.h.
References m_pixelSizeIu, and m_scale.
Referenced by DrawBitmap(), GetSize(), and PlotImage().
| VECTOR2I BITMAP_BASE::GetSize | ( | ) | const |
Definition at line 441 of file bitmap_base.cpp.
References GetScalingFactor(), KiROUND(), m_image, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by BOOST_AUTO_TEST_CASE(), DrawBitmap(), GetBoundingBox(), DS_DRAW_ITEM_BITMAP::GetBoundingBox(), REFERENCE_IMAGE::operator==(), and REFERENCE_IMAGE::Similarity().
|
inline |
Definition at line 105 of file bitmap_base.h.
References m_image.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_DATA_TEST_CASE_F(), KIGFX::CAIRO_GAL_BASE::DrawBitmap(), KIGFX::GAL_MODERN::DrawBitmap(), KIGFX::OPENGL_GAL::DrawBitmap(), and CONSTRAINT_BADGE_ITEM::ViewDraw().
| void BITMAP_BASE::ImportData | ( | BITMAP_BASE & | aItem | ) |
Copy aItem image to this object and update m_bitmap.
Definition at line 153 of file bitmap_base.cpp.
References BITMAP_BASE(), m_image, m_imageData, m_imageId, m_imageType, m_isMirroredX, m_isMirroredY, m_originalImage, m_pixelSizeIu, m_ppi, m_rotation, m_scale, and rebuildBitmap().
Referenced by PANEL_IMAGE_EDITOR::TransferToImage().
| void BITMAP_BASE::InvertColors | ( | ) |
Invert the colours of the image (e.g.
white becomes black).
The alpha channel is not modified.
Definition at line 642 of file bitmap_base.cpp.
References invertImageInPlace(), m_bitmapDirty, m_image, m_imageData, m_imageId, and m_originalImage.
|
staticprivate |
Invert the colour of every pixel of the wxImage in-place without allocating a new image.
The alpha channel is not modified.
Definition at line 526 of file bitmap_base.cpp.
Referenced by InvertColors().
|
inline |
Definition at line 256 of file bitmap_base.h.
References m_isMirroredX.
Referenced by KIGFX::GAL_MODERN::DrawBitmap(), and KIGFX::OPENGL_GAL::DrawBitmap().
|
inline |
Definition at line 257 of file bitmap_base.h.
References m_isMirroredY.
Referenced by KIGFX::GAL_MODERN::DrawBitmap(), and KIGFX::OPENGL_GAL::DrawBitmap().
| bool BITMAP_BASE::LoadLegacyData | ( | LINE_READER & | aLine, |
| wxString & | aErrorMsg ) |
Load an image data saved by SaveImageData.
The file format must be png format in hexadecimal.
| aLine | the LINE_READER used to read the data file. |
| aErrorMsg | Description of the error if an error occurs while loading the png bitmap data. |
Definition at line 262 of file bitmap_base.cpp.
References LINE_READER::Line(), m_bitmap, m_image, m_originalImage, LINE_READER::ReadLine(), and updateImageDataBuffer().
Referenced by DRAWING_SHEET_PARSER::readPngdata().
| void BITMAP_BASE::Mirror | ( | FLIP_DIRECTION | aFlipDirection | ) |
Mirror image vertically (i.e.
relative to its horizontal X axis ) or horizontally (i.e relative to its vertical Y axis).
| aFlipDirection | the direction to flip the image. |
Definition at line 543 of file bitmap_base.cpp.
References m_bitmapDirty, m_image, m_imageData, m_isMirroredX, m_isMirroredY, mirrorImageInPlace(), and TOP_BOTTOM.
Referenced by PCB_IO_EASYEDAPRO_PARSER::ParseBoard(), PCB_IO_EASYEDAPRO_V3_PARSER::ParseBoard(), and PCB_IO_EASYEDAPRO_V3_PARSER::ParseFootprint().
|
staticprivate |
Mirror the wxImage pixel data in-place without allocating a new image.
Definition at line 455 of file bitmap_base.cpp.
References LEFT_RIGHT.
Referenced by Mirror().
| void BITMAP_BASE::PlotImage | ( | PLOTTER * | aPlotter, |
| const VECTOR2I & | aPos, | ||
| const KIGFX::COLOR4D & | aDefaultColor, | ||
| int | aDefaultPensize ) const |
Plot bitmap on plotter.
If the plotter does not support bitmaps, plot a
| aPlotter | the plotter to use. |
| aPos | the position of the center of the bitmap. |
| aDefaultColor | the color used to plot the rectangle when bitmap is not supported. |
| aDefaultPensize | the pen size used to plot the rectangle when bitmap is not supported. |
Definition at line 668 of file bitmap_base.cpp.
References GetScalingFactor(), m_image, PLOTTER::PlotImage(), PLOTTER::SetColor(), and PLOTTER::SetCurrentLineWidth().
Referenced by PlotDrawingSheet().
| bool BITMAP_BASE::ReadImageFile | ( | const wxString & | aFullFilename | ) |
Reads and stores in memory an image file.
Initialize the bitmap format used to draw this item. Supported images formats are format supported by wxImage if all handlers are loaded. By default, .png, .jpeg are always loaded.
| aFullFilename | The full filename of the image file to read. |
Definition at line 207 of file bitmap_base.cpp.
References ReadImageFile().
Referenced by BOOST_AUTO_TEST_CASE(), loadAsJpeg(), DRAWING_SHEET_PARSER::parseBitmap(), and ReadImageFile().
| bool BITMAP_BASE::ReadImageFile | ( | wxInputStream & | aInStream | ) |
Reads and stores in memory an image file.
Initialize the bitmap format used to draw this item.
Supported images formats are format supported by wxImage if all handlers are loaded. By default, .png, .jpeg are always loaded.
| aInStream | an input stream containing the file data. |
Definition at line 171 of file bitmap_base.cpp.
References m_imageData, and SetImage().
| bool BITMAP_BASE::ReadImageFile | ( | wxMemoryBuffer & | aBuf | ) |
Reads and stores in memory an image file.
Initialize the bitmap format used to draw this item.
Supported images formats are format supported by wxImage if all handlers are loaded. By default, .png, .jpeg are always loaded.
| aBuf | a memory buffer containing the file data. |
Definition at line 190 of file bitmap_base.cpp.
References m_imageData, and SetImage().
|
private |
Rebuild the internal bitmap used to draw/plot image.
This must be called after a m_image change.
| aResetID | is used to reset the cache ID used for OpenGL rendering. |
Definition at line 83 of file bitmap_base.cpp.
References m_bitmap, m_bitmapDirty, m_image, and m_imageId.
Referenced by ImportData(), and SetImage().
| void BITMAP_BASE::Rotate | ( | bool | aRotateCCW | ) |
Rotate image CW or CCW.
| aRotateCCW | true to rotate CCW or false to rotate CW. |
Definition at line 560 of file bitmap_base.cpp.
References ANGLE_90, m_bitmapDirty, m_image, m_imageData, and m_rotation.
Referenced by BOOST_AUTO_TEST_CASE().
|
inline |
Definition at line 258 of file bitmap_base.h.
References m_rotation.
Referenced by BOOST_AUTO_TEST_CASE(), KIGFX::GAL_MODERN::DrawBitmap(), and KIGFX::OPENGL_GAL::DrawBitmap().
| bool BITMAP_BASE::SaveImageData | ( | wxOutputStream & | aOutStream | ) | const |
Write the bitmap data to aOutStream.
This writes binary data, not hexadecimal strings
| aOutStream | The output stream to write to. |
Definition at line 238 of file bitmap_base.cpp.
References m_image, m_imageData, and m_imageType.
Referenced by BOOST_AUTO_TEST_CASE(), compareImages(), DS_DATA_MODEL_IO::format(), PCB_IO_KICAD_SEXPR::format(), PCB_WRITER_V10::format(), PCB_WRITER_V9::format(), SCH_IO_KICAD_SEXPR::saveBitmap(), SCH_WRITER_V10::saveBitmap(), SCH_WRITER_V9::saveBitmap(), and storedImageData().
| bool BITMAP_BASE::SetImage | ( | const wxImage & | aImage | ) |
Set the image from an existing wxImage.
Definition at line 219 of file bitmap_base.cpp.
References m_image, m_originalImage, rebuildBitmap(), and updatePPI().
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), ReadImageFile(), and ReadImageFile().
|
inline |
Set the bitmap type (png, jpeg, etc.)
Definition at line 281 of file bitmap_base.h.
References m_imageType.
Referenced by TARGET3001_SCH_BUILDER::makePicture().
|
inline |
Definition at line 64 of file bitmap_base.h.
References m_pixelSizeIu.
Referenced by PLEDITOR_PRINTOUT::PrintPage().
|
inline |
Definition at line 72 of file bitmap_base.h.
References m_scale.
Referenced by DRAWING_SHEET_PARSER::parseBitmap().
|
private |
Resets the image data buffer using the current image data.
Definition at line 683 of file bitmap_base.cpp.
References m_image, m_imageData, and m_imageType.
Referenced by LoadLegacyData().
|
private |
Definition at line 110 of file bitmap_base.cpp.
References KiROUND(), m_originalImage, and m_ppi.
Referenced by SetImage().
|
mutableprivate |
The bitmap used to draw/plot image.
Definition at line 338 of file bitmap_base.h.
Referenced by BITMAP_BASE(), BITMAP_BASE(), DrawBitmap(), ensureBitmapUpToDate(), LoadLegacyData(), rebuildBitmap(), and ~BITMAP_BASE().
|
mutableprivate |
True when m_bitmap needs rebuilding from m_image.
Definition at line 339 of file bitmap_base.h.
Referenced by BeginPreviewImage(), BITMAP_BASE(), BITMAP_BASE(), ConvertColourToAlpha(), ConvertToGreyscale(), EndPreviewImage(), ensureBitmapUpToDate(), InvertColors(), Mirror(), rebuildBitmap(), and Rotate().
|
private |
The raw, uncompressed image data.
Definition at line 336 of file bitmap_base.h.
Referenced by BeginPreviewImage(), BITMAP_BASE(), BITMAP_BASE(), ConvertColourToAlpha(), ConvertToGreyscale(), EndPreviewImage(), ensureBitmapUpToDate(), GetImageData(), GetImageData(), GetSize(), GetSizePixels(), ImportData(), InvertColors(), LoadLegacyData(), Mirror(), PlotImage(), rebuildBitmap(), Rotate(), SaveImageData(), SetImage(), updateImageDataBuffer(), and ~BITMAP_BASE().
|
mutableprivate |
Cached encoded image data (PNG/JPEG).
Definition at line 320 of file bitmap_base.h.
Referenced by BITMAP_BASE(), ConvertColourToAlpha(), ConvertToGreyscale(), ImportData(), InvertColors(), Mirror(), ReadImageFile(), ReadImageFile(), Rotate(), SaveImageData(), and updateImageDataBuffer().
|
private |
Definition at line 344 of file bitmap_base.h.
Referenced by BeginPreviewImage(), BITMAP_BASE(), ConvertColourToAlpha(), ConvertToGreyscale(), EndPreviewImage(), GetImageID(), ImportData(), InvertColors(), and rebuildBitmap().
|
private |
The image type (png, jpeg, etc.).
Definition at line 321 of file bitmap_base.h.
Referenced by BITMAP_BASE(), BITMAP_BASE(), GetImageType(), ImportData(), SaveImageData(), SetImageType(), and updateImageDataBuffer().
|
private |
Definition at line 345 of file bitmap_base.h.
Referenced by BeginPreviewImage(), BITMAP_BASE(), BITMAP_BASE(), EndPreviewImage(), ImportData(), IsMirroredX(), and Mirror().
|
private |
Definition at line 346 of file bitmap_base.h.
Referenced by BeginPreviewImage(), BITMAP_BASE(), BITMAP_BASE(), EndPreviewImage(), ImportData(), IsMirroredY(), and Mirror().
|
private |
Raw image data, not transformed by rotate/mirror.
Definition at line 337 of file bitmap_base.h.
Referenced by BeginPreviewImage(), BITMAP_BASE(), BITMAP_BASE(), ConvertColourToAlpha(), ConvertToGreyscale(), EndPreviewImage(), GetLegacyPPI(), GetOriginalImageData(), ImportData(), InvertColors(), LoadLegacyData(), SetImage(), updatePPI(), and ~BITMAP_BASE().
|
private |
The scaling factor of the bitmap to convert the bitmap size (in pixels) to internal KiCad units.
This usually does not change.
Definition at line 340 of file bitmap_base.h.
Referenced by BITMAP_BASE(), BITMAP_BASE(), GetPixelSizeIu(), GetScalingFactor(), ImportData(), and SetPixelSizeIu().
|
private |
The bitmap definition. The default is 300PPI.
Definition at line 343 of file bitmap_base.h.
Referenced by BITMAP_BASE(), BITMAP_BASE(), GetLegacyPPI(), GetPPI(), ImportData(), and updatePPI().
|
private |
Set only while a preview is showing.
Definition at line 334 of file bitmap_base.h.
Referenced by BeginPreviewImage(), and EndPreviewImage().
|
private |
Definition at line 347 of file bitmap_base.h.
Referenced by BeginPreviewImage(), BITMAP_BASE(), BITMAP_BASE(), EndPreviewImage(), ImportData(), Rotate(), and Rotation().
|
private |
The scaling factor of the bitmap with m_pixelSizeIu, controls the actual draw size.
Definition at line 318 of file bitmap_base.h.
Referenced by BITMAP_BASE(), BITMAP_BASE(), GetScale(), GetScalingFactor(), ImportData(), and SetScale().