|
Lines 146-152
bool load_embeded_styles(tools::xml::styles& a_styles) {
Link Here
|
| 146 |
// |
146 |
// |
| 147 |
|
147 |
|
| 148 |
//_____________________________________________________________________________ |
148 |
//_____________________________________________________________________________ |
| 149 |
G4PlotParameters G4PlotManager::fgPlotParameters; |
149 |
G4PlotParameters& G4PlotManager::fgPlotParameters() |
|
|
150 |
{ |
| 151 |
static G4PlotParameters instance; |
| 152 |
return instance; |
| 153 |
} |
| 150 |
|
154 |
|
| 151 |
// |
155 |
// |
| 152 |
// ctors, dtor |
156 |
// ctors, dtor |
|
Lines 172-181
G4PlotManager::G4PlotManager(const G4AnalysisManagerState& state)
Link Here
|
| 172 |
// unsigned int wh = (unsigned int)(float(ww)*A4*0.80); |
176 |
// unsigned int wh = (unsigned int)(float(ww)*A4*0.80); |
| 173 |
static tools::sg::text_freetype ttf; |
177 |
static tools::sg::text_freetype ttf; |
| 174 |
fViewer.reset(new tools::viewplot(G4cout, ttf, |
178 |
fViewer.reset(new tools::viewplot(G4cout, ttf, |
| 175 |
fgPlotParameters.GetColumns(), |
179 |
fgPlotParameters().GetColumns(), |
| 176 |
fgPlotParameters.GetRows(), |
180 |
fgPlotParameters().GetRows(), |
| 177 |
fgPlotParameters.GetWidth(), |
181 |
fgPlotParameters().GetWidth(), |
| 178 |
fgPlotParameters.GetHeight())); |
182 |
fgPlotParameters().GetHeight())); |
| 179 |
fViewer->plots().view_border = false; |
183 |
fViewer->plots().view_border = false; |
| 180 |
load_embeded_styles(fViewer->styles()); |
184 |
load_embeded_styles(fViewer->styles()); |
| 181 |
fViewer->styles().add_colormap("default",tools::sg::style_default_colormap()); |
185 |
fViewer->styles().add_colormap("default",tools::sg::style_default_colormap()); |
|
Lines 187-196
G4PlotManager::G4PlotManager(const G4AnalysisManagerState& state)
Link Here
|
| 187 |
G4cout << "... using low resolution with Hershey fonts" << G4endl; |
191 |
G4cout << "... using low resolution with Hershey fonts" << G4endl; |
| 188 |
#endif |
192 |
#endif |
| 189 |
fViewer.reset(new tools::viewplot(G4cout, |
193 |
fViewer.reset(new tools::viewplot(G4cout, |
| 190 |
fgPlotParameters.GetColumns(), |
194 |
fgPlotParameters().GetColumns(), |
| 191 |
fgPlotParameters.GetRows(), |
195 |
fgPlotParameters().GetRows(), |
| 192 |
fgPlotParameters.GetWidth(), |
196 |
fgPlotParameters().GetWidth(), |
| 193 |
fgPlotParameters.GetHeight())); |
197 |
fgPlotParameters().GetHeight())); |
| 194 |
fViewer->plots().view_border = false; |
198 |
fViewer->plots().view_border = false; |
| 195 |
#endif |
199 |
#endif |
| 196 |
} |
200 |
} |
|
Lines 213-219
G4bool G4PlotManager::WritePage()
Link Here
|
| 213 |
|
217 |
|
| 214 |
#if defined(TOOLS_USE_FREETYPE) |
218 |
#if defined(TOOLS_USE_FREETYPE) |
| 215 |
HD_style(fViewer->plots(), 5); |
219 |
HD_style(fViewer->plots(), 5); |
| 216 |
regions_style(fViewer->plots(), fgPlotParameters.GetScale()); |
220 |
regions_style(fViewer->plots(), fgPlotParameters().GetScale()); |
| 217 |
#endif |
221 |
#endif |
| 218 |
|
222 |
|
| 219 |
G4bool result = fViewer->write_page(); |
223 |
G4bool result = fViewer->write_page(); |