Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef OB_DEPICT_H
00020 #define OB_DEPICT_H
00021
00022 #include <openbabel/babelconfig.h>
00023 #include <openbabel/math/vector3.h>
00024
00025 namespace OpenBabel
00026 {
00027
00028 class OBMol;
00029 class OBPainter;
00030 class OBDepictPrivate;
00031
00032 #ifndef OBDEPICT
00033 #define OBDEPICT
00034 #endif
00035
00041 class OBDEPICT OBDepict
00042 {
00043 public:
00044 enum AtomLabelType {
00045 AtomId = 1,
00046 AtomIndex,
00047 AtomSymmetryClass,
00048 AtomValence,
00049 AtomTetrahedralStereo
00050 };
00051
00052 enum OptionType{
00053 bwAtoms = 0x0001,
00054 internalColor = 0x0002,
00055 drawTermC = 0x0010,
00056 drawAllC = 0x0020,
00057 noWedgeHashGen = 0x0100,
00058 asymmetricDoubleBond = 0x0200
00059 };
00060
00064 OBDepict(OBPainter *painter);
00068 ~OBDepict();
00074 bool DrawMolecule(OBMol *mol);
00080 bool AddAtomLabels(AtomLabelType type);
00081
00082 void SetBondLength(double length);
00083 double GetBondLength() const;
00084
00085 void SetPenWidth(double length);
00086 double GetPenWidth() const;
00087
00088 void SetBondSpacing(double spacing);
00089 double GetBondSpacing() const;
00090
00091 void SetBondWidth(double width);
00092 double GetBondWidth() const;
00093
00094
00095
00096
00097 void SetOption(unsigned opts);
00098 unsigned GetOptions() const;
00099 void ClearOptions();
00100
00101 void SetFontFamily(const std::string &family);
00102 const std::string& GetFontFamily() const;
00103
00104 void SetFontSize(int pointSize, bool subscript = false);
00105 int GetFontSize(bool subscript = false) const;
00106
00107 void SetAliasMode(bool b=true);
00108
00109 void SetBondColor(const std::string& scolor);
00110
00111 private:
00112 OBDepictPrivate * const d;
00113 };
00114
00115 }
00116
00117 #endif
00118