Commit 2a801170 authored by charras's avatar charras

Commit patch for plot functions from Lorenzo

parent ed71f4b7
......@@ -329,7 +329,7 @@ bool EDA_TextStruct::TextHitTest( EDA_Rect& refArea )
void EDA_TextStruct::Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC,
const wxPoint& aOffset, EDA_Colors aColor,
int aDrawMode,
GRFillMode aFillMode, EDA_Colors aAnchor_color )
GRTraceMode aFillMode, EDA_Colors aAnchor_color )
/***************************************************************/
/** Function Draw
......@@ -399,7 +399,7 @@ void EDA_TextStruct::Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC,
void EDA_TextStruct::DrawOneLineOfText( WinEDA_DrawPanel* aPanel, wxDC* aDC,
const wxPoint& aOffset, EDA_Colors aColor,
int aDrawMode,
GRFillMode aFillMode, EDA_Colors aAnchor_color,
GRTraceMode aFillMode, EDA_Colors aAnchor_color,
wxString& aText, wxPoint aPos )
{
int width = m_Width;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -19,6 +19,7 @@
#define EDA_DRAWBASE
#include "hershey_fonts.h"
#include "plot_common.h"
/* factor used to calculate actual size of shapes from hershey fonts (could be adjusted depending on the font name)
* Its value is choosen in order to have letters like M, P .. vertical size equal to the vertical char size parameter
......@@ -170,9 +171,19 @@ static void DrawGraphicTextPline(
bool sketch_mode,
int point_count,
wxPoint* coord,
void (* aCallback)( int x0, int y0, int xf, int yf ) )
void (* aCallback)(int x0, int y0, int xf, int yf ),
Plotter *plotter )
{
if( aCallback )
if( plotter )
{
plotter->move_to(coord[0]);
for( int ik = 1; ik < point_count; ik++ )
{
plotter->line_to( coord[ik] );
}
plotter->pen_finish();
}
else if (aCallback)
{
for( int ik = 0; ik < (point_count - 1); ik++ )
{
......@@ -216,8 +227,6 @@ static int overbar_position( int size_v, int thickness )
* Use a value min(aSize.x, aSize.y) / 5 for a bold text
* @param aItalic = true to simulate an italic font
* @param aBold = true to use a bold font. Useful only with default width value (aWidth = 0)
* @param aCallback() = function called (if non null) to draw each segment.
* used to draw 3D texts or for plotting, NULL for normal drawings
*/
/****************************************************************************************************/
void DrawGraphicText( WinEDA_DrawPanel* aPanel,
......@@ -232,13 +241,14 @@ void DrawGraphicText( WinEDA_DrawPanel* aPanel,
int aWidth,
bool aItalic,
bool aBold,
void (* aCallback)( int x0, int y0, int xf, int yf ) )
void (* aCallback)( int x0, int y0, int xf, int yf ),
Plotter *plotter )
/****************************************************************************************************/
{
int char_count, AsciiCode;
int AsciiCode;
int x0, y0;
int size_h, size_v;
int ptr;
unsigned ptr;
int dx, dy; // Draw coordinate for segments to draw. also used in some other calculation
wxPoint current_char_pos; // Draw coordinates for the current char
wxPoint overbar_pos; // Start point for the current overbar
......@@ -270,7 +280,7 @@ void DrawGraphicText( WinEDA_DrawPanel* aPanel,
if( size_h < 0 ) // text is mirrored using size.x < 0 (mirror / Y axis)
italic_reverse = true;
char_count = NegableTextLength( aText );
unsigned char_count = NegableTextLength( aText );
if( char_count == 0 )
return;
......@@ -351,8 +361,14 @@ void DrawGraphicText( WinEDA_DrawPanel* aPanel,
RotatePoint( &current_char_pos, aPos, aOrient );
RotatePoint( &end, aPos, aOrient );
if( aCallback )
if( plotter ) {
plotter->move_to(current_char_pos);
plotter->finish_to( end );
}
else if (aCallback)
{
aCallback( current_char_pos.x, current_char_pos.y, end.x, end.y );
}
else
GRLine( &aPanel->m_ClipBox, aDC,
current_char_pos.x, current_char_pos.y, end.x, end.y, aWidth, aColor );
......@@ -401,7 +417,7 @@ void DrawGraphicText( WinEDA_DrawPanel* aPanel,
coord[1] = overbar_pos;
/* Plot the overbar segment */
DrawGraphicTextPline( aPanel, aDC, aColor, aWidth,
sketch_mode, 2, coord, aCallback );
sketch_mode, 2, coord, aCallback, plotter );
}
continue; /* Skip ~ processing */
}
......@@ -439,7 +455,8 @@ void DrawGraphicText( WinEDA_DrawPanel* aPanel,
if( aWidth <= 1 )
aWidth = 0;
DrawGraphicTextPline( aPanel, aDC, aColor, aWidth,
sketch_mode, point_count, coord, aCallback );
sketch_mode, point_count, coord,
aCallback, plotter );
}
point_count = 0;
}
......@@ -481,51 +498,8 @@ void DrawGraphicText( WinEDA_DrawPanel* aPanel,
coord[1] = overbar_pos;
/* Plot the overbar segment */
DrawGraphicTextPline( aPanel, aDC, aColor, aWidth,
sketch_mode, 2, coord, aCallback );
}
}
/* functions used to plot texts, using DrawGraphicText() with a call back function */
static void (*MovePenFct)( wxPoint pos, int state ); // a pointer to actual plot function (HPGL, PS, ..)
static bool s_Plotbegin; // Flag to init plot
/*
* The call back function
*/
/****************************************************************/
static void s_Callback_plot( int x0, int y0, int xf, int yf )
/****************************************************************/
{
static wxPoint PenLastPos;
wxPoint pstart;
pstart.x = x0;
pstart.y = y0;
wxPoint pend;
pend.x = xf;
pend.y = yf;
if( s_Plotbegin ) // First segment to plot
{
MovePenFct( pstart, 'U' );
MovePenFct( pend, 'D' );
s_Plotbegin = false;
}
else
{
if( PenLastPos == pstart ) // this is a next segment in a polyline
{
MovePenFct( pend, 'D' );
}
else // New segment to plot
{
MovePenFct( pstart, 'U' );
MovePenFct( pend, 'D' );
sketch_mode, 2, coord, aCallback, plotter );
}
}
PenLastPos = pend;
}
......@@ -546,8 +520,7 @@ static void s_Callback_plot( int x0, int y0, int xf, int yf )
* @param aBold = true to use a bold font Useful only with default width value (aWidth = 0)
*/
/******************************************************************************************/
void PlotGraphicText( int aFormat_plot,
const wxPoint& aPos,
void Plotter::text( const wxPoint& aPos,
enum EDA_Colors aColor,
const wxString& aText,
int aOrient,
......@@ -562,45 +535,22 @@ void PlotGraphicText( int aFormat_plot,
if( aWidth == 0 && aBold ) // Use default values if aWidth == 0
aWidth = GetPenSizeForBold( MIN( aSize.x, aSize.y ) );
#ifdef CLIP_PEN // made by draw and plot functions
if ( aWidth >= 0 )
aWidth = Clamp_Text_PenSize( aWidth, aSize, aBold );
else
aWidth = - Clamp_Text_PenSize( -aWidth, aSize, aBold );
#endif
// Initialise the actual function used to plot lines:
switch( aFormat_plot )
{
case PLOT_FORMAT_POST:
MovePenFct = LineTo_PS;
SetCurrentLineWidthPS( aWidth );
break;
set_current_line_width( aWidth );
case PLOT_FORMAT_HPGL:
MovePenFct = Move_Plume_HPGL;
break;
case PLOT_FORMAT_GERBER:
MovePenFct = LineTo_GERBER;
/* Gerber tool has to be set outside... */
break;
if( aColor >= 0 )
set_color( aColor );
default:
return;
}
if( aColor >= 0 && IsPostScript( aFormat_plot ) )
SetColorMapPS( aColor );
s_Plotbegin = true;
DrawGraphicText( NULL, NULL, aPos, aColor, aText,
aOrient, aSize,
aH_justify, aV_justify,
aWidth, aItalic,
aBold,
s_Callback_plot );
/* end text : pen UP ,no move */
MovePenFct( wxPoint( 0, 0 ), 'Z' );
NULL,
this );
}
......@@ -704,7 +704,8 @@ void LibDrawPin::DrawPinTexts( WinEDA_DrawPanel* panel,
* If TextInside then the text is been put inside (moving from x1, y1 in *
* the opposite direction to x2,y2), otherwise all is drawn outside. *
*****************************************************************************/
void LibDrawPin::PlotPinTexts( wxPoint& pin_pos,
void LibDrawPin::PlotPinTexts( Plotter *plotter,
wxPoint& pin_pos,
int orient,
int TextInside,
bool DrawPinNum,
......@@ -716,12 +717,10 @@ void LibDrawPin::PlotPinTexts( wxPoint& pin_pos,
EDA_Colors NameColor, NumColor;
wxSize PinNameSize = wxSize( m_PinNameSize, m_PinNameSize );
wxSize PinNumSize = wxSize( m_PinNumSize, m_PinNumSize );
bool plot_color = (g_PlotFormat == PLOT_FORMAT_POST)
&& g_PlotPSColorOpt;
/* Get the num and name colors */
NameColor = (EDA_Colors) ( plot_color ? ReturnLayerColor( LAYER_PINNAM ) : -1 );
NumColor = (EDA_Colors) ( plot_color ? ReturnLayerColor( LAYER_PINNUM ) : -1 );
NameColor = ReturnLayerColor( LAYER_PINNAM );
NumColor = ReturnLayerColor( LAYER_PINNUM );
/* Create the pin num string */
ReturnPinStringNum( StringPinNum );
......@@ -754,7 +753,7 @@ void LibDrawPin::PlotPinTexts( wxPoint& pin_pos,
if( orient == PIN_RIGHT )
{
x = x1 + TextInside;
PlotGraphicText( g_PlotFormat, wxPoint( x, y1 ), NameColor,
plotter->text( wxPoint( x, y1 ), NameColor,
m_PinName,
TEXT_ORIENT_HORIZ,
PinNameSize,
......@@ -766,7 +765,7 @@ void LibDrawPin::PlotPinTexts( wxPoint& pin_pos,
{
x = x1 - TextInside;
if( DrawPinName )
PlotGraphicText( g_PlotFormat, wxPoint( x, y1 ),
plotter->text( wxPoint( x, y1 ),
NameColor, m_PinName, TEXT_ORIENT_HORIZ,
PinNameSize,
GR_TEXT_HJUSTIFY_RIGHT,
......@@ -775,8 +774,7 @@ void LibDrawPin::PlotPinTexts( wxPoint& pin_pos,
}
if( DrawPinNum )
{
PlotGraphicText( g_PlotFormat,
wxPoint( (x1 + pin_pos.x) / 2, y1 - TXTMARGE ),
plotter->text( wxPoint( (x1 + pin_pos.x) / 2, y1 - TXTMARGE ),
NumColor, StringPinNum,
TEXT_ORIENT_HORIZ, PinNumSize,
GR_TEXT_HJUSTIFY_CENTER,
......@@ -792,7 +790,7 @@ void LibDrawPin::PlotPinTexts( wxPoint& pin_pos,
y = y1 + TextInside;
if( DrawPinName )
PlotGraphicText( g_PlotFormat, wxPoint( x1, y ), NameColor,
plotter->text( wxPoint( x1, y ), NameColor,
m_PinName,
TEXT_ORIENT_VERT, PinNameSize,
GR_TEXT_HJUSTIFY_RIGHT,
......@@ -800,8 +798,7 @@ void LibDrawPin::PlotPinTexts( wxPoint& pin_pos,
aWidth, false, false );
if( DrawPinNum )
{
PlotGraphicText( g_PlotFormat,
wxPoint( x1 - TXTMARGE,
plotter->text( wxPoint( x1 - TXTMARGE,
(y1 + pin_pos.y) / 2 ),
NumColor, StringPinNum,
TEXT_ORIENT_VERT, PinNumSize,
......@@ -815,7 +812,7 @@ void LibDrawPin::PlotPinTexts( wxPoint& pin_pos,
y = y1 - TextInside;
if( DrawPinName )
PlotGraphicText( g_PlotFormat, wxPoint( x1, y ), NameColor,
plotter->text( wxPoint( x1, y ), NameColor,
m_PinName,
TEXT_ORIENT_VERT, PinNameSize,
GR_TEXT_HJUSTIFY_LEFT,
......@@ -823,8 +820,7 @@ void LibDrawPin::PlotPinTexts( wxPoint& pin_pos,
aWidth, false, false );
if( DrawPinNum )
{
PlotGraphicText( g_PlotFormat,
wxPoint( x1 - TXTMARGE,
plotter->text( wxPoint( x1 - TXTMARGE,
(y1 + pin_pos.y) / 2 ),
NumColor, StringPinNum,
TEXT_ORIENT_VERT, PinNumSize,
......@@ -843,8 +839,7 @@ void LibDrawPin::PlotPinTexts( wxPoint& pin_pos,
if( DrawPinName )
{
x = (x1 + pin_pos.x) / 2;
PlotGraphicText( g_PlotFormat, wxPoint( x,
y1 - TXTMARGE ),
plotter->text( wxPoint( x, y1 - TXTMARGE ),
NameColor, m_PinName,
TEXT_ORIENT_HORIZ, PinNameSize,
GR_TEXT_HJUSTIFY_CENTER,
......@@ -854,7 +849,7 @@ void LibDrawPin::PlotPinTexts( wxPoint& pin_pos,
if( DrawPinNum )
{
x = (x1 + pin_pos.x) / 2;
PlotGraphicText( g_PlotFormat, wxPoint( x, y1 + TXTMARGE ),
plotter->text( wxPoint( x, y1 + TXTMARGE ),
NumColor, StringPinNum,
TEXT_ORIENT_HORIZ, PinNumSize,
GR_TEXT_HJUSTIFY_CENTER,
......@@ -867,8 +862,7 @@ void LibDrawPin::PlotPinTexts( wxPoint& pin_pos,
if( DrawPinName )
{
y = (y1 + pin_pos.y) / 2;
PlotGraphicText( g_PlotFormat, wxPoint( x1 - TXTMARGE,
y ),
plotter->text( wxPoint( x1 - TXTMARGE, y ),
NameColor, m_PinName,
TEXT_ORIENT_VERT, PinNameSize,
GR_TEXT_HJUSTIFY_CENTER,
......@@ -878,9 +872,7 @@ void LibDrawPin::PlotPinTexts( wxPoint& pin_pos,
if( DrawPinNum )
{
PlotGraphicText( g_PlotFormat,
wxPoint( x1 + TXTMARGE,
(y1 + pin_pos.y) / 2 ),
plotter->text( wxPoint( x1 + TXTMARGE, (y1 + pin_pos.y) / 2 ),
NumColor, StringPinNum,
TEXT_ORIENT_VERT, PinNumSize,
GR_TEXT_HJUSTIFY_CENTER,
......
......@@ -26,21 +26,6 @@
#define IEEE_SYMBOL_PIN_DIM 40 /* Dim of special pin symbol. */
/**
* Enum FILL_T
* is the set of fill types used in plotting or drawing enclosed areas.
*/
enum FILL_T {
NO_FILL, // Poly, Square, Circle, Arc = option No Fill
FILLED_SHAPE, /* Poly, Square, Circle, Arc = option Fill
* with current color ("Solid shape") */
FILLED_WITH_BG_BODYCOLOR, /* Poly, Square, Circle, Arc = option Fill
* with background body color, translucent
* (texts inside this shape can be seen)
* not filled in B&W mode when plotting or
* printing */
};
/**
* Enum ElectricPinType
......@@ -290,7 +275,8 @@ public:
wxPoint& pin_pos, int orient,
int TextInside, bool DrawPinNum,
bool DrawPinName, int Color, int DrawMode );
void PlotPinTexts( wxPoint& pin_pos,
void PlotPinTexts( Plotter *plotter,
wxPoint& pin_pos,
int orient,
int TextInside,
bool DrawPinNum,
......
......@@ -403,10 +403,6 @@ PARAM_CFG_ARRAY& WinEDA_SchematicFrame::GetConfigurationSettings( void )
m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColorGrid" ),
&g_GridColor,
DARKDARKGRAY ) );
m_configSettings.push_back( new PARAM_CFG_INT( true, wxT( "Pltmarg" ),
&g_PlotMargin,
300, 0, 10000 ) );
return m_configSettings;
}
......
......@@ -45,8 +45,6 @@ SCH_ITEM* g_BlockSaveDataList; // List of items to paste (Created by Block Save)
// Gestion d'options
bool g_HVLines = true; // Bool: force H or V directions (Wires, Bus ..)
int g_PlotPSColorOpt; // True = plot postcript color (see plotps.cpp)
struct EESchemaVariables g_EESchemaVar;
/* Variables globales pour Libview */
......@@ -65,11 +63,6 @@ int g_LastTextOrient = TEXT_ORIENT_HORIZ;
bool g_FlDrawSpecificUnit = FALSE;
bool g_FlDrawSpecificConvert = TRUE;
int g_PlotFormat; /* flag = TYPE_HPGL, TYPE_PS... */
int g_PlotMargin; /* Marge pour traces du cartouche */
double g_PlotScaleX;
double g_PlotScaleY; /* coeff d'echelle de trace en unites table tracante */
HPGL_Pen_Descr_Struct g_HPGL_Pen_Descr;
//SCH_SCREEN * ScreenSch;
......
......@@ -117,9 +117,6 @@ extern SCH_ITEM* g_BlockSaveDataList; // List of items to paste (Created by Bloc
// Gestion d'options
extern bool g_HVLines;
extern int g_PlotPSColorOpt; // True = plot postcript color (see plotps.cpp)
// Gestion de diverses variables, options... devant etre memorisees mais
// Remises a 0 lors d'un rechargement de projetc
struct EESchemaVariables
......@@ -152,11 +149,6 @@ extern bool g_FlDrawSpecificConvert;
/* Gestion des trace sur table tracante */
extern int g_PlotFormat; /* flag = TYPE_HPGL, TYPE_PS... */
extern int g_PlotMargin; /* Marge pour traces du cartouche */
extern double g_PlotScaleX, g_PlotScaleY; /* coeff d'echelle de trace en unites table tracante */
/* For HPGL plotting: Pen caract : */
struct HPGL_Pen_Descr_Struct
{
......
This diff is collapsed.
......@@ -28,24 +28,14 @@
#include "general.h"
#include "worksheet.h"
#include "plot_common.h"
#include "protos.h"
/* coeff de conversion dim en 1 mil -> dim en unite HPGL: */
#define SCALE_HPGL 1.02041
#include "plothpgl.h"
////@begin XPM images
////@end XPM images
extern void Move_Plume( wxPoint pos, int plume );
extern void Plume( int plume );
/* Variables locales : */
FILE* PlotOutput; /* exportee dans printps.cc */
static double Scale_X = 1;
static double Scale_Y = 1;
int HPGL_SizeSelect;
enum PageFormatReq {
......@@ -519,9 +509,6 @@ void WinEDA_PlotHPGLFrame::Plot_Schematic_HPGL( int Select_PlotAll, int HPGL_She
Ki_PageDescr* PlotSheet;
wxSize SheetSize;
wxPoint SheetOffset, PlotOffset;
int margin;
g_PlotFormat = PLOT_FORMAT_HPGL;
/* When printing all pages, the printed page is not the current page.
* In complex hierarchies, we must setup references and others parameters in the printed SCH_SCREEN
......@@ -532,7 +519,7 @@ void WinEDA_PlotHPGLFrame::Plot_Schematic_HPGL( int Select_PlotAll, int HPGL_She
sheetpath = SheetList.GetFirst();
DrawSheetPath list;
for( ; ; )
while (true)
{
if( Select_PlotAll )
{
......@@ -547,31 +534,27 @@ void WinEDA_PlotHPGLFrame::Plot_Schematic_HPGL( int Select_PlotAll, int HPGL_She
screen = schframe->m_CurrentSheet->LastScreen();
ActiveScreen = screen;
}
else // Should not occur
else // Should not happen
return;
sheetpath = SheetList.GetNext();
}
ReturnSheetDims( screen, SheetSize, SheetOffset );
/* Calcul des echelles de conversion */
g_PlotScaleX = Scale_X * SCALE_HPGL;
g_PlotScaleY = Scale_Y * SCALE_HPGL;
margin = 400; // Margin in mils
if (HPGL_SheetSize)
PlotSheet = Plot_sheet_list[HPGL_SheetSize];
else
PlotSheet = screen->m_CurrentSheetDesc;
g_PlotScaleX = g_PlotScaleX * (SheetSize.x - 2 * margin) / PlotSheet->m_Size.x;
g_PlotScaleY = g_PlotScaleY * (SheetSize.y - 2 * margin) / PlotSheet->m_Size.y;
/* 10x because eeschema works in mils, not decimils */
double plot_scale = 10 * (double)PlotSheet->m_Size.x / (double)SheetSize.x;
/* calcul des offsets */
PlotOffset.x = -(int) ( SheetOffset.x * SCALE_HPGL );
PlotOffset.y = (int) ( (SheetOffset.y + SheetSize.y) * SCALE_HPGL );
PlotOffset.x -= (int) ( margin * SCALE_HPGL );
PlotOffset.y += (int) ( margin * SCALE_HPGL );
PlotOffset.x = -SheetOffset.x;
PlotOffset.y = -SheetOffset.y;
PlotFileName = schframe->GetUniqueFilenameForCurrentSheet() + wxT( ".plt" );
SetLocaleTo_C_standard();
InitPlotParametresHPGL( PlotOffset, g_PlotScaleX, g_PlotScaleY );
Plot_1_Page_HPGL( PlotFileName, screen );
Plot_1_Page_HPGL( PlotFileName, screen, PlotSheet, PlotOffset, plot_scale );
SetLocaleTo_Default();
if( !Select_PlotAll )
......@@ -586,152 +569,54 @@ void WinEDA_PlotHPGLFrame::Plot_Schematic_HPGL( int Select_PlotAll, int HPGL_She
/**************************************************************************/
void WinEDA_PlotHPGLFrame::Plot_1_Page_HPGL( const wxString& FullFileName,
BASE_SCREEN* screen )
void WinEDA_PlotHPGLFrame::Plot_1_Page_HPGL( const wxString& FileName,
SCH_SCREEN* screen,
Ki_PageDescr* sheet,
wxPoint &offset,
double plot_scale)
/**************************************************************************/
/* Trace en format HPGL. d'une feuille de dessin
* 1 unite HPGL = 0.98 mils ( 1 mil = 1.02041 unite HPGL ) .
*/
{
EDA_BaseStruct* DrawList;
SCH_COMPONENT* DrawLibItem;
int x1 = 0, y1 = 0, x2 = 0, y2 = 0, layer;
wxString msg;
PlotOutput = wxFopen( FullFileName, wxT( "wt" ) );
if( PlotOutput == 0 )
FILE *output_file = wxFopen( FileName, wxT( "wt" ) );
if( output_file == NULL )
{
msg = _( "Unable to create " ) + FullFileName;
DisplayError( this, msg ); return;
msg = wxT( "\n** " );
msg += _( "Unable to create " ) + FileName + wxT( " **\n\n" );
m_MsgBox->AppendText( msg );
wxBell();
return;
}
msg = _( "Plot " ) + FullFileName + wxT( "\n" );
SetLocaleTo_C_standard();
msg.Printf( _( "Plot: %s\n" ), FileName.GetData() );
m_MsgBox->AppendText( msg );
HPGL_Plotter *plotter = new HPGL_Plotter();
plotter->set_paper_size(sheet);
plotter->set_viewport( offset, plot_scale, 0);
plotter->set_default_line_width( g_DrawDefaultLineThickness );
/* Init : */
PrintHeaderHPGL( PlotOutput, g_HPGL_Pen_Descr.m_Pen_Speed, g_HPGL_Pen_Descr.m_Pen_Num );
m_Parent->PlotWorkSheet( PLOT_FORMAT_HPGL, screen );
DrawList = screen->EEDrawList;
while( DrawList ) /* tracage */
{
Plume( 'U' );
layer = LAYER_NOTES;
switch( DrawList->Type() )
{
case DRAW_BUSENTRY_STRUCT_TYPE:
#undef STRUCT
#define STRUCT ( (DrawBusEntryStruct*) DrawList )
x1 = STRUCT->m_Pos.x; y1 = STRUCT->m_Pos.y;
x2 = STRUCT->m_End().x; y2 = STRUCT->m_End().y;
layer = STRUCT->GetLayer();
case DRAW_SEGMENT_STRUCT_TYPE:
#undef STRUCT
#define STRUCT ( (EDA_DrawLineStruct*) DrawList )
if( DrawList->Type() == DRAW_SEGMENT_STRUCT_TYPE )
{
x1 = STRUCT->m_Start.x; y1 = STRUCT->m_Start.y;
x2 = STRUCT->m_End.x; y2 = STRUCT->m_End.y;
layer = STRUCT->GetLayer();
}
switch( layer )
{
case LAYER_NOTES: /* Trace en pointilles */
Move_Plume( wxPoint( x1, y1 ), 'U' );
fprintf( PlotOutput, "LT 2;\n" );
Move_Plume( wxPoint( x2, y2 ), 'D' );
fprintf( PlotOutput, "LT;\n" );
break;
case LAYER_BUS: /* Trait large */
{
int deltaX = 0, deltaY = 0; double angle;
if( (x2 - x1) == 0 )
deltaX = 8;
else if( (y2 - y1) == 0 )
deltaY = 8;
else
{
angle = atan2( (double) ( x2 - x1 ), (double) ( y1 - y2 ) );
deltaX = (int) ( 8 * sin( angle ) );
deltaY = (int) ( 8 * cos( angle ) );
}
Move_Plume( wxPoint( x1 + deltaX, y1 - deltaY ), 'U' );
Move_Plume( wxPoint( x1 - deltaX, y1 + deltaY ), 'D' );
Move_Plume( wxPoint( x2 - deltaX, y2 + deltaY ), 'D' );
Move_Plume( wxPoint( x2 + deltaX, y2 - deltaY ), 'D' );
Move_Plume( wxPoint( x1 + deltaX, y1 - deltaY ), 'D' );
}
break;
plotter->set_creator(wxT("EESchema-HPGL"));
plotter->set_filename(FileName);
plotter->set_pen_speed(g_HPGL_Pen_Descr.m_Pen_Speed);
plotter->set_pen_number(g_HPGL_Pen_Descr.m_Pen_Num);
plotter->set_pen_diameter(g_HPGL_Pen_Descr.m_Pen_Diam);
plotter->set_pen_overlap(g_HPGL_Pen_Descr.m_Pen_Diam/2);
plotter->start_plot( output_file );
default:
Move_Plume( wxPoint( x1, y1 ), 'U' );
Move_Plume( wxPoint( x2, y2 ), 'D' );
break;
}
break;
case DRAW_JUNCTION_STRUCT_TYPE:
#undef STRUCT
#define STRUCT ( (DrawJunctionStruct*) DrawList )
x1 = STRUCT->m_Pos.x; y1 = STRUCT->m_Pos.y;
PlotCercle( wxPoint( x1, y1 ), DRAWJUNCTION_SIZE * 2, true );
break;
case TYPE_SCH_TEXT:
case TYPE_SCH_LABEL:
case TYPE_SCH_GLOBALLABEL:
case TYPE_SCH_HIERLABEL:
PlotTextStruct( DrawList );
break;
plotter->set_color( BLACK );
m_Parent->PlotWorkSheet( plotter, screen );
case TYPE_SCH_COMPONENT:
DrawLibItem = (SCH_COMPONENT*) DrawList;
PlotLibPart( DrawLibItem );
break;
case DRAW_PICK_ITEM_STRUCT_TYPE:
break;
case DRAW_POLYLINE_STRUCT_TYPE:
break;
case DRAW_HIERARCHICAL_PIN_SHEET_STRUCT_TYPE:
break;
case DRAW_MARKER_STRUCT_TYPE:
break;
case DRAW_SHEET_STRUCT_TYPE:
#undef STRUCT
#define STRUCT ( (DrawSheetStruct*) DrawList )
PlotSheetStruct( STRUCT );
break;
case DRAW_NOCONNECT_STRUCT_TYPE:
#undef STRUCT
#define STRUCT ( (DrawNoConnectStruct*) DrawList )
PlotNoConnectStruct( STRUCT );
break;
default:
break;
}
Plume( 'U' );
DrawList = DrawList->Next();
}
PlotDrawlist(plotter, screen->EEDrawList);
/* fin */
CloseFileHPGL( PlotOutput );
}
plotter->end_plot();
delete plotter;
SetLocaleTo_Default();
m_MsgBox->AppendText( wxT( "Ok\n" ) );
}
/*!
* wxEVT_COMMAND_RADIOBOX_SELECTED event handler for ID_RADIOBOX
......
......@@ -132,7 +132,8 @@ public:
void SetPenWidth(wxSpinEvent& event);
void SetPenSpeed(wxSpinEvent& event);
void SetPenNum(wxSpinEvent& event);
void Plot_1_Page_HPGL(const wxString & FullFileName,BASE_SCREEN * screen);
void Plot_1_Page_HPGL(const wxString &FileName, SCH_SCREEN * screen,
Ki_PageDescr* paper, wxPoint& offset, double scale);
void Plot_Schematic_HPGL(int Select_PlotAll, int HPGL_SheetSize);
void ReturnSheetDims( BASE_SCREEN * screen, wxSize & SheetSize, wxPoint & SheetOffset);
void SetPageOffsetValue();
......
This diff is collapsed.
......@@ -106,7 +106,8 @@ public:
void InitOptVars();
void CreatePSFile(int AllPages, int pagesize);
void PlotOneSheetPS(const wxString & FileName,
SCH_SCREEN * screen, Ki_PageDescr * sheet, int BBox[4], wxPoint plot_offset);
SCH_SCREEN * screen, Ki_PageDescr * sheet,
wxPoint plot_offset, double scale);
/// Should we show tooltips?
static bool ShowToolTips();
......@@ -121,6 +122,7 @@ public:
////@end WinEDA_PlotPSFrame member variables
WinEDA_DrawFrame * m_Parent;
WinEDA_ValueCtrl * m_DefaultLineSizeCtrl;
int PlotPSColorOpt;
};
#endif
......
......@@ -244,18 +244,7 @@ int CheckAnnotate(WinEDA_SchematicFrame * frame, bool OneSheetOnly);
/************/
/* PLOT.CPP */
/************/
void SetCurrentLineWidth( int width);
void PlotArc(wxPoint centre, int StAngle, int EndAngle, int rayon, int width = -1);
void PlotCercle(wxPoint centre, int diametre, bool fill, int width = -1);
void PlotPoly( int nb, int * coord, bool fill, int width = -1);
void PlotNoConnectStruct(DrawNoConnectStruct * Struct);
void PlotLibPart( SCH_COMPONENT *DrawLibItem );
/* Genere le trace d'un composant */
void PlotSheetStruct(DrawSheetStruct *Struct);
/* Routine de dessin du bloc type hierarchie */
void PlotTextStruct(EDA_BaseStruct *Struct);
void PlotDrawlist(Plotter *plotter, SCH_ITEM* drawlist );
/***************/
/* DELSHEET.CPP */
......
......@@ -342,38 +342,6 @@ static PARAM_CFG_SETCOLOR ColorDCodesCfg
WHITE /* Valeur par defaut */
);
static PARAM_CFG_INT HPGLpenNumCfg
(
wxT("HPGLnum"), /* identification */
&g_HPGL_Pen_Num, /* Adresse du parametre */
1, /* Valeur par defaut */
1, 16 /* Valeurs extremes */
);
static PARAM_CFG_INT HPGLdiamCfg
(
wxT("HPGdiam"), /* identification */
&g_HPGL_Pen_Diam, /* Adresse du parametre */
15, /* Valeur par defaut */
0,0xFFFF /* Valeurs extremes */
);
static PARAM_CFG_INT HPGLspeedCfg
(
wxT("HPGLSpd"), /* identification */
&g_HPGL_Pen_Speed, /* Adresse du parametre */
25, /* Valeur par defaut */
0,100 /* Valeurs extremes */
);
static PARAM_CFG_INT HPGLrecouvrementCfg
(
wxT("HPGLrec"), /* identification */
&g_HPGL_Pen_Recouvrement, /* Adresse du parametre */
2, /* Valeur par defaut */
0, 100 /* Valeurs extremes */
);
static PARAM_CFG_INT GERBERSpotMiniCfg
(
wxT("GERBmin"), /* identification */
......
......@@ -10,6 +10,12 @@
#include "pcbplot.h"
#include "protos.h"
/* The group of plot options - sadly global XXX */
PCB_Plot_Options g_pcb_plot_options;
/* variables locale : */
/* Routines Locales */
......@@ -24,7 +30,3 @@ void WinEDA_BasePcbFrame::ToPlotter(wxCommandEvent& event)
// frame->ShowModal(); frame->Destroy();
}
void Plume(int state)
{
}
......@@ -12,5 +12,41 @@
#define OPTKEY_PRINT_Y_FINESCALE_ADJ wxT( "PrintYFineScaleAdj" )
#define OPTKEY_PRINT_SCALE wxT( "PrintScale" )
/* Plot Options : */
struct PCB_Plot_Options {
bool Exclude_Edges_Pcb;
int PlotLine_Width;
bool Plot_Frame_Ref; // True to plot/print frame references
bool DrawViaOnMaskLayer; // True if vias are drawn on Mask layer (ie protected by mask)
int Plot_Mode;
bool Plot_Set_MIROIR;
bool Sel_Rotate_Window;
int HPGL_Pen_Num;
int HPGL_Pen_Speed;
int HPGL_Pen_Diam;
int HPGL_Pen_Recouvrement;
bool HPGL_Org_Centre; // TRUE si en HPGL, l'origine le centre de la feuille
int PlotPSColorOpt; // True for color Postscript output
bool Plot_PS_Negative; // True to create a negative board ps plot
/* Autorisation de trace des divers items en serigraphie */
bool Sel_Texte_Reference;
bool Sel_Texte_Valeur;
bool Sel_Texte_Divers;
bool Sel_Texte_Invisible;
bool PlotPadsOnSilkLayer;
bool Plot_Pads_All_Layers; /* Plot pads meme n'appartenant pas a la
couche ( utile pour serigraphie) */
/* id for plot format (see enum PlotFormat in plot_common.h) */
int PlotFormat;
int PlotOrient;
int PlotScaleOpt;
int DrillShapeOpt;
double Scale_X;
double Scale_Y;
};
extern PCB_Plot_Options g_pcb_plot_options;
#endif // ifndef PCBPLOT_H
......@@ -472,12 +472,27 @@ enum GRTextVertJustifyType {
};
/* Options to show solid segments (segments, texts...) */
enum GRFillMode {
enum GRTraceMode {
FILAIRE = 0, // segments are drawn as lines
FILLED, // normal mode: segments have thickness
SKETCH // skect mode: segments have thickness, but are not filled
};
/**
* Enum FILL_T
* is the set of fill types used in plotting or drawing enclosed areas.
*/
enum FILL_T {
NO_FILL, // Poly, Square, Circle, Arc = option No Fill
FILLED_SHAPE, /* Poly, Square, Circle, Arc = option Fill
* with current color ("Solid shape") */
FILLED_WITH_BG_BODYCOLOR, /* Poly, Square, Circle, Arc = option Fill
* with background body color, translucent
* (texts inside this shape can be seen)
* not filled in B&W mode when plotting or
* printing */
};
#define DEFAULT_SIZE_TEXT 60 /* default text height (in mils or 1/1000") */
......@@ -516,12 +531,12 @@ public:
* @param aOffset = draw offset (usually (0,0))
* @param EDA_Colors aColor = text color
* @param aDrawMode = GR_OR, GR_XOR.., -1 to use the current mode.
* @param GRFillMode aDisplay_mode = FILAIRE, FILLED or SKETCH
* @param GRTraceMode aDisplay_mode = FILAIRE, FILLED or SKETCH
* @param EDA_Colors aAnchor_color = anchor color ( UNSPECIFIED_COLOR = do not draw anchor ).
*/
void Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC,
const wxPoint& aOffset, EDA_Colors aColor,
int aDrawMode, GRFillMode aDisplay_mode = FILAIRE,
int aDrawMode, GRTraceMode aDisplay_mode = FILAIRE,
EDA_Colors aAnchor_color = UNSPECIFIED_COLOR );
private:
......@@ -540,7 +555,7 @@ private:
*/
void DrawOneLineOfText( WinEDA_DrawPanel* aPanel, wxDC* aDC,
const wxPoint& aOffset, EDA_Colors aColor,
int aDrawMode, GRFillMode aFillMode,
int aDrawMode, GRTraceMode aFillMode,
EDA_Colors aAnchor_color, wxString& aText,
wxPoint aPos );
public:
......
......@@ -7,7 +7,10 @@
#ifndef __INCLUDE__DRAWTXT_H__
#define __INCLUDE__DRAWTXT_H__ 1
#include "base_struct.h"
class WinEDA_DrawPanel;
class Plotter;
/** Function Clamp_Text_PenSize
*As a rule, pen width should not be >1/4em, otherwise the character
......@@ -19,9 +22,9 @@ class WinEDA_DrawPanel;
* @param aSize the char size (height or width, od its wxSize)
* @param aBold = true if text accept bold pen size
* @return the max pen size allowed
*/
int Clamp_Text_PenSize( int aPenSize, int aSize, bool aBold = true);
int Clamp_Text_PenSize( int aPenSize, wxSize aSize, bool aBold = true);
*/
int Clamp_Text_PenSize( int aPenSize, int aSize, bool aBold = true );
int Clamp_Text_PenSize( int aPenSize, wxSize aSize, bool aBold = true );
/** Function GetPensizeForBold
* @return the "best" value for a pen size to draw/plot a bold text
......@@ -33,7 +36,7 @@ int GetPenSizeForBold( int aTextSize );
* @return the X size of the graphic text
* the full X size is ReturnGraphicTextWidth + the thickness of graphic lines
*/
int ReturnGraphicTextWidth(const wxString& aText, int size_h, bool italic, bool bold );
int ReturnGraphicTextWidth( const wxString& aText, int size_h, bool italic, bool bold );
/** Function NegableTextLength
* Return the text length of a negable string, excluding the ~ markers */
......@@ -70,34 +73,8 @@ void DrawGraphicText( WinEDA_DrawPanel * aPanel,
int aWidth,
bool aItalic,
bool aBold,
void (*aCallback)( int x0, int y0, int xf, int yf ) = NULL );
/** Function PlotGraphicText
* same as DrawGraphicText, but plot graphic text insteed of draw it
* @param aFormat_plot = plot format (PLOT_FORMAT_POST, PLOT_FORMAT_HPGL, PLOT_FORMAT_GERBER)
* @param aPos = text position (according to aH_justify, aV_justify)
* @param aColor (enum EDA_Colors) = text color
* @param aText = text to draw
* @param aOrient = angle in 0.1 degree
* @param aSize = text size (size.x or size.y can be < 0 for mirrored texts)
* @param aH_justify = horizontal justification (Left, center, right)
* @param aV_justify = vertical justification (bottom, center, top)
* @param aWidth = line width (pen width) (default = 0)
* if width < 0 : draw segments in sketch mode, width = abs(width)
* @param aItalic = true to simulate an italic font
* @param aBold = true to use a bold font
*/
void PlotGraphicText( int aFormat_plot,
const wxPoint& aPos,
enum EDA_Colors aColor,
const wxString& aText,
int aOrient,
const wxSize& aSize,
enum GRTextHorizJustifyType aH_justify,
enum GRTextVertJustifyType aV_justify,
int aWidth,
bool aItalic,
bool aBold );
void (*aCallback)( int x0, int y0, int xf, int yf ) = NULL,
Plotter * plotter = NULL );
#endif /* __INCLUDE__DRAWTXT_H__ */
......@@ -69,24 +69,4 @@ extern wxString g_Current_PadName; // Last used pad name (pad num)
extern D_PAD g_Pad_Master;
/* Gestion des plumes en plot format HPGL */
extern int g_HPGL_Pen_Num;
extern int g_HPGL_Pen_Speed;
extern int g_HPGL_Pen_Diam;
extern int g_HPGL_Pen_Recouvrement;
extern float Scale_X;
extern float Scale_Y;
extern wxPoint g_PlotOffset;
extern int g_PlotLine_Width;
extern int g_PlotFormat;
extern int g_PlotOrient;
/* id for plot format (see enum PlotFormat in plot_common.h) */
extern int g_PlotScaleOpt;
extern int g_DrillShapeOpt;
#endif /* __PCBCOMMON_H__ */
This diff is collapsed.
......@@ -295,17 +295,20 @@ public:
// Plotting
void ToPlotter( wxCommandEvent& event );
void Plot_Serigraphie( int format_plot, FILE* File, int masque_layer );
void Genere_GERBER( const wxString& FullFileName, int Layer,
bool PlotOriginIsAuxAxis );
void Genere_HPGL( const wxString& FullFileName, int Layer );
void Genere_PS( const wxString& FullFileName, int Layer, bool useA4 );
void Plot_Layer_HPGL( FILE* File, int masque_layer,
int garde, int tracevia, int modetrace );
void Plot_Layer_GERBER( FILE* File, int masque_layer,
int garde, int tracevia );
void Plot_Layer_PS( FILE* File, int masque_layer,
int garde, int tracevia, int modetrace );
bool PlotOriginIsAuxAxis,
GRTraceMode trace_mode );
void Genere_HPGL( const wxString& FullFileName, int Layer,
GRTraceMode trace_mode);
void Genere_PS( const wxString& FullFileName, int Layer,
bool useA4, GRTraceMode trace_mode );
void Plot_Layer(Plotter *plotter, int Layer, GRTraceMode trace_mode );
void Plot_Standard_Layer( Plotter *plotter, int masque_layer,
int garde, bool trace_via,
GRTraceMode trace_mode );
void Plot_Serigraphie( Plotter *plotter, int masque_layer,
GRTraceMode trace_mode);
void PlotDrillMark(Plotter *plotter, GRTraceMode trace_mode );
/* Block operations: */
/**
......@@ -872,12 +875,12 @@ public:
void Genere_GERBER( const wxString& FullFileName, int Layers );
void Genere_PS( const wxString& FullFileName, int Layers );
void Plot_Layer_HPGL( FILE* File, int masque_layer,
int garde, int tracevia, int modetrace );
int garde, bool trace_via, GRTraceMode trace_mode );
void Plot_Layer_GERBER( FILE* File, int masque_layer,
int garde, int tracevia );
int garde, bool trace_via, GRTraceMode trace_mode );
int Gen_D_CODE_File( const wxString& Name_File );
void Plot_Layer_PS( FILE* File, int masque_layer,
int garde, int tracevia, int modetrace );
int garde, bool trace_via, GRTraceMode trace_mode );
void Files_io( wxCommandEvent& event );
void OnFileHistory( wxCommandEvent& event );
......
......@@ -45,6 +45,7 @@ class WinEDAChoiceBox;
class PARAM_CFG_BASE;
class Ki_PageDescr;
class Ki_HotkeyInfo;
class Plotter;
enum id_librarytype {
LIBRARY_TYPE_EESCHEMA,
......@@ -244,7 +245,7 @@ public:
void OnActivate( wxActivateEvent& event );
void ReDrawPanel();
void TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, int line_width );
void PlotWorkSheet( int format_plot, BASE_SCREEN* screen );
void PlotWorkSheet( Plotter *plotter, BASE_SCREEN* screen );
/** Function GetXYSheetReferences
* Return the X,Y sheet references where the point position is located
......
......@@ -199,7 +199,7 @@ void TEXTE_PCB::Draw( WinEDA_DrawPanel* panel, wxDC* DC,
if( color & ITEM_NOT_SHOW )
return;
GRFillMode fillmode = FILLED;
GRTraceMode fillmode = FILLED;
if ( DisplayOpt.DisplayDrawItems == SKETCH)
fillmode = SKETCH;
......
......@@ -191,10 +191,12 @@ void WinEDA_DrillFrame::CreateControls()
wxArrayString m_Choice_Drill_OffsetStrings;
m_Choice_Drill_OffsetStrings.Add(_("absolute"));
m_Choice_Drill_OffsetStrings.Add(_("auxiliary axis"));
m_Choice_Drill_Offset = new wxRadioBox( itemDialog1, ID_SEL_DRILL_SHEET, _("Drill Origin:"), wxDefaultPosition, wxDefaultSize, m_Choice_Drill_OffsetStrings, 1, wxRA_SPECIFY_COLS );
m_Choice_Drill_Offset = new wxRadioBox( itemDialog1, ID_SEL_DRILL_SHEET,
_("Drill Origin:"), wxDefaultPosition, wxDefaultSize,
m_Choice_Drill_OffsetStrings, 1, wxRA_SPECIFY_COLS );
m_Choice_Drill_Offset->SetSelection(0);
if (WinEDA_DrillFrame::ShowToolTips())
m_Choice_Drill_Offset->SetToolTip(_("Choose the coordinate origin: absolute or relative to the auxiliray axis"));
m_Choice_Drill_Offset->SetToolTip(_("Choose the coordinate origin: absolute or relative to the auxiliary axis"));
m_LeftBoxSizer->Add(m_Choice_Drill_Offset, 0, wxGROW|wxALL, 5);
wxBoxSizer* itemBoxSizer8 = new wxBoxSizer(wxVERTICAL);
......@@ -202,9 +204,12 @@ void WinEDA_DrillFrame::CreateControls()
wxArrayString m_Choice_Drill_MapStrings;
m_Choice_Drill_MapStrings.Add(_("None"));
m_Choice_Drill_MapStrings.Add(_("drill sheet (HPGL)"));
m_Choice_Drill_MapStrings.Add(_("drill sheet (PostScript)"));
m_Choice_Drill_Map = new wxRadioBox( itemDialog1, ID_SEL_DRILL_SHEET, _("Drill Sheet:"), wxDefaultPosition, wxDefaultSize, m_Choice_Drill_MapStrings, 1, wxRA_SPECIFY_COLS );
m_Choice_Drill_MapStrings.Add(_("Drill sheet (HPGL)"));
m_Choice_Drill_MapStrings.Add(_("Drill sheet (PostScript)"));
m_Choice_Drill_MapStrings.Add(_("Drill sheet (Gerber)"));
m_Choice_Drill_Map = new wxRadioBox( itemDialog1, ID_SEL_DRILL_SHEET,
_("Drill Sheet:"), wxDefaultPosition, wxDefaultSize,
m_Choice_Drill_MapStrings, 1, wxRA_SPECIFY_COLS );
m_Choice_Drill_Map->SetSelection(0);
if (WinEDA_DrillFrame::ShowToolTips())
m_Choice_Drill_Map->SetToolTip(_("Creates a drill map in PS or HPGL format"));
......
......@@ -156,7 +156,8 @@ private:
void UpdateConfig();
void Write_Excellon_Header( FILE * aFile);
void GenDrillReport( const wxString aFileName );
int Create_Drill_File_EXCELLON( std::vector<HOLE_INFO> & aHoleListBuffer,
int Create_Drill_File_EXCELLON(FILE *excellon_dest,
std::vector<HOLE_INFO> & aHoleListBuffer,
std::vector<DRILL_TOOL> & aToolListBuffer );
int Gen_Liste_Tools( std::vector<DRILL_TOOL> & buffer, bool print_header );
};
......
......@@ -318,13 +318,13 @@ void DIALOG_PRINT_USING_PRINTER::SetScale( wxCommandEvent& event )
/******************************************************************/
{
s_Scale_Select = m_ScaleOption->GetSelection();
Scale_X = Scale_Y = s_ScaleList[s_Scale_Select];
g_pcb_plot_options.Scale = s_ScaleList[s_Scale_Select];
if( m_FineAdjustXscaleOpt )
m_FineAdjustXscaleOpt->GetValue().ToDouble( &m_XScaleAdjust );
if( m_FineAdjustYscaleOpt )
m_FineAdjustYscaleOpt->GetValue().ToDouble( &m_YScaleAdjust );
Scale_X *= m_XScaleAdjust;
Scale_Y *= m_YScaleAdjust;
g_pcb_plot_options.ScaleAdjX = m_XScaleAdjust;
g_pcb_plot_options.ScaleAdjX = m_YScaleAdjust;
}
......
This diff is collapsed.
This diff is collapsed.
......@@ -79,16 +79,15 @@ void Build_Holes_List( BOARD* Pcb, std::vector<HOLE_INFO>& aHoleListBuffer,
void GenDrillMapFile( BOARD* aPcb,
FILE* aFile,
const wxString& aFullFileName,
wxSize aSheetSize,
Ki_PageDescr *aSheet,
std::vector<HOLE_INFO> aHoleListBuffer,
std::vector<DRILL_TOOL> aToolListBuffer,
bool aUnit_Drill_is_Inch,
int format );
int format, const wxPoint& auxoffset );
void Gen_Drill_PcbMap( BOARD* aPcb, FILE* aFile,
void Gen_Drill_PcbMap( BOARD* aPcb, Plotter* plotter,
std::vector<HOLE_INFO>& aHoleListBuffer,
std::vector<DRILL_TOOL>& aToolListBuffer,
int format );
std::vector<DRILL_TOOL>& aToolListBuffer);
/*
* Create a list of drill values and drill count
......
This diff is collapsed.
......@@ -655,7 +655,7 @@ static PARAM_CFG_SETCOLOR ColorCheveluCfg
static PARAM_CFG_INT HPGLpenNumCfg
(
wxT( "HPGLnum" ), /* Keyword */
&g_HPGL_Pen_Num, /* Parameter address */
&g_pcb_plot_options.HPGL_Pen_Num, /* Parameter address */
1, /* Default value */
1, 16 /* Min and max values*/
);
......@@ -663,7 +663,7 @@ static PARAM_CFG_INT HPGLpenNumCfg
static PARAM_CFG_INT HPGLdiamCfg // HPGL pen size (mils)
(
wxT( "HPGdiam" ), /* Keyword */
&g_HPGL_Pen_Diam, /* Parameter address */
&g_pcb_plot_options.HPGL_Pen_Diam, /* Parameter address */
15, /* Default value */
0, 100 /* Min and max values*/
);
......@@ -671,7 +671,7 @@ static PARAM_CFG_INT HPGLdiamCfg // HPGL pen size (mils)
static PARAM_CFG_INT HPGLspeedCfg //HPGL pen speed (cm/s)
(
wxT( "HPGLSpd" ), /* Keyword */
&g_HPGL_Pen_Speed, /* Parameter address */
&g_pcb_plot_options.HPGL_Pen_Speed, /* Parameter address */
20, /* Default value */
0, 1000 /* Min and max values*/
);
......@@ -679,18 +679,11 @@ static PARAM_CFG_INT HPGLspeedCfg //HPGL pen speed (cm/s)
static PARAM_CFG_INT HPGLrecouvrementCfg
(
wxT( "HPGLrec" ), /* Keyword */
&g_HPGL_Pen_Recouvrement, /* Parameter address */
&g_pcb_plot_options.HPGL_Pen_Recouvrement, /* Parameter address */
2, /* Default value */
0, 0x100 /* Min and max values*/
);
static PARAM_CFG_BOOL HPGLcenterCfg //HPGL Org Coord ( 0 normal, 1 Centre)
(
wxT( "HPGLorg" ), /* Keyword */
&HPGL_Org_Centre, /* Parameter address */
FALSE /* Default value */
);
static PARAM_CFG_INT VernisEpargneGardeCfg
(
wxT( "VEgarde" ), /* Keyword */
......@@ -734,7 +727,7 @@ static PARAM_CFG_INT ModuleSegmWidthCfg
static PARAM_CFG_INT WTraitSerigraphiePlotCfg
(
wxT( "WpenSer" ), /* Keyword */
&g_PlotLine_Width, /* Parameter address */
&g_pcb_plot_options.PlotLine_Width, /* Parameter address */
10, /* Default value */
1, 10000 /* Min and max values*/
);
......@@ -877,7 +870,6 @@ PARAM_CFG_BASE* ParamCfgList[] =
&HPGLdiamCfg,
&HPGLspeedCfg,
&HPGLrecouvrementCfg,
&HPGLcenterCfg,
&VernisEpargneGardeCfg,
&DrawSegmLargeurCfg,
&EdgeSegmLargeurCfg,
......
......@@ -55,32 +55,6 @@ wxString g_Current_PadName; // Last used pad name (pad num)
PCB_SCREEN* ScreenModule = NULL;
/* Options : */
// True to exclude contents of Edges Pcb layer
bool g_Exclude_Edges_Pcb = FALSE;
bool g_Plot_Frame_Ref; // True to plot/print frame references
bool g_DrawViaOnMaskLayer; // True if vias are drawn on Mask layer (ie protected by mask)
// = FILAIRE, FILL or SKETCH
int g_Plot_Mode = FILLED;
bool Plot_Set_MIROIR;
bool Sel_Rotate_Window;
bool HPGL_Org_Centre; // TRUE si en HPGL, l'origine le centre de la feuille
int g_PlotPSColorOpt; // True for color Postscript output
bool g_Plot_PS_Negative; // True to create a negative board ps plot
/* Autorisation de trace des divers items en serigraphie */
bool Sel_Texte_Reference = TRUE;
bool Sel_Texte_Valeur = TRUE;
bool Sel_Texte_Divers = TRUE;
bool Sel_Texte_Invisible;
/* Plot pads sur couche serigraphie */
bool PlotPadsOnSilkLayer = TRUE;
bool Plot_Pads_All_Layers; /* Plot pads meme n'appartenant pas a la
couche ( utile pour serigraphie) */
// Wildcard for footprint libraries filesnames
const wxString g_FootprintLibFileWildcard( wxT( "Kicad footprint library file (*.mod)|*.mod" ) );
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -147,7 +147,7 @@ void WinEDA_DrawPanel::PrintPage( wxDC* aDC, bool aPrint_Sheet_Ref, int aPrintMa
GRForceBlackPen( blackpenstate );
if( aPrint_Sheet_Ref )
m_Parent->TraceWorkSheet( aDC, GetScreen(), g_PlotLine_Width );
m_Parent->TraceWorkSheet( aDC, GetScreen(), 10 );
m_PrintIsMirrored = false;
......
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