replica nfl jerseysreplica nfl jerseyssoccer jerseyreplica nfl jerseys forums.silverfrost.com :: View topic - Getting Co-ords by Clicking On (or near to ?) a Point
forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Getting Co-ords by Clicking On (or near to ?) a Point

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+
View previous topic :: View next topic  
Author Message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 8210
Location: Salford, UK

PostPosted: Sat Mar 06, 2021 1:34 pm    Post subject: Reply with quote

GET_PLOT_DATA@ takes INTEGER (ix,iy) co-ordinates for a point on the screen (supplied as input values in the program) and transforms them to the corresponding double precision values for the point on the graph.

The integer values are used directly without any processing.
Back to top
View user's profile Send private message AIM Address
mecej4



Joined: 31 Oct 2006
Posts: 1899

PostPosted: Mon Mar 15, 2021 7:57 am    Post subject: Reply with quote

John S., I think that it would be the application programmer's responsibility to write code to recover the (two, three or higher dimensional) input data that is represented on a 2-D screen plot when the user clicks on a "point". I don't think that a library routine can accomplish this task, since it is so dependent on the reversibility of the space-to-plane transformation.

An example of why this has to be so:
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 8210
Location: Salford, UK

PostPosted: Tue Mar 16, 2021 9:04 pm    Post subject: Reply with quote

The native %pl uses real value arithmetic and passes real valued results to the Microsoft GDI+ which is designed to work with real values.

Integer values supplied by the programmer are fed directly into this real arithmetic and there is no choice but to use them without adjustment. Granted the values may be picked off a pixelated screen but if the programmer can't make any adjustment because the image is two-dimensional then no adjustment is logically possible within ClearWin+.
Back to top
View user's profile Send private message AIM Address
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 8210
Location: Salford, UK

PostPosted: Thu Mar 18, 2021 8:07 am    Post subject: Reply with quote

GET_PLOT_DATA@ and GET_PLOT_POINT@ provide co-ordinate transformation to/from graph/screen co-ordinates.

Internally %pl has floating point (fp) co-ordinates (xmin, ymin), (xmax,ymax) and (x0,y0) for the origin, that are determined either directly from user parameters or indirectly from the user's plot data.

Integer values input to GET_PLOT_DATA@ are used in a fp calculation without ambiguity or loss of precision.

There is no provision within ClearWin+ that relates a given pixel point to a user's line/curve on the graph.
Back to top
View user's profile Send private message AIM Address
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 8210
Location: Salford, UK

PostPosted: Thu Mar 18, 2021 2:18 pm    Post subject: Reply with quote

Maybe there should be but at the moment there isn't.
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+ All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group