We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

PointToScreen from within a Shape

How can I determine the point to screen coordinates of a shape''s location from within a shape''s class? If I could get access to the shapes Diagram container, then I could use it''s PointToScreen() method, but I don''t see a way to find the Diagram container that the shape is drawn on, from within the shape class itself. Parent only returns the nodes parent node. I thought Layer might be promising, but the Layer object evidently doesn''t know anything about its container either. Maybe there''s a better approach... but what I''m trying to do is place a form on screen, next to the Shape object. The shape object itself is responsible for displaying the form, and placing it next to itself. It also moves the form, when it moves, by overriding the Draw() method, looks at it''s location, and, if it moved since the last Draw() call, it moves the form. However, in order to do this, I need to be able to translate my Location into absolute Screen coordinates, and I have no methods to do this. Any Ideas?

1 Reply

AD Administrator Syncfusion Team March 24, 2006 04:41 AM UTC

Hi, Basically Essential Diagram uses three coordinate systems - WorldCoordinates,View Coordinates and DeviceCoordinates. -The world coordinate system defines coordinates in terms that are useful to the application and meaningful to the end user. The unit of measurement for world coordinates can be pixels, inches, millimeters, or points and depends on the application. -The device coordinate space defines coordinates in terms of output devices like computer screens and printers. The unit of measurement for coordinates is pixels and the origin is defined to be the upper-left hand corner of the drawing surface. -The view coordinate system maps world coordinates onto a viewing area. There are standard methods available to make the convertions among the Coordinate systems like ViewToDevice(),DeviceToView(),ViewToWorld().. Kindly refer the Essential Online Documentation and the Help Documentation which would give you an idea about how to go with this. Regards, Praveena.

Loader.
Live Chat Icon For mobile
Up arrow icon