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

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

[Octave-bug-tracker] [bug #39692] text objects ignore backgroundcolor, l


From: Rik
Subject: [Octave-bug-tracker] [bug #39692] text objects ignore backgroundcolor, linestyle, edgecolor
Date: Wed, 25 Oct 2017 12:20:02 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0

Follow-up Comment #24, bug #39692 (project octave):

Seems good to me.

Is there an easy way to summarize the logic of what is shown and what is not
shown?  That would help, and maybe should be put in the documentation.

For the margin property, Octave is always using pixels while Matlab is always
using points.  Maybe file another bug report about this minor incompatibility?
 That's a small issue and doesn't need to hold up resolving this bug report.

Does polygon offset need to be set for the lines as well as the background
color patch?  I tried not using that bit of code with this patch


diff -r 5202841a0bb2 libinterp/corefcn/gl-render.cc
--- a/libinterp/corefcn/gl-render.cc    Sun Oct 15 21:06:47 2017 +0200
+++ b/libinterp/corefcn/gl-render.cc    Wed Oct 25 09:12:20 2017 -0700
@@ -3536,14 +3536,16 @@ namespace octave
         glVertex2d (x1, y1);
         glVertex2d (x0, y1);
         glEnd ();
+        
+        set_polygon_offset (false);
       }
 
     if (! ecol.isempty ())
       {
         glColor3f (ecol(0), ecol(1), ecol(2));
 
-        if (glIsEnabled (GL_DEPTH_TEST))
-          set_polygon_offset (true, 0);
+//        if (glIsEnabled (GL_DEPTH_TEST))
+//          set_polygon_offset (true, 0);
 
         set_linestyle (props.get_linestyle (), false, props.get_linewidth
());
         set_linewidth (props.get_linewidth ());
@@ -3557,7 +3559,7 @@ namespace octave
         glEnd ();
       }
 
-    set_polygon_offset (false);
+//    set_polygon_offset (false);
 
     // Restore previous coordinate system
     glPopMatrix();


It seems to work fine.

Also, I went back to 2-D plots and the overlap with the axes.


clf;
ht = text (0.5, 0.5, 'Hello World', 'backgroundcolor', 'r', 'margin', 20,
'fontsize', 20, 'linewidth', 5, 'edgecolor', 'g')
ht2 = text (0.6, 0.6, 'Goodbye World', 'backgroundcolor', 'b', 'margin', 20,
'fontsize', 20, 'linewidth', 5, 'edgecolor', 'k')
axis ([0.076037   1.076037   0.446976   1.446976])
## At this point, text background overlaps ticks and ticklabels
set (gca, 'layer', 'top')
## At this point, axes object ticks and ticklabels are in front
## However, axes line objects are not on top.  This seems to be a bug
## in how the axes backplane is drawn.


It seems like there is still some work to do, but I would like confirmation
from Matlab?  Should this be another test case for Richard?

Finally, and there is a separate bug report about this, but could we use the
glRotate code that you have here for the arbitrary rotation of text?  It's
been a longstanding issue that text onscreen is limited to 0, 90, 180, and 270
degree rotations, even though it can print correctly for any angle.




    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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