bugGNU Octave - Bugs: bug #65096, getpixelposition with...

 
 

bug #65096: getpixelposition with REL_TO_FIG=true

Submitter:  Liang Tang <lt1234>
Submitted:  Sat 30 Dec 2023 04:30:08 PM UTC
   
 
Category:  Plotting Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  lt1234 Open/Closed:  * Closed
Release:  * 8.2.0 Operating System:  * Any
Fixed Release:  9.1.0 (current stable) Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 16 Jan 2024 10:43:47 PM UTC, comment #3: 

I verified the patch, made two unrelated cleanups, and checked in the changeset here https://hg.savannah.gnu.org/hgweb/octave/rev/d43bec544e8e.

This will be a part of the 9.1 release of Octave.

Rik <rik5>
Group administrator
Mon 08 Jan 2024 07:37:19 PM UTC, comment #2: 

Thanks.  I think this patch should fix the issue.

Liang Tang <lt1234>
Mon 08 Jan 2024 07:30:46 PM UTC, comment #1: 

The attached patch fixes the issue for me.

(file #55543)

Pantxo Diribarne <pantxo>
Group Member
Sat 30 Dec 2023 04:30:08 PM UTC, original submission:  

Example from matlab web site below.  With REL_TO_FIG=true, getpixelposition returns a left lower corner x, y pair that is absolute xy (or relative to the parent of the figure), not the relative xy relative to the figure.  Thanks. 

f = figure('Position',[300 300 300 200]);
p = uipanel('Position',[.2 .2 .6 .6]);
btn = uicontrol(p,'Style','PushButton', ...
     'Units','Normalized', ...
     'String','Push Button', ...
     'Position',[.1 .1 .5 .2]);
    
pos = getpixelposition(btn,true)
ans =

   379.600   355.080    88.000    22.960
    

Liang Tang <lt1234>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #55543:  bug65096.patch added by pantxo (1008B - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by pantxo (Updated the item)
  • -email is unavailable- added by lt1234 (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
    2024-01-16 rik5 StatusPatch Submitted Fixed
        Open/ClosedOpen Closed
        Fixed ReleaseNone 9.1.0 (current stable)
    2024-01-08 pantxo Attached File- Added bug65096.patch, #55543
        CategoryOctave Function Plotting
        StatusNone Patch Submitted
        Operating SystemMicrosoft Windows Any

    Back to the top

    Powered by Savane 3.13-04b1.
    Corresponding source code