Quinn-Curtis Forums
Quinn-Curtis Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Tools for Microsoft .Net
 Real-Time Graphics Tools for .Net (VB and C#)
 How to get screen coordinates for alignment.

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
   

T O P I C    R E V I E W
BarryRobertson Posted - 19 Nov 2012 : 14:44:29
I am looking at DataCursorsAndMarkers as an example. What I need is a control (for touch screen) that a user can drag left/right across the bottom of the graph, moving a vertical marker (and of course I need to get the values of my plots that intersect the marker).

What I was immediately trying to figure out was how to get the screen positions for the left and right side of the plot area so that I can position my control (think of it as a track-bar with a pointer pointing up). The position needs to be about 47 pixels left of the plot and then over 47 to the right of the plot (since it's 95 pixels wide) (see example below if it displays well).

I have my trackbar minimum and maximum set corresponding to the plot area's time axis that is visible. I currently do not have this control inside my graph object (it's external, but directly beneath).

I haven't found the right thing to get "real" coordinates on the screen of the left/right of the plot. It seemed like I could query something to get the position/bounding box of the x-axis, but I didn't get data that made sense.

My slider control looks similar to this (dots for spacing here).

_____/\_____
|............|________________________________________________
|____________|

The pointer part (pointing up) needs to align with the left of my plot when all the way left, and align with the right of the plot area when all the way to the right.

If I'm doing this completely wrong, creating an issue where there shouldn't be one, that would be nice to know.

Thanks for your help.
1   L A T E S T    R E P L I E S    (Newest First)
quinncurtis Posted - 19 Nov 2012 : 23:20:34
The pixel boundaries of the plotting area, normally the area bounded by the axes, can be retrieved using the coordinate systems GetPlotRect()method.

Rectangle2D plotrect = pTransform1.getPlotRect();

Quinn-Curtis Forums © 2000-2018 Quinn-Curtis, Inc. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.07