[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: FT_Outline_Get_BBox
From: |
Ivan Nincic |
Subject: |
Re: FT_Outline_Get_BBox |
Date: |
Fri, 03 Nov 2000 17:00:56 -0800 |
I modified the BBox_Cubic_Check to use recursion and the problem seems to
solved (if the stack frame is large enough :-?).
Also, there are no more ugly goto statements. Attached is my implementation
(in C++).
Ivan
Ivan Nincic wrote:
> BBox_Cubic_Check is crashing for many curves because of the small stack
> size (33).
>
> Here is an example :
> MoveTo: 408.9111, 535.3164
> CurveTo :455.8887, 634.396, -37.8765, 786.2207, 164.6074, 535.3164
>
> Attached is the sample PDF file.
>
> Does anybody knows what would be the largest stack size given an
> arbitrary Bezier curve?
> I will look into this ... If the stack is too large we should probably
> look at some other algorithm.
>
> Ivan
>
> Werner LEMBERG wrote:
>
> > > I have couple of questions related to FT_Outline_Get_BBox.c
> > > 1)
> > > if ( y1 == y4 ) {
> > > if ( y1 == y2 && y1 == y3 ) { /* Flat */
> > > y4 = y1; // 236
> > > goto Test;
> > > }}
> > >
> > > Is the assignment on line 236 some kind of coding style or is it
> > > redundant?
> >
> > Redundant :-) I've fixed it.
> >
> > > 2)
> > > BBox_Cubic_To() and BBox_Conic_To() callback never update the
> > > user->last point (as BBox_Move_To() does). Does this mean that two
> > > consecutive Beziers may have a wrong bbox ?
> >
> > It's a bug also.
> >
> > Thanks for the report.
> >
> > Werner
Proto.cpp
Description: application/unknown-content-type-cppfile