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

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

[Octave-bug-tracker] [bug #49490] Display of images for axes partially o


From: Rik
Subject: [Octave-bug-tracker] [bug #49490] Display of images for axes partially outside a figure
Date: Wed, 2 Nov 2016 15:35:44 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:43.0) Gecko/20100101 Firefox/43.0

Update of bug #49490 (project octave):

                Priority:              5 - Normal => 3 - Low                
                  Status:                    None => Confirmed              

    _______________________________________________________

Follow-up Comment #1:

Confirmed.  The code to modify is in libinterp/corefcn/gl-render.cc.  The
function draw_image has some notes and a FIXME comment about this particular
case.


    // OpenGL won't draw any of the image if its origin is outside the
    // viewport/clipping plane so we must do the clipping ourselves.

    int j0, j1, i0, i1;
    j0 = 0, j1 = w;
    i0 = 0, i1 = h;

    float im_xmin = x(0) - nor_dx/2;
    float im_xmax = x(1) + nor_dx/2;
    float im_ymin = y(0) - nor_dy/2;
    float im_ymax = y(1) + nor_dy/2;
    if (props.is_clipping ()) // clip to axes
      {
        if (im_xmin < xmin)
          j0 += (xmin - im_xmin)/nor_dx + 1;
        if (im_xmax > xmax)
          j1 -= (im_xmax - xmax)/nor_dx;

        if (im_ymin < ymin)
          i0 += (ymin - im_ymin)/nor_dy + 1;
        if (im_ymax > ymax)
          i1 -= (im_ymax - ymax)/nor_dy;
      }
    else // clip to viewport
      {
        GLfloat vp[4];
        glGetFloatv (GL_VIEWPORT, vp);
        // FIXME: actually add the code to do it!
      }



It looks like the else branch is simply unimplemented.



    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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