bugGNU Octave - Bugs: bug #42435, cropped image elements don't...

 
 

bug #42435: cropped image elements don't display

Submitter:  Brent Baccala <baccala>
Submitted:  Tue 27 May 2014 01:00:09 AM UTC
   
 
Category:  Plotting with OpenGL Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Inaccurate Result
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 14 Feb 2019 10:11:19 AM UTC, comment #3: 

This issue has been fixed with the following cset:

http://hg.savannah.gnu.org/hgweb/octave/rev/f034b29320ad

Closing report as fixed (this will only appear in Octave 6).

Pantxo Diribarne <pantxo>
Group Member
Mon 21 Nov 2016 07:56:15 PM UTC, comment #2: 

This is a known issue.  The code in gl-render.cc for draw_image has the following:


    // 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!
      }


Any change would have to start here.

Rik <rik5>
Group administrator
Fri 18 Nov 2016 03:26:18 PM UTC, comment #1: 

This bug is still present in the current dev 4.3.0 (39f39eb4e476).

Pantxo Diribarne <pantxo>
Group Member
Tue 27 May 2014 01:00:09 AM UTC, original submission:  


If a matrix is displayed using image() and zoomed so that individual elements occupy more than one pixel on the screen, the elements either display completely or not at all.  In particular, if the image is panned so that an element is partially on the screen and partially off, it doesn't display at all.


m=[[1 2 3]; [4 5 6]; [7 8 9]]
image(m)


...then pan the image and observe how elements behave when cropped

Brent Baccala <baccala>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Digest:
   bug dependencies.

 

Carbon-Copy List
  • -email is unavailable- added by marsian
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by pantxo (Posted a comment)
  • -email is unavailable- added by baccala (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-02-15 mtmiller Carbon-CopyRemoved 80942 -
    2019-02-14 pantxo StatusConfirmed Fixed
        Open/ClosedOpen Closed
    2019-02-05 rik5 Dependencies- bugs #55632 is dependent
    2018-11-01 marsian Carbon-Copy- Added marsian
    2016-02-28 mtmiller StatusNone Confirmed
        Release3.8.1 dev

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code