3.2.12.5. graph/Printer.hpp

3.2.12.5.1. Class graph::Printer

class graph::Printer

This class is used to configure how graphs are visualised.

Warning

Some of these options greatly alter how graphs are depicted and the result may not accurately represent the underlying graph, and may make non-molecules look like molecules.

3.2.12.5.1.1. Synopsis

friend bool operator==(const Printer &a, const Printer &b)
friend bool operator!=(const Printer &a, const Printer &b)
void setMolDefault()
void setReactionDefault()
void disableAll()
void enableAll()
void setEdgesAsBonds(bool value)
bool getEdgesAsBonds() const
void setCollapseHydrogens(bool value)
bool getCollapseHydrogens() const
void setRaiseIsotopes(bool value)
bool getRaiseIsotopes() const
void setRaiseCharges(bool value)
bool getRaiseCharges() const
void setSimpleCarbons(bool value)
bool getSimpleCarbons() const
void setThick(bool value)
bool getThick() const
void setWithColour(bool value)
bool getWithColour() const
void setWithIndex(bool value)
bool getWithIndex() const
void setWithTexttt(bool value)
bool getWithTexttt() const
void setWithRawStereo(bool value)
bool getWithRawStereo() const
void setWithPrettyStereo(bool value)
bool getWithPrettyStereo() const
void setRotation(int degrees)
int getRotation() const
void setMirror(bool value)
bool getMirror() const
void setWithGraphvizCoords(bool value)
bool getWithGraphvizCoords() const
void setGraphvizPrefix(const std::string &prefix)
const std::string &getGraphvizPrefix() const

3.2.12.5.1.2. Details

friend bool operator==(const Printer &a, const Printer &b)
friend bool operator!=(const Printer &a, const Printer &b)
void setMolDefault()

Shortcut for enabling all but thickening and index printing.

void setReactionDefault()

Shortcut for enabling all but thickening, index printing and simplification of carbon atoms.

void disableAll()

Disable all special printing features.

void enableAll()

Enable all special printing features, except typewriter font.

void setEdgesAsBonds(bool value)
bool getEdgesAsBonds() const

Control whether edges with special labels are drawn as chemical bonds.

void setCollapseHydrogens(bool value)
bool getCollapseHydrogens() const

Control whether vertices representing hydrogen atoms are collapsed into their neighbours labels.

void setRaiseIsotopes(bool value)
bool getRaiseIsotopes() const

Control whether a vertex label prefix encoding an isotope is written as a superscript to the rest of the label.

void setRaiseCharges(bool value)
bool getRaiseCharges() const

Control whether a vertex label suffix encoding a charge is written as a superscript to the rest of the label.

void setSimpleCarbons(bool value)
bool getSimpleCarbons() const

Control whether some vertices encoding carbon atoms are depicted without any label.

void setThick(bool value)
bool getThick() const

Control whether all edges are drawn thicker than normal and all labels are written in bold.

void setWithColour(bool value)
bool getWithColour() const

Control whether colour is applied to certain elements of the graph which are molecule-like.

void setWithIndex(bool value)
bool getWithIndex() const

Control whether the underlying indices of the vertices are printed.

void setWithTexttt(bool value)
bool getWithTexttt() const

Control whether the vertex and edge labels are written with typewriter font.

void setWithRawStereo(bool value)
bool getWithRawStereo() const

Control whether the vertices and edges are annotated with the raw stereo properties.

void setWithPrettyStereo(bool value)
bool getWithPrettyStereo() const

Control whether the vertices and edges are annotated with stylized stereo properties.

void setRotation(int degrees)
int getRotation() const

Rotation of internally computed coordinates.

void setMirror(bool value)
bool getMirror() const

Mirror internally computed coordinates in the y-axis.

void setWithGraphvizCoords(bool value)
bool getWithGraphvizCoords() const

Do not use Open Babel for coordinate generation, but only the Graphviz fallback during post-processing. When setting this to true consider setting setSimpleCarbons(false) to avoid misleading depictions due to collinear carbon chains.

void setGraphvizPrefix(const std::string &prefix)
const std::string &getGraphvizPrefix() const

Access the string that will be inserted into generated DOT files, just after the graph declaration. DOT files are only generated when getWithGraphvizCoords().