KiCad PCB EDA Suite
|
#include <bitmap2component.h>
Public Member Functions | |
BITMAPCONV_INFO (std::string &aData) | |
int | ConvertBitmap (potrace_bitmap_t *aPotrace_bitmap, OUTPUT_FMT_ID aFormat, int aDpi_X, int aDpi_Y, BMP2CMP_MOD_LAYER aModLayer) |
Run the conversion of the bitmap. | |
std::string & | GetErrorMessages () |
Private Member Functions | |
void | createOutputData (BMP2CMP_MOD_LAYER aModLayer=(BMP2CMP_MOD_LAYER) 0) |
Creates the data specified by m_Format. | |
void | outputDataHeader (const char *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. | |
const char * | getBoardLayerName (BMP2CMP_MOD_LAYER aChoice) |
void | outputOnePolygon (SHAPE_LINE_CHAIN &aPolygon, const char *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 |
std::string | m_errors |
Definition at line 59 of file bitmap2component.h.
BITMAPCONV_INFO::BITMAPCONV_INFO | ( | std::string & | aData | ) |
Definition at line 64 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, | ||
BMP2CMP_MOD_LAYER | aModLayer | ||
) |
Run the conversion of the bitmap.
Definition at line 77 of file bitmap2component.cpp.
References bm_free(), createOutputData(), EESCHEMA_FMT, KICAD_WKS_LOGO, m_errors, m_Format, m_Paths, m_PixmapHeight, m_PixmapWidth, m_ScaleX, m_ScaleY, PCB_IU_PER_MM, PCBNEW_KICAD_MOD, PL_IU_PER_MM, POSTSCRIPT_FMT, and SCH_IU_PER_MM.
Referenced by BITMAP2CMP_PANEL::ExportToBuffer().
|
private |
Creates the data specified by m_Format.
Definition at line 442 of file bitmap2component.cpp.
References SHAPE_POLY_SET::Append(), BezierToPolyline(), SHAPE_POLY_SET::BooleanSubtract(), SHAPE_POLY_SET::Fracture(), getBoardLayerName(), m_errors, m_Paths, m_ScaleX, m_ScaleY, MOD_LYR_FSILKS, SHAPE_POLY_SET::NewOutline(), SHAPE_POLY_SET::NormalizeAreaOutlines(), SHAPE_POLY_SET::Outline(), SHAPE_POLY_SET::OutlineCount(), outputDataEnd(), outputDataHeader(), outputOnePolygon(), SHAPE_POLY_SET::PM_STRICTLY_SIMPLE, SHAPE_POLY_SET::RemoveAllContours(), and SHAPE_POLY_SET::Simplify().
Referenced by ConvertBitmap().
|
private |
aChoice | = the choice (MOD_LYR_FSILKS to MOD_LYR_FINAL) |
Definition at line 162 of file bitmap2component.cpp.
References MOD_LYR_COMMENTS, MOD_LYR_DRAWINGS, MOD_LYR_ECO1, MOD_LYR_ECO2, MOD_LYR_FAB, MOD_LYR_FSILKS, and MOD_LYR_FSOLDERMASK.
Referenced by createOutputData().
|
inline |
Definition at line 82 of file bitmap2component.h.
References m_errors.
Referenced by BITMAP2CMP_PANEL::ExportToBuffer().
|
private |
Function outputDataEnd write to file the last strings depending on file format.
Definition at line 292 of file bitmap2component.cpp.
References EESCHEMA_FMT, KICAD_WKS_LOGO, m_Data, m_Format, PCBNEW_KICAD_MOD, and POSTSCRIPT_FMT.
Referenced by createOutputData().
|
private |
Function outputDataHeader write to file the header depending on file format.
Definition at line 200 of file bitmap2component.cpp.
References EESCHEMA_FMT, GetMajorMinorVersion(), KICAD_WKS_LOGO, m_CmpName, m_Data, m_Format, m_PixmapHeight, m_PixmapWidth, m_ScaleY, PCBNEW_KICAD_MOD, POSTSCRIPT_FMT, and SCH_IU_PER_MM.
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 318 of file bitmap2component.cpp.
References SHAPE_LINE_CHAIN::CPoint(), EESCHEMA_FMT, KICAD_WKS_LOGO, m_Data, m_Format, m_PixmapHeight, m_PixmapWidth, m_ScaleX, m_ScaleY, PCB_IU_PER_MM, PCBNEW_KICAD_MOD, PL_IU_PER_MM, SHAPE_LINE_CHAIN::PointCount(), POSTSCRIPT_FMT, SCH_IU_PER_MM, SCH_LINE_THICKNESS_MM, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by createOutputData().
|
private |
Definition at line 68 of file bitmap2component.h.
Referenced by BITMAPCONV_INFO(), and outputDataHeader().
|
private |
Definition at line 69 of file bitmap2component.h.
Referenced by outputDataEnd(), outputDataHeader(), and outputOnePolygon().
|
private |
Definition at line 70 of file bitmap2component.h.
Referenced by ConvertBitmap(), createOutputData(), and GetErrorMessages().
|
private |
Definition at line 62 of file bitmap2component.h.
Referenced by BITMAPCONV_INFO(), ConvertBitmap(), outputDataEnd(), outputDataHeader(), and outputOnePolygon().
|
private |
Definition at line 67 of file bitmap2component.h.
Referenced by BITMAPCONV_INFO(), ConvertBitmap(), and createOutputData().
|
private |
Definition at line 64 of file bitmap2component.h.
Referenced by BITMAPCONV_INFO(), ConvertBitmap(), outputDataHeader(), and outputOnePolygon().
|
private |
Definition at line 63 of file bitmap2component.h.
Referenced by BITMAPCONV_INFO(), ConvertBitmap(), outputDataHeader(), and outputOnePolygon().
|
private |
Definition at line 65 of file bitmap2component.h.
Referenced by BITMAPCONV_INFO(), ConvertBitmap(), createOutputData(), and outputOnePolygon().
|
private |
Definition at line 66 of file bitmap2component.h.
Referenced by BITMAPCONV_INFO(), ConvertBitmap(), createOutputData(), outputDataHeader(), and outputOnePolygon().