... | ... |
@@ -1070,49 +1070,111 @@ |
1070 | 1070 |
break; |
1071 | 1071 |
case CUST_COL: |
1072 | 1072 |
os << psOut(distantColor(_nodeTextColors[n])) << " setrgbcolor\n"; |
1073 | 1073 |
break; |
1074 | 1074 |
default: |
1075 | 1075 |
os << "0 0 0 setrgbcolor\n"; |
1076 | 1076 |
} |
1077 | 1077 |
os << mycoords[n].x << ' ' << mycoords[n].y |
1078 | 1078 |
<< " (" << _nodeTexts[n] << ") cshow\n"; |
1079 | 1079 |
} |
1080 | 1080 |
os << "grestore\n"; |
1081 | 1081 |
} |
1082 | 1082 |
if(_showNodePsText) { |
1083 | 1083 |
os << "%Node PS blocks:\ngsave\n"; |
1084 | 1084 |
for(NodeIt n(g);n!=INVALID;++n) |
1085 | 1085 |
os << mycoords[n].x << ' ' << mycoords[n].y |
1086 | 1086 |
<< " moveto\n" << _nodePsTexts[n] << "\n"; |
1087 | 1087 |
os << "grestore\n"; |
1088 | 1088 |
} |
1089 | 1089 |
|
1090 | 1090 |
os << "grestore\nshowpage\n"; |
1091 | 1091 |
|
1092 | 1092 |
//CleanUp: |
1093 | 1093 |
if(_pleaseRemoveOsStream) {delete &os;} |
1094 |
} |
|
1094 |
} |
|
1095 |
|
|
1096 |
///\name Aliases |
|
1097 |
///These are just some aliases to other parameter setting functions. |
|
1098 |
|
|
1099 |
///@{ |
|
1100 |
|
|
1101 |
///An alias for arcWidths() |
|
1102 |
|
|
1103 |
///An alias for arcWidths() |
|
1104 |
/// |
|
1105 |
template<class X> GraphToEps<ArcWidthsTraits<X> > edgeWidths(const X &x) |
|
1106 |
{ |
|
1107 |
return arcWidths(x); |
|
1108 |
} |
|
1109 |
|
|
1110 |
///An alias for arcColors() |
|
1111 |
|
|
1112 |
///An alias for arcColors() |
|
1113 |
/// |
|
1114 |
template<class X> GraphToEps<ArcColorsTraits<X> > |
|
1115 |
edgeColors(const X &x) |
|
1116 |
{ |
|
1117 |
return arcColors(x); |
|
1118 |
} |
|
1119 |
|
|
1120 |
///An alias for arcWidthScale() |
|
1121 |
|
|
1122 |
///An alias for arcWidthScale() |
|
1123 |
/// |
|
1124 |
GraphToEps<T> &edgeWidthScale(double d) {return arcWidthScale(d);} |
|
1125 |
|
|
1126 |
///An alias for autoArcWidthScale() |
|
1127 |
|
|
1128 |
///An alias for autoArcWidthScale() |
|
1129 |
/// |
|
1130 |
GraphToEps<T> &autoEdgeWidthScale(bool b=true) |
|
1131 |
{ |
|
1132 |
return autoArcWidthScale(b); |
|
1133 |
} |
|
1134 |
|
|
1135 |
///An alias for absoluteArcWidths() |
|
1136 |
|
|
1137 |
///An alias for absoluteArcWidths() |
|
1138 |
/// |
|
1139 |
GraphToEps<T> &absoluteEdgeWidths(bool b=true) |
|
1140 |
{ |
|
1141 |
return absoluteArcWidths(b); |
|
1142 |
} |
|
1143 |
|
|
1144 |
///An alias for parArcDist() |
|
1145 |
|
|
1146 |
///An alias for parArcDist() |
|
1147 |
/// |
|
1148 |
GraphToEps<T> &parEdgeDist(double d) {return parArcDist(d);} |
|
1149 |
|
|
1150 |
///An alias for hideArcs() |
|
1151 |
|
|
1152 |
///An alias for hideArcs() |
|
1153 |
/// |
|
1154 |
GraphToEps<T> &hideEdges(bool b=true) {return hideArcs(b);} |
|
1155 |
|
|
1156 |
///@} |
|
1095 | 1157 |
}; |
1096 | 1158 |
|
1097 | 1159 |
template<class T> |
1098 | 1160 |
const int GraphToEps<T>::INTERPOL_PREC = 20; |
1099 | 1161 |
template<class T> |
1100 | 1162 |
const double GraphToEps<T>::A4HEIGHT = 841.8897637795276; |
1101 | 1163 |
template<class T> |
1102 | 1164 |
const double GraphToEps<T>::A4WIDTH = 595.275590551181; |
1103 | 1165 |
template<class T> |
1104 | 1166 |
const double GraphToEps<T>::A4BORDER = 15; |
1105 | 1167 |
|
1106 | 1168 |
|
1107 | 1169 |
///Generates an EPS file from a graph |
1108 | 1170 |
|
1109 | 1171 |
///\ingroup eps_io |
1110 | 1172 |
///Generates an EPS file from a graph. |
1111 | 1173 |
///\param g is a reference to the graph to be printed |
1112 | 1174 |
///\param os is a reference to the output stream. |
1113 | 1175 |
///By default it is <tt>std::cout</tt> |
1114 | 1176 |
/// |
1115 | 1177 |
///This function also has a lot of |
1116 | 1178 |
///\ref named-templ-func-param "named parameters", |
1117 | 1179 |
///they are declared as the members of class \ref GraphToEps. The following |
1118 | 1180 |
///example shows how to use these parameters. |
0 comments (0 inline)