[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Devel] FT_Outline_Copy
From: |
Scott Long |
Subject: |
[Devel] FT_Outline_Copy |
Date: |
Mon, 23 Sep 2002 12:56:51 -0700 |
It took me a while to track down a problem this morning, which turned
out to be my incorrect use of FT_Outline_Copy(). I didn't notice the
section in the manual stating that n_contours and n_points have to
already match in order for the copy to take place.
I don't intend to complain, but what's the point in having this
function if I have to do 50% of the work myself? If I've got to go to
the trouble of setting n_contours and n_points, and then allocating
the arrays myself, why not simply finish the job and do the memcpy()
myself also?
The best reason I can think of is that Freetype can't know who "owns"
the points and tags arrays beforehand, and therefore doesn't know
whether it should free them, or allocate new ones. What that the
original thinking?
I don't think it would be too terrible if there was another function,
that allocated the arrays itself, and had a little note in the
documentation reminding the user that he is responsible for freeing
those arrays when finished with them. Perhaps in this function it
would also be possible to make the argument order (dst, src) instead
of (src, dst), which is another thing I found confusing (considering
all the other copy functions e.g. memcpy, strcpy, a = b, etc).
Regards,
Scott Long
SwiftView, Inc. http://www.swiftview.com
- [Devel] FT_Outline_Copy,
Scott Long <=
- RE: [Devel] FT_Outline_Copy, Graham Asher, 2002/09/23
- Re: [Devel] FT_Outline_Copy, Scott Long, 2002/09/24
- RE: [Devel] FT_Outline_Copy, Graham Asher, 2002/09/24
- Re: [Devel] FT_Outline_Copy, Werner LEMBERG, 2002/09/26
- RE: [Devel] FT_Outline_Copy, Graham Asher, 2002/09/26
- Re: [Devel] FT_Outline_Copy, Scott Long, 2002/09/26
- Re: [Devel] FT_Outline_Copy, Werner LEMBERG, 2002/09/27