[info-performer] Bug in libpfutil

Date view Thread view Subject view Author view

From: Juergen Wind (juergen.wind++at++vertigo-systems.de)
Date: 01/10/2005 04:33:42


Hi Performers,

I think that I've found a bug in the libpfutil-Source.

In pfuTravCalcBBox, the traversal leaves out the pfText nodes and the
corresponding pfStrings.

I've added a patch to the file trav.c.

The patch was created with " diff trav.c.orig trav.c "

Have fun,

        Juergen

995c995,1022
< }

---
>     } else if (pfIsOfType(trav->node, pfGetTextClassType())) 
>       {
> 	int nstrings, depth;
> 	pfMatrix *xform = NULL;
> 	pfText *text = (pfText *)trav->node;
> 	depth = pfGetMStackDepth(trav->mstack);
> 	if (depth > 1) {
> 	  xform = pfGetMStackTop(trav->mstack);
> 	}
> 	  
> 	nstrings = pfGetNumStrings(text);
> 	for (i = 0 ; i < nstrings ; i++)
> 	  {
> 	    const pfBox* oldstringbox;
> 	    pfBox  xformedstringbox;
> 	    
> 	    pfString *string = pfGetString(text, i);
> 	    oldstringbox  = pfGetStringBBox(string);
> 	    
> 	    if (xform) {
> 	      pfXformBox(&xformedstringbox, oldstringbox, *xform);
> 	      pfBoxExtendByBox(box, &xformedstringbox);
> 	    } else {
> 	      pfBoxExtendByBox(box, oldstringbox);
> 	    }
> 	  }
>       }
> 


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Mon Jan 10 2005 - 04:33:55 PST