[Top][All Lists]

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

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

From: Ben Abbott
Subject: [Octave-bug-tracker] [bug #31468] multi-line text objects
Date: Thu, 11 Aug 2011 14:20:23 +0000
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.112 Safari/535.1

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

I think a ML compatible implementation for the gnuplot backend is straight
forward. The "string" property for a text object needs to be modified so that
its value may be of class "char", or "cell". For the ticklabels this is done
by making the change below.

      string_property string u , ""
      radio_property units u ,

The above is changed to ...

      // FIXME -- should be kind of string array.
      any_property string m , ""   
      radio_property units u ,

Unfortunately, this change results in a compiler error for the OpenGL

libtool: compile:  g++-4.2 -DHAVE_CONFIG_H -I. -I.. -D__LISTS__
-I/sw/lib/flex/include -I/sw/include -m32 -I/sw/include/freetype2
-I/sw/include/qhull -I/usr/include -I../libgnu -I../libgnu -I../libcruft/misc
-I../liboctave -I../liboctave -I. -I. -D__LISTS__ -I/sw/lib/flex/include
-I/sw/include -m32 -I/sw/include/freetype2 -I/sw/include/qhull -I/usr/include
-I/sw/include -m32 -O1 -g -D_THREAD_SAFE -DHAVE_CONFIG_H -mieee-fp
-I/sw/include -I/sw/include/freetype2 -I/sw/include -I/sw/include -Wall -W
-Wshadow -Wold-style-cast -Wformat -Wpointer-arith -Wwrite-strings
-Wcast-align -Wcast-qual -I/sw/include -m32 -O1 -g -D_THREAD_SAFE
-D_THREAD_SAFE -pthread -I/sw/include -m32 -O1 -g -D_THREAD_SAFE -MT
liboctinterp_la-gl-render.lo -MD -MP -MF .deps/liboctinterp_la-gl-render.Tpo
-c gl-render.cc  -fno-common -DPIC -o .libs/liboctinterp_la-gl-render.o
In file included from gl-render.h:43,
                 from gl-render.cc:33:
graphics.h: In member function 'void text::properties::set_string(const
graphics.h:7119: error: 'set_stringmode' was not declared in this scope
graphics.h:7124: error: 'set_stringmode' was not declared in this scope
gl-render.cc: In member function 'virtual void
opengl_renderer::draw_text(const text::properties&)':
gl-render.cc:2425: error: 'class octave_value' has no member named 'empty'

My c/c++ skills are embarrassingly poor. If someone can provide a change that
allows the OpenGL code to compile and function properly with the above change,
I should be able to handle the result of the needed changes for the the
gnuplot backend.

In any event, beyond the above change, the text.m and __go_draw_axes__.m
functions need to be changed. I can't test the changes needed by these until
the OpenGL build error is resolved, but I've attached a diff that should be

For those unfamiliar with how ML implements multi-line text, the commands
below would give multi-line results.

text (x, y, {"Hello", "World"})
text (x, y, ["Hello";"World"])


(file #23784)

Additional Item Attachment:

File name: multiline_text_for_gnuplot.diff Size:2 KB


Reply to this item at:


  Message sent via/by Savannah

reply via email to

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