Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
Coordinates of a grouped line
Thanks Peter
I have got something to work based on your suggestions. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Showing x,y coordinates of a line | Charts and Charting in Excel | |||
Line Start and End Coordinates | Excel Programming | |||
Convert point coordinates - pixel coordinates | Excel Programming | |||
Simple way to convert UTM ED50 coordinates to decimal coordinates? | Excel Programming | |||
Converting MouseDown Coordinates to Chart Point Coordinates | Excel Programming |