Changeset cd4684a in git


Ignore:
Timestamp:
28/02/15 11:27:33 (5 years ago)
Author:
Olly Betts <olly@…>
Branches:
line_contents, master, stereo, travis-osx
Children:
586e78c
Parents:
1b0bf6a
Message:

src/export.cc: Eliminate use of static for text_height.

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • ChangeLog

    r1b0bf6a rcd4684a  
     1Sat Feb 28 11:26:52 GMT 2015  Olly Betts <olly@survex.com>
     2
     3        * src/export.cc: Eliminate use of static for text_height.
     4
    15Sat Feb 28 11:06:25 GMT 2015  Olly Betts <olly@survex.com>
    26
  • src/export.cc

    r1b0bf6a rcd4684a  
    104104}
    105105
    106 static double text_height; /* for station labels */
    107106static double marker_size; /* for station markers */
    108107static double grid; /* grid spacing (or 0 for no grid) */
     
    122121class DXF : public ExportFilter {
    123122    const char * to_close;
     123    /* for station labels */
     124    double text_height;
    124125    char pending[1024];
    125126
    126127  public:
    127     DXF() : to_close(0) { pending[0] = '\0'; }
     128    DXF(double text_height_)
     129        : to_close(0), text_height(text_height_) { pending[0] = '\0'; }
    128130    const int * passes() const;
    129131    bool fopen(const char *fnm_out);
     
    549551    const char * to_close;
    550552    bool close_g;
     553    /* for station labels */
     554    double text_height;
    551555    char pending[1024];
    552556
    553557  public:
    554     SVG() : to_close(NULL), close_g(false) { pending[0] = '\0'; }
     558    SVG(double text_height_)
     559        : to_close(NULL), close_g(false), text_height(text_height_) {
     560        pending[0] = '\0';
     561    }
    555562    const int * passes() const;
    556563    void header(const char *, const char *, time_t,
     
    11441151       double pan, double tilt, int show_mask, export_format format,
    11451152       const char * input_projection,
    1146        double grid_, double text_height_, double marker_size_,
     1153       double grid_, double text_height, double marker_size_,
    11471154       double scale)
    11481155{
     
    11541161
    11551162   grid = grid_;
    1156    text_height = text_height_;
    11571163   marker_size = marker_size_;
    11581164
     
    11661172   switch (format) {
    11671173       case FMT_DXF:
    1168            filt = new DXF;
     1174           filt = new DXF(text_height);
    11691175           break;
    11701176       case FMT_EPS:
     
    11931199           break;
    11941200       case FMT_SVG:
    1195            filt = new SVG;
     1201           filt = new SVG(text_height);
    11961202           factor = 1000.0 / scale;
    11971203           break;
Note: See TracChangeset for help on using the changeset viewer.