KiCad PCB EDA Suite
|
#include <bitmap2component.h>
Public Member Functions | |
BITMAPCONV_INFO (std::string &aData, REPORTER &aReporter) | |
int | ConvertBitmap (potrace_bitmap_t *aPotrace_bitmap, OUTPUT_FMT_ID aFormat, int aDpi_X, int aDpi_Y, const wxString &aLayer) |
Run the conversion of the bitmap. | |
Private Member Functions | |
void | createOutputData (const wxString &aBrdLayerName=wxT("F.SilkS")) |
Creates the data specified by m_Format. | |
void | outputDataHeader (const wxString &aBrdLayerName) |
Function outputDataHeader write to file the header depending on file format. | |
void | outputDataEnd () |
Function outputDataEnd write to file the last strings depending on file format. | |
void | outputOnePolygon (SHAPE_LINE_CHAIN &aPolygon, const wxString &aBrdLayerName) |
Function outputOnePolygon write one polygon to output file. | |
Private Attributes | |
enum OUTPUT_FMT_ID | m_Format |
int | m_PixmapWidth |
int | m_PixmapHeight |
double | m_ScaleX |
double | m_ScaleY |
potrace_path_t * | m_Paths |
std::string | m_CmpName |
std::string & | m_Data |
REPORTER & | m_reporter |
Definition at line 44 of file bitmap2component.h.
BITMAPCONV_INFO::BITMAPCONV_INFO | ( | std::string & | aData, |
REPORTER & | aReporter | ||
) |
Definition at line 61 of file bitmap2component.cpp.
References m_CmpName, m_Format, m_Paths, m_PixmapHeight, m_PixmapWidth, m_ScaleX, m_ScaleY, and POSTSCRIPT_FMT.
int BITMAPCONV_INFO::ConvertBitmap | ( | potrace_bitmap_t * | aPotrace_bitmap, |
OUTPUT_FMT_ID | aFormat, | ||
int | aDpi_X, | ||
int | aDpi_Y, | ||
const wxString & | aLayer | ||
) |
Run the conversion of the bitmap.
Definition at line 75 of file bitmap2component.cpp.
References bm_free(), createOutputData(), DRAWING_SHEET_FMT, FOOTPRINT_FMT, m_Format, m_Paths, m_PixmapHeight, m_PixmapWidth, m_reporter, m_ScaleX, m_ScaleY, PCB_IU_PER_MM, PL_IU_PER_MM, POSTSCRIPT_FMT, REPORTER::Report(), RPT_SEVERITY_ERROR, SCH_IU_PER_MM, SYMBOL_FMT, and SYMBOL_PASTE_FMT.
Referenced by BITMAP2CMP_PANEL::ExportToBuffer().
|
private |
Creates the data specified by m_Format.
Definition at line 378 of file bitmap2component.cpp.
References _, SHAPE_POLY_SET::Append(), BezierToPolyline(), SHAPE_POLY_SET::BooleanSubtract(), SHAPE_POLY_SET::Fracture(), m_Paths, m_reporter, m_ScaleX, m_ScaleY, SHAPE_POLY_SET::NewOutline(), SHAPE_POLY_SET::NormalizeAreaOutlines(), SHAPE_POLY_SET::Outline(), SHAPE_POLY_SET::OutlineCount(), outputDataEnd(), outputDataHeader(), outputOnePolygon(), SHAPE_POLY_SET::RemoveAllContours(), REPORTER::Report(), RPT_SEVERITY_ERROR, and SHAPE_POLY_SET::Simplify().
Referenced by ConvertBitmap().
|
private |
Function outputDataEnd write to file the last strings depending on file format.
Definition at line 237 of file bitmap2component.cpp.
References DRAWING_SHEET_FMT, FOOTPRINT_FMT, m_Data, m_Format, POSTSCRIPT_FMT, SYMBOL_FMT, and SYMBOL_PASTE_FMT.
Referenced by createOutputData().
|
private |
Function outputDataHeader write to file the header depending on file format.
Definition at line 152 of file bitmap2component.cpp.
References DRAWING_SHEET_FMT, FOOTPRINT_FMT, GetMajorMinorVersion(), KI_FALLTHROUGH, m_CmpName, m_Data, m_Format, m_PixmapHeight, m_PixmapWidth, m_ScaleY, POSTSCRIPT_FMT, SCH_IU_PER_MM, SYMBOL_FMT, and SYMBOL_PASTE_FMT.
Referenced by createOutputData().
|
private |
Function outputOnePolygon write one polygon to output file.
Polygon coordinates are expected scaled by the polygon extraction function
Definition at line 268 of file bitmap2component.cpp.
References SHAPE_LINE_CHAIN::CPoint(), DRAWING_SHEET_FMT, FOOTPRINT_FMT, KiROUND(), m_Data, m_Format, m_PixmapHeight, m_PixmapWidth, m_ScaleX, m_ScaleY, PCB_IU_PER_MM, PL_IU_PER_MM, SHAPE_LINE_CHAIN::PointCount(), POSTSCRIPT_FMT, SCH_IU_PER_MM, SCH_LINE_THICKNESS_MM, SYMBOL_FMT, SYMBOL_PASTE_FMT, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by createOutputData().
|
private |
Definition at line 53 of file bitmap2component.h.
Referenced by BITMAPCONV_INFO(), and outputDataHeader().
|
private |
Definition at line 54 of file bitmap2component.h.
Referenced by outputDataEnd(), outputDataHeader(), and outputOnePolygon().
|
private |
Definition at line 47 of file bitmap2component.h.
Referenced by BITMAPCONV_INFO(), ConvertBitmap(), outputDataEnd(), outputDataHeader(), and outputOnePolygon().
|
private |
Definition at line 52 of file bitmap2component.h.
Referenced by BITMAPCONV_INFO(), ConvertBitmap(), and createOutputData().
|
private |
Definition at line 49 of file bitmap2component.h.
Referenced by BITMAPCONV_INFO(), ConvertBitmap(), outputDataHeader(), and outputOnePolygon().
|
private |
Definition at line 48 of file bitmap2component.h.
Referenced by BITMAPCONV_INFO(), ConvertBitmap(), outputDataHeader(), and outputOnePolygon().
|
private |
Definition at line 55 of file bitmap2component.h.
Referenced by ConvertBitmap(), and createOutputData().
|
private |
Definition at line 50 of file bitmap2component.h.
Referenced by BITMAPCONV_INFO(), ConvertBitmap(), createOutputData(), and outputOnePolygon().
|
private |
Definition at line 51 of file bitmap2component.h.
Referenced by BITMAPCONV_INFO(), ConvertBitmap(), createOutputData(), outputDataHeader(), and outputOnePolygon().