KiCad PCB EDA Suite
Loading...
Searching...
No Matches
BITMAPCONV_INFO Class Reference

#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
 
REPORTERm_reporter
 

Detailed Description

Definition at line 44 of file bitmap2component.h.

Constructor & Destructor Documentation

◆ BITMAPCONV_INFO()

BITMAPCONV_INFO::BITMAPCONV_INFO ( std::string &  aData,
REPORTER aReporter 
)

Member Function Documentation

◆ ConvertBitmap()

int BITMAPCONV_INFO::ConvertBitmap ( potrace_bitmap_t *  aPotrace_bitmap,
OUTPUT_FMT_ID  aFormat,
int  aDpi_X,
int  aDpi_Y,
const wxString &  aLayer 
)

◆ createOutputData()

◆ outputDataEnd()

void BITMAPCONV_INFO::outputDataEnd ( )
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().

◆ outputDataHeader()

void BITMAPCONV_INFO::outputDataHeader ( const wxString &  aBrdLayerName)
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().

◆ outputOnePolygon()

void BITMAPCONV_INFO::outputOnePolygon ( SHAPE_LINE_CHAIN aPolygon,
const wxString &  aBrdLayerName 
)
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().

Member Data Documentation

◆ m_CmpName

std::string BITMAPCONV_INFO::m_CmpName
private

Definition at line 53 of file bitmap2component.h.

Referenced by BITMAPCONV_INFO(), and outputDataHeader().

◆ m_Data

std::string& BITMAPCONV_INFO::m_Data
private

Definition at line 54 of file bitmap2component.h.

Referenced by outputDataEnd(), outputDataHeader(), and outputOnePolygon().

◆ m_Format

enum OUTPUT_FMT_ID BITMAPCONV_INFO::m_Format
private

◆ m_Paths

potrace_path_t* BITMAPCONV_INFO::m_Paths
private

Definition at line 52 of file bitmap2component.h.

Referenced by BITMAPCONV_INFO(), ConvertBitmap(), and createOutputData().

◆ m_PixmapHeight

int BITMAPCONV_INFO::m_PixmapHeight
private

◆ m_PixmapWidth

int BITMAPCONV_INFO::m_PixmapWidth
private

◆ m_reporter

REPORTER& BITMAPCONV_INFO::m_reporter
private

Definition at line 55 of file bitmap2component.h.

Referenced by ConvertBitmap(), and createOutputData().

◆ m_ScaleX

double BITMAPCONV_INFO::m_ScaleX
private

◆ m_ScaleY

double BITMAPCONV_INFO::m_ScaleY
private

The documentation for this class was generated from the following files: