Commit 51a84547 authored by jean-pierre charras's avatar jean-pierre charras

bitmap2component: use BOOST:POLYGON instead of KBool, and minor enhancements.

parent 4cbcf56c
......@@ -45,6 +45,8 @@
#define KEYWORD_FRAME_SIZEY wxT( "Bmconverter_Size_y" )
#define KEYWORD_LAST_INPUT_FILE wxT( "Last_input" )
#define KEYWORD_LAST_OUTPUT_FILE wxT( "Last_output" )
#define KEYWORD_BINARY_THRESHOLD wxT( "Threshold" )
#define KEYWORD_BW_NEGATIVE wxT( "Negative_choice" )
extern int bitmap2component( potrace_bitmap_t* aPotrace_bitmap, FILE* aOutfile, int aFormat );
......@@ -88,6 +90,7 @@ private:
BM2CMP_FRAME::BM2CMP_FRAME() : BM2CMP_FRAME_BASE( NULL )
{
int tmp;
m_Config = new wxConfig();
m_Config->Read( KEYWORD_FRAME_POSX, & m_FramePos.x, -1 );
m_Config->Read( KEYWORD_FRAME_POSY, & m_FramePos.y, -1 );
......@@ -95,6 +98,11 @@ BM2CMP_FRAME::BM2CMP_FRAME() : BM2CMP_FRAME_BASE( NULL )
m_Config->Read( KEYWORD_FRAME_SIZEY, & m_FrameSize.y, -1 );
m_Config->Read( KEYWORD_LAST_INPUT_FILE, &m_BitmapFileName );
m_Config->Read( KEYWORD_LAST_OUTPUT_FILE, &m_ConvertedFileName );
if( m_Config->Read( KEYWORD_BINARY_THRESHOLD, &tmp ) )
m_sliderThreshold->SetValue( tmp );
if( m_Config->Read( KEYWORD_BW_NEGATIVE, &tmp ) )
m_rbOptions->SetSelection( tmp ? 1 : 0 );
// Give an icon
wxIcon icon;
......@@ -127,6 +135,8 @@ BM2CMP_FRAME::~BM2CMP_FRAME()
m_Config->Write( KEYWORD_FRAME_SIZEY, (long) m_FrameSize.y );
m_Config->Write( KEYWORD_LAST_INPUT_FILE, m_BitmapFileName );
m_Config->Write( KEYWORD_LAST_OUTPUT_FILE, m_ConvertedFileName );
m_Config->Write( KEYWORD_BINARY_THRESHOLD, m_sliderThreshold->GetValue() );
m_Config->Write( KEYWORD_BW_NEGATIVE, m_rbOptions->GetSelection() );
delete m_Config;
......@@ -390,16 +400,12 @@ void BM2CMP_FRAME::ExportFile( FILE* aOutfile, int aFormat )
}
// BM_TO_CMP_APP
void EDA_APP::MacOpenFile(const wxString &fileName)
{
}
// EDA_APP
IMPLEMENT_APP( EDA_APP )
///-----------------------------------------------------------------------------
// BM_TO_CMP_APP
// EDA_APP
// main program
//-----------------------------------------------------------------------------
......@@ -415,3 +421,8 @@ bool EDA_APP::OnInit()
return true;
}
void EDA_APP::MacOpenFile(const wxString &fileName)
{
}
This diff is collapsed.
......@@ -77,10 +77,11 @@ typedef struct potrace_dpoint_s potrace_dpoint_t;
/* closed curve segment */
struct potrace_curve_s
{
int n; /* number of segments */
int* tag; /* tag[n]: POTRACE_CURVETO or POTRACE_CORNER */
potrace_dpoint_t( * c )[3]; /* c[n][3]: control points.
* c[n][0] is unused for tag[n]=POTRACE_CORNER */
int n; // number of segments
int* tag; // tag[n]: POTRACE_CURVETO or POTRACE_CORNER
potrace_dpoint_t( * c )[3]; /* c[n][3]: control points.
* c[n][0] is unused for tag[n]=POTRACE_CORNER
*/
};
typedef struct potrace_curve_s potrace_curve_t;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment