Commit 0a58e630 authored by charras's avatar charras
Browse files

fixed postscript plot broken. Better default values for pcbnew plot dialog

parent 3806557f
Loading
Loading
Loading
Loading
+24 −19
Original line number Original line Diff line number Diff line
@@ -93,19 +93,24 @@ void PS_Plotter::set_color( int color )
        				(double) ColorRefs[color].m_Blue / 255 );
        				(double) ColorRefs[color].m_Blue / 255 );
    	}
    	}
    }
    }
    else /* B/W Mode - Use BLACK for all items */
    else
    /* B/W Mode - Use BLACK or WHITE for all items
     * note the 2 colors are used in B&W mode, mainly by Pcbnew to draw holes in white on pads in black
     */
    {
    {
    	/* Why invert in this mode. Does anyway WHITE! */
    	int bwcolor = WHITE;
        if( color != WHITE )
           bwcolor = BLACK;
    	if (negative_mode)
    	if (negative_mode)
    		fprintf( output_file, "%.3g %.3g %.3g setrgbcolor\n",
    		fprintf( output_file, "%.3g %.3g %.3g setrgbcolor\n",
    				(double) 1.0-ColorRefs[BLACK].m_Red / 255,
    				(double) 1.0-ColorRefs[bwcolor].m_Red / 255,
    				(double) 1.0-ColorRefs[BLACK].m_Green / 255,
    				(double) 1.0-ColorRefs[bwcolor].m_Green / 255,
    				(double) 1.0-ColorRefs[BLACK].m_Blue / 255 );
    				(double) 1.0-ColorRefs[bwcolor].m_Blue / 255 );
    	else
    	else
       		fprintf( output_file, "%.3g %.3g %.3g setrgbcolor\n",
       		fprintf( output_file, "%.3g %.3g %.3g setrgbcolor\n",
        				(double) ColorRefs[BLACK].m_Red / 255,
        				(double) ColorRefs[bwcolor].m_Red / 255,
        				(double) ColorRefs[BLACK].m_Green / 255,
        				(double) ColorRefs[bwcolor].m_Green / 255,
        				(double) ColorRefs[BLACK].m_Blue / 255 );
        				(double) ColorRefs[bwcolor].m_Blue / 255 );
    }
    }
}
}


+924 B (188 KiB)

File changed.

No diff preview for this file type.

+1105 −1047

File changed.

Preview size limit exceeded, changes collapsed.

+13 −0
Original line number Original line Diff line number Diff line
@@ -29,6 +29,19 @@
#define MIN_SCALE 0.01
#define MIN_SCALE 0.01
#define MAX_SCALE 100.0
#define MAX_SCALE 100.0


// PCB_Plot_Options constructor: set the default values for plot options:
PCB_Plot_Options::PCB_Plot_Options()
{
    Sel_Texte_Reference = true;
    Sel_Texte_Valeur    = true;
    Sel_Texte_Divers    = true;
    DrillShapeOpt = PCB_Plot_Options::SMALL_DRILL_SHAPE;
    Trace_Mode    = FILLED;
    Scale = 1.0;
    ScaleAdjX = 1.0;
    ScaleAdjY = 1.0;
    PlotScaleOpt = 1;
}


static long s_SelectedLayers = CUIVRE_LAYER | CMP_LAYER |
static long s_SelectedLayers = CUIVRE_LAYER | CMP_LAYER |
                               SILKSCREEN_LAYER_CMP | SILKSCREEN_LAYER_CU;
                               SILKSCREEN_LAYER_CMP | SILKSCREEN_LAYER_CU;
+49 −44
Original line number Original line Diff line number Diff line
@@ -20,7 +20,9 @@
#define SCALE_HPGL 0.102041
#define SCALE_HPGL 0.102041


/* Plot Options : */
/* Plot Options : */
struct PCB_Plot_Options {
class PCB_Plot_Options
{
public:
    bool        Exclude_Edges_Pcb;
    bool        Exclude_Edges_Pcb;
    int         PlotLine_Width;
    int         PlotLine_Width;
    bool        Plot_Frame_Ref;     // True to plot/print frame references
    bool        Plot_Frame_Ref;     // True to plot/print frame references
@@ -41,7 +43,7 @@ struct PCB_Plot_Options {
    bool        Sel_Texte_Invisible;
    bool        Sel_Texte_Invisible;
    bool        PlotPadsOnSilkLayer;
    bool        PlotPadsOnSilkLayer;
    bool        Plot_Pads_All_Layers; /* Plot pads meme n'appartenant pas a la
    bool        Plot_Pads_All_Layers; /* Plot pads meme n'appartenant pas a la
                                        couche ( utile pour serigraphie) */
                                  *      couche ( utile pour serigraphie) */


    /* id for plot format (see enum PlotFormat in plot_common.h) */
    /* id for plot format (see enum PlotFormat in plot_common.h) */
    int PlotFormat;
    int PlotFormat;
@@ -56,6 +58,9 @@ struct PCB_Plot_Options {
    double         Scale;
    double         Scale;
    double         ScaleAdjX;
    double         ScaleAdjX;
    double         ScaleAdjY;
    double         ScaleAdjY;

public:
    PCB_Plot_Options();
};
};


extern PCB_Plot_Options g_pcb_plot_options;
extern PCB_Plot_Options g_pcb_plot_options;