dot files with URL attributes will get active PDF links
from Adobe's Distiller.
*/
-#define PDFMAX 3240 /* Maximum size of Distiller's PDF canvas */
+#define PDFMAX 14400 /* Maximum size of PDF page */
#include "render.h"
#include "ps.h"
} else {
if (ND_shape(n)->usershape) {
point imagesize;
- char *sfile = agget(n, "shapefile");
- imagesize = image_size(n->graph, sfile);
- if ((imagesize.x == -1) && (imagesize.y == -1)) {
- agerr(AGERR,
+ /* custom requires a shapefile
+ * not custom is an adaptable user shape such as a postscript
+ * function.
+ */
+ if (strcmp(ND_shape(n)->name, "custom")) {
+ imagesize.x = imagesize.y = 0;
+ }
+ else {
+ char *sfile = agget(n, "shapefile");
+ imagesize = image_size(n->graph, sfile);
+ if ((imagesize.x == -1) && (imagesize.y == -1)) {
+ agerr(AGERR,
"No or improper shapefile=\"%s\" for node \"%s\"\n",
(sfile ? sfile : "<nil>"), n->name);
- } else
- GD_has_images(n->graph) = 1;
+ } else
+ GD_has_images(n->graph) = 1;
+ }
dimen.x = MAX(dimen.x, imagesize.x);
dimen.y = MAX(dimen.y, imagesize.y);
}
* this file type
* Returns the size required for the shape in points;
* returns (-1,-1) on error;
- * returns (0,0) to indicate "don't care". For example, in
- * postscript, a node can have a user-defined shape but no shapefile.
*/
point image_size(graph_t * g, char *shapefile)
{
point rv;
/* no shape file, no shape size */
- if (!shapefile) {
+ if (!shapefile || (*shapefile == '\0')) {
rv.x = rv.y = -1;
return rv;
}
- if (*shapefile == '\0') {
- rv.x = rv.y = 0;
- return rv; /* no shapefile; probably postscript custom */
- }
if (!strncasecmp(shapefile, "http://", 7)) {
rv.x = rv.y = 0;
return rv; /* punt on obvious web addresses */