Cleaning code to draw/plot texts; italic allowed for pcbnew
This commit is contained in:
+75
-7
@@ -31,13 +31,21 @@ static inline bool IsPostScript( int aFormat )
|
||||
|
||||
const int PLOT_MIROIR = 1;
|
||||
|
||||
// Variables used in Common plot functions
|
||||
extern wxPoint g_Plot_LastPenPosition;
|
||||
extern wxPoint g_Plot_PlotOffset;
|
||||
extern FILE* g_Plot_PlotOutputFile;
|
||||
extern double g_Plot_XScale, g_Plot_YScale;
|
||||
extern int g_Plot_DefaultPenWidth, g_Plot_CurrentPenWidth;
|
||||
extern int g_Plot_PlotOrientOptions, g_Plot_PenState;
|
||||
|
||||
|
||||
/*******************************/
|
||||
/* common_plot_functions.cpp */
|
||||
/*******************************/
|
||||
void SetPlotScale( double xscale, double yscale ); // Set the plot scale for the current plotting)
|
||||
void SetPlotOffset( wxPoint offset ); // Set the plot offset for the current plotting)
|
||||
void InitPlotParametresGERBER( wxPoint offset, double xscale, double yscale );
|
||||
void SetPlotScale( double aXScale, double aYScale ); // Set the plot scale for the current plotting)
|
||||
void Setg_Plot_PlotOffset( wxPoint offset ); // Set the plot offset for the current plotting)
|
||||
void InitPlotParametresGERBER( wxPoint offset, double aXScale, double aYScale );
|
||||
void PlotWorkSheet( int format_plot, BASE_SCREEN* screen );
|
||||
void UserToDeviceCoordinate( wxPoint& pos );
|
||||
|
||||
@@ -47,7 +55,7 @@ void UserToDeviceSize( wxSize& size );
|
||||
// modifie les dimension size.x et size.y pour le trace selon l'echelle
|
||||
void ForcePenReinit();
|
||||
|
||||
// set the flag g_CurrentPenWidth to -1 in order
|
||||
// set the flag g_Plot_CurrentPenWidth to -1 in order
|
||||
// to force a pen width redefinition for the next draw command
|
||||
|
||||
|
||||
@@ -57,8 +65,8 @@ void ForcePenReinit();
|
||||
void SetCurrentLineWidthPS( int width );
|
||||
void InitPlotParametresPS( wxPoint offset,
|
||||
Ki_PageDescr* sheet,
|
||||
double xscale,
|
||||
double yscale,
|
||||
double aXScale,
|
||||
double aYScale,
|
||||
int orient = 0 );
|
||||
void SetDefaultLineWidthPS( int width );
|
||||
void PlotRectPS( wxPoint p1, wxPoint p2, bool fill, int width = -1 );
|
||||
@@ -82,7 +90,7 @@ void SetColorMapPS( int color );
|
||||
/*********************************/
|
||||
/* common_plotHPGL_functions.cpp */
|
||||
/*********************************/
|
||||
void InitPlotParametresHPGL( wxPoint offset, double xscale, double yscale, int orient = 0 );
|
||||
void InitPlotParametresHPGL( wxPoint offset, double aXScale, double aYScale, int orient = 0 );
|
||||
bool PrintHeaderHPGL( FILE* plot_file, int pen_speed, int pen_num );
|
||||
bool CloseFileHPGL( FILE* plot_file );
|
||||
void PlotCircleHPGL( wxPoint centre, int diameter, bool fill, int width = -1 );
|
||||
@@ -92,4 +100,64 @@ void PlotPolyHPGL( int nb, int* coord, bool fill, int width = -1 );
|
||||
void Move_Plume_HPGL( wxPoint pos, int plume );
|
||||
void Plume_HPGL( int plume );
|
||||
|
||||
/*********************************/
|
||||
/* common_plotGERBER_functions.cpp */
|
||||
/*********************************/
|
||||
/** function InitPlotParametresGERBER
|
||||
* Set the plot offset for the current plotting
|
||||
* @param aOffset = plot offset
|
||||
* @param aXScale,aYScale = coordinate scale (scale coefficient for coordinates)
|
||||
*/
|
||||
void InitPlotParametresGERBER( wxPoint aOffset, double aXScale, double aYScale );
|
||||
|
||||
/** Function Write_Header_GERBER
|
||||
* Write GERBER header to file
|
||||
* initialize global variable g_Plot_PlotOutputFile
|
||||
* @param aTitle: the name of creator (comment)
|
||||
* @param aFile: an opened file to write to
|
||||
*/
|
||||
void Write_Header_GERBER( const wxString aTitle, FILE* aFile );
|
||||
|
||||
/** Function LineTo_GERBER
|
||||
* if aCommand = 'U' initialise the starting point of a line
|
||||
* if aCommand = 'D' draw a line from the starting point, or last point to aPos
|
||||
* @param aPos = end of the current line.
|
||||
* @param aCommand = 'U' or 'D' or 'Z' (Pen up , no moving )
|
||||
*/
|
||||
void LineTo_GERBER( wxPoint aPos, int aCommand );
|
||||
|
||||
/** Function PlotGERBERLine
|
||||
* Plot a line
|
||||
* @param aStartPos = starting point of the line
|
||||
* @param aEndPos = ending point of the line
|
||||
* @param aThickness = line thickness
|
||||
*/
|
||||
void PlotGERBERLine( wxPoint aStartPos, wxPoint aEndPos, int aThickness );
|
||||
|
||||
/** Function PlotCircle_GERBER
|
||||
* writes a non filled circle to output file
|
||||
* Plot one circle as segments (6 to 16 depending on its radius
|
||||
* @param aCentre = centre coordintes
|
||||
* @param aRadius = radius of the circle
|
||||
* @param aWidth = line width (noc currently used, D_CODEs must be selected before)
|
||||
*/
|
||||
void PlotCircle_GERBER( wxPoint aCentre, int aRadius, int aWidth );
|
||||
|
||||
/** Function PlotPolygon_GERBER
|
||||
* writes a closed polyline (not a filled polygon) to output file
|
||||
* @param aCornersCount = numer of corners
|
||||
* @param aCoord = buffer of corners coordinates
|
||||
* @param aWidth = line width (noc currently used, D_CODEs must be selected before)
|
||||
*/
|
||||
|
||||
|
||||
void PlotPolygon_GERBER( int aCornersCount, int* aCoord, int aWidth );
|
||||
|
||||
/** Function PlotFilledPolygon_GERBER
|
||||
* writes a filled polyline to output file
|
||||
* @param aCornersCount = numer of corners
|
||||
* @param aCoord = buffer of corners coordinates
|
||||
*/
|
||||
void PlotFilledPolygon_GERBER( int aCornersCount, int* aCoord );
|
||||
|
||||
#endif /* #ifndef PLOT_COMMON_H */
|
||||
|
||||
Reference in New Issue
Block a user