Commits

Takahiro Tsutsumi authored c53ca07d2de Merge
Merge branch 'master' into bugfix/CAS-11272

code/casaqt/QwtPlotter/QPExporter.cc

Modified
37 37 const String QPExporter::CLASS_NAME = "QPExporter";
38 38
39 39 QPExporter::QPExporter() {
40 40 // TODO Auto-generated constructor stub
41 41
42 42 }
43 43
44 44 void QPExporter::findGridProperties( QPExportCanvas* grabCanvas,
45 45 QPPlotter* grabPlotter, Int& width, Int& height,
46 46 Int& gridRows, Int& gridCols) {
47 - //Figure out the grid size
48 47 width = 0;
49 48 if ( grabPlotter != NULL ){
50 - width = grabPlotter->squareHeight(); // width=height in square
51 - if (width==0) // not a square
52 - width = grabPlotter->width();
49 + width = grabPlotter->plotWidth();
53 50 }
54 51 else if( grabCanvas != NULL ){
55 - width = grabCanvas->canvasWidth();
52 + width = grabCanvas->canvasWidth();
56 53 }
57 54
58 55 height = 0;
59 56 if ( grabPlotter != NULL ){
60 - height = grabPlotter->squareHeight();
61 - if (height==0) // not a square
62 - height = grabPlotter->height();
57 + height = grabPlotter->plotHeight();
63 58 }
64 - else if (grabCanvas != NULL ){
65 - height = grabCanvas->canvasHeight();
59 + else if (grabCanvas != NULL ){
60 + height = grabCanvas->canvasHeight();
66 61 }
67 62
63 + //Figure out the grid size
68 64 gridRows = 1;
69 65 gridCols = 1;
70 66 if ( grabPlotter != NULL ){
71 67 gridRows = grabPlotter->getRowCount();
72 - gridCols = grabPlotter->getColCount();
68 + gridCols = grabPlotter->getColCount();
73 69 }
74 70 }
75 71
76 72 bool QPExporter::exportPostscript(
77 73 const PlotExportFormat& format,
78 74 vector<QPExportCanvas*> &qcanvases,
79 75 QPExportCanvas* grabCanvas, QPPlotter* grabPlotter){
80 76
81 77 // Set resolution.
82 78 QPrinter::PrinterMode mode = QPrinter::ScreenResolution;

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut