Re: [g-a-devel]impl_getBoundedRanges
- From: Bill Haneman <bill haneman sun com>
- To: "Padraig O'Briain" <Padraig Obriain sun com>
- Cc: gnome-accessibility-devel gnome org
- Subject: Re: [g-a-devel]impl_getBoundedRanges
- Date: 14 Jan 2003 14:51:59 +0000
On Tue, 2003-01-14 at 14:40, Bill Haneman wrote:
> On Tue, 2003-01-14 at 14:30, Padraig O'Briain wrote:
> > Bill,
> >
> > I have reviewed this patch and found that the change in the while statements
> > from < to <= is not necessary,
> >
> > Updated patch is attached.
>
> Thanks Padraig, this version of the patch looks good. Please commit.
...
I took a second look, and I don't agree with this change:
> > - startOffset = MIN (minLineStart, maxLineStart);
> > - endOffset = MIN (minLineEnd, maxLineEnd);
> > + startOffset = MIN (minLineStart, minLineEnd);
> > + endOffset = MAX (maxLineStart, maxLineEnd);
Our API should guarantee that minLineStart <= minLineEnd, so your test
is redundant.
However, my intent was to make sure that the line of text at (x, y) has
a starting offset less than (or equal to) that of the line at (x+w,
y+h).
Granted you need rather weird text (bottom-to-top alignment) for
maxLineStart to be less than minLineStart in this example, but that was
the intent. So the patch should read, IMO:
- endOffset = MIN (minLineEnd, maxLineEnd);
+ endOffset = MAX (minLineStart, maxLineEnd);
FWIW,
the only example I can think of is a "clock face" text buffer,
containing the numbers 1 through 12 'in order', but laid out to look
like this:
12
11 1
10 2
9 3
8 4
7 6 5
regards,
Bill
> >
> > curr_offset = startOffset;
> >
--
Bill Haneman <bill haneman sun com>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]