Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic How change the direction of current arrow? (Read 1762 times)
parkwonwoo
Junior Member
**
Offline


Open the Podbay Doors
HAL!

Posts: 61
Joined: Dec 8th, 2006
How change the direction of current arrow?
Mar 5th, 2007 at 11:48pm
Print Post  

I need reverse the direction of an arrow.

what is the simple method?

Code
Select All
// this kind method ?
arr.arrowhead:=arr.arrowbase;

 



or is there any function?

Thanks.
  

OS: WinXP sp2&&RAD: Borland Delphi7, C++Builder6, JBuilder9&&FrameWork: VCL+Win32 or J2SE&&FCX: FCX 4.1.x
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: How change the direction of current arrow?
Reply #1 - Mar 6th, 2007 at 5:37am
Print Post  
This will reverse the arrow visually

Code
Select All
Dim tempHead As EArrowHead
Dim tempSize As Long

tempHead = arrow.ArrowHead
arrow.ArrowHead = arrow.ArrowBase
arrow.ArrowBase = tempHead

tempSize = arrow.ArrowHeadSize
arrow.ArrowHeadSize = arrow.ArrowBaseSize
arrow.ArrowBaseSize = tempSize

arrow.Update
 



and this actually swaps the arrow's origin and destination nodes

Code
Select All
Dim tempNode As Object
Set tempNode = arrow.Origin
arrow.Origin = arrow.Destination
arrow.Destination = tempNode
 

  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint