Re: Problem in pango_layout_index_to_pos()
- From: "Padraig O'Briain" <Padraig Obriain Sun COM>
- To: gtk-i18n-list gnome org, gtk-devel-list gnome org, dov imagic weizmann ac il
- Subject: Re: Problem in pango_layout_index_to_pos()
- Date: Mon, 24 Sep 2001 08:39:57 +0100 (BST)
I was here last week. see
http://mail.gnome.org/archives/gtk-devel-list/2001-September/msg00373.html
and bug 60630.
I have not received any feedback yet.
Padraig
> Delivered-To: gtk-devel-list gnome org
> To: gtk-i18n-list gnome org, gtk-devel-list gnome org
> Subject: Problem in pango_layout_index_to_pos()
> X-BeenThere: gtk-devel-list gnome org
> X-Loop: gtk-devel-list gnome org
> X-Mailman-Version: 2.0.5
> List-Help: <mailto:gtk-devel-list-request gnome org?subject=help>
> List-Post: <mailto:gtk-devel-list gnome org>
> List-Subscribe: <http://mail.gnome.org/mailman/listinfo/gtk-devel-list>,
<mailto:gtk-devel-list-request gnome org?subject=subscribe>
> List-Id: Development of GTK+ <gtk-devel-list.gnome.org>
> List-Unsubscribe: <http://mail.gnome.org/mailman/listinfo/gtk-devel-list>,
<mailto:gtk-devel-list-request gnome org?subject=unsubscribe>
> List-Archive: <http://mail.gnome.org/archives/gtk-devel-list/>
>
> I've been trying to solve some bugs in the gtktextviewer widget,
> and I have stumbled upon a problem in pango.
>
> The problem I'm looking at occurs in the following scenario:
>
> * Wrap is off
> * The line is longer than the "screen" (widget width) and thus
> a horizontal scrollbar is shown.
> * The insert mark is at the end of the line.
> * Control-E is pressed.
>
> What happens then is that scrolling jumps to display the start of
> the line instead of the end of the line. (The same behaviour occurs
> if trying to type, the scrolling jumps back and forth between the
> beginning and the end of the buffer.)
>
> I eventually traced down the problem to the following lines in
> pango-layout.c:pango_layout_index_to_pos():
>
> if (notfound)
> {
> /* Iterator should now be on the "NULL" run at the end of the last
> * line, which is a zero-width rectangle. Return the extents of
> * that run.
> */
>
> pango_layout_iter_get_run_extents (iter, NULL, pos);
> }
>
> The problem is that pango_layout_iter_get_run_extents() does
> not return a zero-width rectangle, but rather a rectangle of the
> complete row. Since the scrolling is done to the start of the rectangle
> this causes the widget to be scrolled to the beginning of the line.
>
> My question is what function should fullfill the creation of the zero-
> width rectangle mentioned in the comment? pango_layout_index_to_pos()
> or pango_layout_iter_get_run_extents()?
>
> Regards,
> Dov
>
> _______________________________________________
> gtk-devel-list mailing list
> gtk-devel-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-devel-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]