[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: about contibuting to octave
From: |
Ben Abbott |
Subject: |
Re: about contibuting to octave |
Date: |
Thu, 12 Mar 2009 16:53:12 +0800 |
On Mar 11, 2009, at 2:37 PM, xianghang liu wrote:
Two functions below are two methods of computing bounding box of a
text object. I wrote them following algorithms used in GD and
Freetype. Only a slight diiference is between them. It is the
computation of bounding box of a charachter. And the final result of
them are slightly different as well.
Please tell me if you find any mistakes or have suggestions.
I'm confused by what is meant by "bounding box", and as I'm unfamiliar
with FreeType (and have poor c++ skills) I'm uncertain that this
implementation will result in what is expected for the text object
property, "extent".
Consider the three examples below (from Matlab).
>> h1 = text(0,0,'_','interpreter','none','units','points','fontsize',
12);
>> h2 = text(0,0,'|','interpreter','none','units','points','fontsize',
12);
>> h3 = text(0,0,'-','interpreter','none','units','points','fontsize',
12);
>> get(h1,'extent')
ans =
0 -8.8 8.8 16
>> get(h2,'extent')
ans =
0 -8.8 5.6 16
>> get(h3,'extent')
ans =
0 -8.8 6.4 16
The choice of character only impacts the width of the extent. The
lower left corner and height of the extent is constant.
Does your implementation produce such a result, or does it produce a
bounding box representing the smallest box that encompasses the text
object?
Ben
- Re: about contibuting to octave, (continued)
- Re: about contibuting to octave, Shai Ayal, 2009/03/05
- Message not available
- Re: about contibuting to octave, xianghang liu, 2009/03/05
- Re: about contibuting to octave, xianghang liu, 2009/03/11
- Re: about contibuting to octave, Shai Ayal, 2009/03/11
- Re: about contibuting to octave, Søren Hauberg, 2009/03/11
- Re: about contibuting to octave, Shai Ayal, 2009/03/11
- Re: about contibuting to octave, xianghang liu, 2009/03/11
- Re: about contibuting to octave, Michael Goffioul, 2009/03/11
- Message not available
- about contibuting to octave, xianghang liu, 2009/03/11
- Re: about contibuting to octave, Michael Goffioul, 2009/03/11
- Re: about contibuting to octave,
Ben Abbott <=
- Re: about contibuting to octave, Michael Goffioul, 2009/03/12
- Re: about contibuting to octave, Ben Abbott, 2009/03/12
- Re: about contibuting to octave, xianghang liu, 2009/03/12
- Re: about contibuting to octave, Michael Goffioul, 2009/03/12
- Re: units conversion (was: about contibuting to octave), Ben Abbott, 2009/03/12
- Re: units conversion (was: about contibuting to octave), John Swensen, 2009/03/13
- Re: units conversion (was: about contibuting to octave), Shai Ayal, 2009/03/13
- Re: units conversion (was: about contibuting to octave), John W. Eaton, 2009/03/13
- Re: units conversion (was: about contibuting to octave), xianghang liu, 2009/03/26
- Re: units conversion (was: about contibuting to octave), John W. Eaton, 2009/03/26