- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I believe I have stumbled across an error in the documentation for the Quickwin graphics subroutines GETVIEWCOORD and GETVIEWCOORD_W. The description says "Translate physical coordinates or window coordinates to viewport coordinates." Presumably the physical coordinates applies to Getviewcoord and the window coordinates applies to Getviewcoord_w. The syntax for the former is
CALL GETVIEWCOORD (x, y, t)
where x, y are INTEGER(2) physical coordinates and t is derived type xycoord having INTEGER(2) members xcoord, ycoord. This much is correct.
The syntax for the latter is
CALL GETVIEWCOORD_W (wx, wy, wt)
where wx, wy are REAL(8) window coordinates and wt is derived type wxycoord having REAL(8) members wx and wy. This must be incorrect, for it implies a conversion from window coordinates to window coordinates. It won't even compile, giving the argument type mismatch error. I believe the correct syntax is
CALL GETVIEWCOORD_W (wx, wy, t)
which would convert window coordinates wx, wy to viewport coordinates t%xcoord, t%ycoord.
In my (very) limited testing so far, this corrected syntax appears to be exactly what the subroutine is doing.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
[fortran] INTERFACE
SUBROUTINE GETVIEWCOORD_W(WX,WY,S)
!DEC$ ATTRIBUTES DEFAULT :: GETVIEWCOORD_W
!DEC$ ATTRIBUTES DECORATE, ALIAS:"_f_getviewcoord_w" :: GETVIEWCOORD_W
DOUBLE PRECISION WX,WY
STRUCTURE/XYCOORD/
INTEGER*2 XCOORD
INTEGER*2 YCOORD
END STRUCTURE
RECORD/XYCOORD/S
!DEC$ ATTRIBUTES REFERENCE :: S
END SUBROUTINE
END INTERFACE
[/fortran]
From IFQWIN
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This was reported a couple of months ago and is corrected for the next major release.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you Steve.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@ #5 I was agreeing with you. The interface in IFQWIN does not match the documentation, when confused I always look at the interface.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks. I see now what you mean.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page