Logo Search packages:      
Sourcecode: magics++ version File versions  Download package

magics::PostScriptDriver Class Reference
[Output drivers]

#include <PostScriptDriver.h>

Inheritance diagram for magics::PostScriptDriver:

magics::BaseDriver

List of all members.


Detailed Description

This driver produces output in PostScript, EPS and PDF.

This driver produces output in one or multiple PostScript file(s) (*.ps), multiple EPS (*.eps) and/or one PDF (*.pdf).

Todo:
DRIVERS: PDF is still raster and needs to be vector!
Note:
PDF is currently produced throgh ghostscript. This means it uses raster instead of vector information to describe the graphics.

Definition at line 49 of file PostScriptDriver.h.


Public Types

typedef void(BaseDriver::* ControlFunction )(bool)
typedef void(BaseDriver::* InputEventFunction )(MtInputEvent *)
typedef void(BaseDriver::* ModeFunction )(const SelectionMode &)

Public Member Functions

virtual void animationControlCB (bool)
virtual void areaCB (const string &, double, double, double, double)
void close ()
 Closing the driver.
virtual void closeLayer (const Layer &) const
virtual void closeLayer () const
void disable (bool disabled)
bool disable () const
MAGICS_NO_EXPORT float getXDeviceLength () const
MAGICS_NO_EXPORT float getYDeviceLength () const
virtual void inputCB (const string &, double, double)
bool isEPS () const
bool isPDF () const
bool isPS () const
virtual void newLayer (const Layer &) const
virtual void newLayer () const
virtual void notify (MagicsRenderZoomPreviewEvent &)
virtual void notify (MagicsZoomUpdateEvent &)
virtual void notify (MagicsLayerSwapEvent &)
virtual void notify (MagicsLayerUpdateEvent &)
virtual void notify (MagicsLayerTreeEvent &)
virtual void notify (MagicsAnimationStepsEvent &)
virtual void notify (MagicsAnimationCurrentStepEvent &)
virtual void notify (MagicsRestoreFbEvent &)
virtual void notify (MagicsMagnifierEvent &)
virtual void notify (MagicsAntialiasingEvent &)
virtual void notify (MagicsZoomEvent &)
virtual void notify (MagicsSwapBufferEvent &)
virtual void notify (MagicsCursorEvent &)
void open ()
 Opening the driver.
 PostScriptDriver ()
 Constructor.
void printOutputName (const std::string &str) const
 Method to print list of all generated files in the driver.
MAGICS_NO_EXPORT void redisplay (const Image &) const
 Method to redisplay a external file.
void redisplay (const ImportObject &) const
 Method to redisplay a external file.
MAGICS_NO_EXPORT void redisplay (const Flag &) const
 Method to redisplay an Flag.
MAGICS_NO_EXPORT void redisplay (const Arrow &) const
 Method to redisplay an Arrow.
void redisplay (const SymbolItem &, const ComplexSymbol &) const
void redisplay (const FlagItem &, const ComplexSymbol &) const
void redisplay (const TextItem &, const ComplexSymbol &) const
void redisplay (const ComplexSymbol &) const
 Method to redisplay a ComlpexSymbol.
MAGICS_NO_EXPORT void redisplay (const TextSymbol &) const
 Method to redisplay a TextSymbol.
MAGICS_NO_EXPORT void redisplay (const Symbol &) const
 Method to redisplay a Symbol.
MAGICS_NO_EXPORT void redisplay (const Text &) const
 Method to redisplay a Text.
virtual void redisplay (const BinaryObject &) const
 Method to read and execute binary file.
virtual MAGICS_NO_EXPORT void redisplay (const StepRenderer &) const
 Method to trigger rendering of animation step tree.
virtual MAGICS_NO_EXPORT void redisplay (const MagnifierLayout &) const
virtual MAGICS_NO_EXPORT void redisplay (const PreviewLayout &) const
MAGICS_NO_EXPORT void redisplay (const Polyline &) const
virtual MAGICS_NO_EXPORT void redisplay (const Layer &) const
virtual MAGICS_NO_EXPORT void redisplay (const StandaloneLayout &) const
 processing standalone layouts This methods processes the Layout objects. It will mostly requires a new page! Only the KMLDriver will have the legend included.
MAGICS_NO_EXPORT void redisplay (const RootLayout &) const
MAGICS_NO_EXPORT void redisplay (const Layout &) const
 processing layouts This methods processes the Layout objects. It needs to be checked if a Layout is a new page or not.
virtual void set (const std::map< string, string > &map)
void set (const map< string, string > &map)
 sets a new map
void set (const XmlNode &node)
 sets a new XML node
void setEPS (bool b) const
void setPDF (bool b) const
void setPS (bool b) const
MAGICS_NO_EXPORT void setXDeviceLength (float xdevicelength)
MAGICS_NO_EXPORT void setYDeviceLength (float ydevicelength)
void shade (const HatchShadingProperties &) const
 Method set hatch fill shading properties.
void shade (const DotShadingProperties &) const
 Method set dot fill shading properties.
void shade (const FillShadingProperties &) const
 Method set solid fill shading properties.
virtual void zoomCB (const string &, int)
virtual void zoomControlCB (bool)
 ~PostScriptDriver ()
 Destructor.

Protected Types

typedef std::map< string,
magFont, RuntimeStringCompare >
::const_iterator 
fontMapIter

Protected Member Functions

MAGICS_NO_EXPORT bool checkDistanceMoreThan (const PaperPoint *pp, double distance) const
float convertCM (const float cm) const
virtual MAGICS_NO_EXPORT bool convertToPixmap (const string &fname, const GraphicsFormat format, const int reso, const float wx0, const float wy0, const float wx1, const float wy1) const
 converting object to pixmap
void drizzle (const float, const float, const float) const
virtual void endAdditionalPage () const
string getFileName (const string &extension, const unsigned int no=0) const
 formulating a filename
MAGICS_NO_EXPORT float getNewLineWidth () const
string getTmpName () const
void lightning (const float x, const float y, const float size) const
void loadSymbols () const
double LSF (float *x, float *y, int i0) const
virtual void printLine (const Polyline &line) const
 Method plotting Polylines with Labels.
virtual float projectX (const float x) const
virtual float projectY (const float y) const
virtual void renderComplexSymbols (const ComplexSymbol &symbol) const
virtual void renderFlagItem (const FlagItem &, const ComplexSymbol &symbol) const
MAGICS_NO_EXPORT void renderImage (const Image &obj) const
virtual void renderImage (const ImportObject &object) const
 Image render method for ALL drivers.
MAGICS_NO_EXPORT void renderPolyline (vector< PaperPoint > &vP) const
void renderPolyline2 (vector< PaperPoint > &vP) const
MAGICS_NO_EXPORT void renderSimplePolygon (vector< PaperPoint > &vP) const
virtual void renderSymbolItem (const SymbolItem &, const ComplexSymbol &symbol) const
virtual void renderTextItem (const TextItem &, const ComplexSymbol &) const
virtual MAGICS_NO_EXPORT void renderTextSymbols (const TextSymbol &symbol) const
virtual MAGICS_NO_EXPORT void renderWindArrow (const Arrow &arrow) const
 Wind arrow render method for ALL drivers.
virtual MAGICS_NO_EXPORT void renderWindFlag (const Flag &flag) const
virtual MAGICS_NO_EXPORT float setAngleY (const float y) const
 set Y values positive or negative dependent how angles are interpreted
void setCMscale (const float scale) const
virtual MAGICS_NO_EXPORT float setFlagY (const float y) const
virtual MAGICS_NO_EXPORT float setSymbolY (const float y) const
 set Y values positive or negative dependent how symbols are interpreted
virtual MAGICS_NO_EXPORT float setY (const float y) const
 set Y values positive or negative
void snowflake (const float, const float, const float) const
virtual void startAdditionalPage (const StandaloneLayout &) const
void triangle (const float, const float, const float, const int, const int) const

Protected Attributes

bool alphaEnabled_
float coordRatioX_
float coordRatioY_
Colour currentColour_
string currentGroup_
string currentLayer_
int currentLineStyle_
LineStyle currentLineType_
float currentLineWidth_
int currentPage_
Shading currentShading_
const ShadingProperties * currentShadingProperties_
std::stack< float > dimensionStack_
float dimensionX_
float dimensionY_
bool disabled_
bool external_
string fileName_
std::map< string, magFont,
RuntimeStringCompare
FontMap_
unsigned int indexHatch_
float lastAreaHeightPercentage_
float lastAreaWidthPercentage_
bool newLayout_
bool newPage_
double obs_distance_
float offsetX_
float offsetY_
bool polylineAntialiasing_
std::stack< float > scalesX_
std::stack< float > scalesY_
stack< const Layout * > staLayouts_
vSymbols sym_
vector< const PaperPoint * > vecPoints_

Private Member Functions

MAGICS_NO_EXPORT void circle (const float x, const float y, const float r, const int) const
 drawing a circle
MAGICS_NO_EXPORT void closeFile () const
 Method to close the PostScript output file.
MAGICS_NO_EXPORT void copyMacro (fstream *m, const string &file) const
 Method copying macro code in the PostScript file header.
MAGICS_NO_EXPORT void debugOutput (const string &s) const
 prints debug output
MAGICS_NO_EXPORT void endPage () const
 ending a page
MAGICS_NO_EXPORT int getDeviceColourModel () const
MAGICS_NO_EXPORT fstream * getStream () const
MAGICS_NO_EXPORT bool isSplit () const
 Should the output be splited?
MAGICS_NO_EXPORT void openFile () const
PostScriptDriveroperator= (const PostScriptDriver &)
 Overloaded << operator to copy - No copy allowed.
 PostScriptDriver (const PostScriptDriver &)
 Copy constructor - No copy allowed.
void print (ostream &) const
 Method to print string about this class on to a stream of type ostream (virtual).
MAGICS_NO_EXPORT void project (const Layout &lay) const
 project to a new Layout
MAGICS_NO_EXPORT bool renderCellArray (const Image &obj) const
 render cell arrays
MAGICS_NO_EXPORT bool renderPixmap (float, float, float, float, int, int, unsigned char *, int, bool) const
 render pixmaps
MAGICS_NO_EXPORT void renderPolyline (const int, float *, float *) const
 renders polylines
MAGICS_NO_EXPORT void renderPolyline2 (const int n, float *x, float *y) const
 renders a single line
MAGICS_NO_EXPORT void renderSimplePolygon (const int, float *, float *) const
 renders a filled polygon
MAGICS_NO_EXPORT void renderSymbols (const Symbol &) const
 Method to plot symbols.
MAGICS_NO_EXPORT void renderText (const Text &text) const
 renders text strings
MAGICS_NO_EXPORT void setDeviceColourModel (const string &m) const
MAGICS_NO_EXPORT int setLineParameters (const LineStyle style, const float w) const
 sets new properties of how lines are drawn
MAGICS_NO_EXPORT void setNewColour (const Colour &col) const
 sets a new colour
MAGICS_NO_EXPORT void setNewLineWidth (const float) const
 sets a new line width
MAGICS_NO_EXPORT void startPage () const
 starting a new page
MAGICS_NO_EXPORT void unproject () const
 reproject out of the last Layout
MAGICS_NO_EXPORT void writePSFileEnd () const
MAGICS_NO_EXPORT void writePSFileHeader () const
 Method writing the PostScript file header.

Private Attributes

unsigned int deviceColourModel_
bool eps_
unsigned int maxPathSize_
bool old_
bool pdf_
bool ps_
fstream PSOut_

Friends

ostream & operator<< (ostream &s, const PostScriptDriver &p)
 Overloaded << operator to call print().

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index