Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Coordinates of a grouped line

In code I draw 2 identical vertical lines (the end of one line is the start of the next). The lines are then grouped to form a grouped shape that is twice the length of the individual lines. I then rotate the shape a set number of degrees. How do I determine the new coordinates of the bottom end of the rotated shape. Using .left and .top etc. all give me the position of the shape before rotation. Is there a parameter which describes the new position?

David


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 88
Default Coordinates of a grouped line

"David Cuthill" wrote in message
In code I draw 2 identical vertical lines (the end of one line is the start
of the next). The lines are then grouped to form a grouped shape that is
twice the length of the individual lines. I then rotate the shape a set
number of degrees. How do I determine the new coordinates of the bottom end
of the rotated shape. Using .left and .top etc. all give me the position of
the shape before rotation. Is there a parameter which describes the new
position?

David

==========

The Shape object as a Rotation property which returns degrees about the
centre of the shape, in your case the point where the two lines join.

Your shape will include two GroupItems, ie your line objects. Get the XY end
points of the lines from the opposite diagonals of the left/top/ht/wd
values. One point will be the centre, the other the point on the circle.

Use the rotation value with a bit of trigonometry to calculate the new
virtual positions of the lines. Don't forget degrees need to be converted to
radians with Excel's trig functions.

Peter T


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Coordinates of a grouped line

Thanks Peter
I have got something to work based on your suggestions.
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Showing x,y coordinates of a line Smylegirl Charts and Charting in Excel 12 May 2nd 07 10:08 PM
Line Start and End Coordinates Zone[_2_] Excel Programming 3 January 26th 07 01:02 PM
Convert point coordinates - pixel coordinates Zorro[_3_] Excel Programming 1 June 1st 06 03:26 AM
Simple way to convert UTM ED50 coordinates to decimal coordinates? Dan[_38_] Excel Programming 8 July 11th 04 04:54 PM
Converting MouseDown Coordinates to Chart Point Coordinates Steve[_50_] Excel Programming 3 December 2nd 03 07:48 PM


All times are GMT +1. The time now is 09:06 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"