octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #31468] multi-line text objects


From: Vanya Sergeev
Subject: [Octave-bug-tracker] [bug #31468] multi-line text objects
Date: Fri, 12 Aug 2011 21:24:47 +0000
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.112 Safari/535.1

Follow-up Comment #27, bug #31468 (project octave):

Attached is an experimental patch for txt-eng-ft.cc to process newline
characters in the rendering process. When the glyph rendering loop encounters
a 'n', it attempts to look up the glyph for a space (' ') and use it's
face->size->metrics.height to increment yoffset, and resets xoffset to 0. It
builds the initial bounding box similarly.

Now multiple lines work in FLTK labels, except they are not centered with
respect to one another...

Here is a sample run:

octave:1> graphics_toolkit("fltk")
octave:2> plot([1,2,3,4,5])
octave:3> set(get(gca(), "title"), "string", {"multi-line", "title", "here"})
octave:4> set(get(gca(), "xlabel"), "string", ["multi-line xlabel";  "here"])
octave:5> set(get(gca(), "ylabel"), "string", "and a multi-linenylabelnhere")

Screenshot of the plot attached.

Also, all of the "missing glyph" messages are taken care of since the newline
is processed.

Thanks,
~vsergeev

(file #23794, file #23795)
    _______________________________________________________

Additional Item Attachment:

File name: fltk_multiline_render_experimental.patch Size:5 KB
File name: fltk_multiline_test.png        Size:12 KB


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?31468>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]