New topic: 

CurveShape Confusion [SOLVED]

<http://forums.realsoftware.com/viewtopic.php?t=47788>

         Page 1 of 1
   [ 1 post ]                 Previous topic | Next topic          Author  
Message        DaveS          Post subject: CurveShape Confusion 
[SOLVED]Posted: Sat May 04, 2013 5:33 pm                                 
Joined: Sun Aug 05, 2007 10:46 am
Posts: 4845
Location: San Diego, CA                First off here is the code I am using
'm_x1,m_y1 = MouseDown Anchor Point
'm_x2,m_y2 = Mouse Drag Point
'
c.Controlx(0)=m_x1
c.Controly(0)=m_y2
c.Order=1
c.X =m_x1
c.Y =m_y1
c.X2=m_x2
c.Y2=m_y2
g.DrawObject c,0,0
' the -3 is to center symbol on point
Draw_Handle g,m_x1-3,m_y1-3,False ' anchor point
Draw_Handle g,m_x2-3,m_y2-3,False ' current point
'
Draw_Handle g,c.ControlX(0)-3,c.ControlY(0)-3,true ' Draw "control" point [RED]
Draw_Connect g,m_x1-3,m_y2-3,True


Draw_Handle draws the RED boxes [Gray if last arg is FALSE]
Draw_Connect draws the CIRCLE
Both Draw_Handle and Draw_Connect are identical in all calculations except one 
draws a square, the other a circle

Here is what I am getting


Looking at the code.. you should see (unless I messed up and I don't see it) 
that the CONTROL point matches the DRAW_CONNECT coordinates.  

EXCEPT that is NOT what the image shows.  I want the control point to be where 
the yellow circle is... and the curve to be "up and over".

The idea is the user will place the two end points, and the control point will 
start at a position that would be a "corner" of the rectangle that a line 
between the two points would bisect.  Then they can move the control point 
later.

But for some reason the control point isn't going where I think I'm telling it 
go...

Did I make a boo-boo that I don't see? Or what?  HELP!?

EDIT


This WORKS

'm_x1,m_y1 = MouseDown Anchor Point
'm_x2,m_y2 = Mouse Drag Point
'
c.X =m_x1
c.Y =m_y1
c.X2=m_x2
c.Y2=m_y2
c.Order=1
c.Controlx(0)=m_x1
c.Controly(0)=m_y2


It makes a difference apparently ... the ORDER in which you assign the values   
   
_________________
Dave Sisemore
iMac I7[2012], OSX Mountain Lion 10.8.3 RB2012r2.1
Note : I am not  interested in any solutions that involve custom Plug-ins of 
any kind  
                             Top             Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 1 post ]      
-- 
Over 1500 classes with 29000 functions in one REALbasic plug-in collection. 
The Monkeybread Software Realbasic Plugin v9.3. 
http://www.monkeybreadsoftware.de/realbasic/plugins.shtml

[email protected]

Reply via email to