New topic: Drawing a CIRCLE/Ellipse using CURVESHAPE
<http://forums.realsoftware.com/viewtopic.php?t=47534> Page 1 of 1 [ 4 posts ] Previous topic | Next topic Author Message DaveS Post subject: Drawing a CIRCLE/Ellipse using CURVESHAPEPosted: Sun Apr 07, 2013 11:21 am Joined: Sun Aug 05, 2007 10:46 am Posts: 4728 Location: San Diego, CA I need to be able to draw a CIRCLE or Ellipse or any arc along those shapes..... but am limited to using CURVESHAPE with ONE control point. I can have as MANY CURVESHAPES as it takes (as part of a FIGURESHAPE). but the resultant FIGURESHAPE must draw the required shape. something like this would be perfect : dim FS as FIGURESHAPE FS=Create_Circle(cx,cy,rx,ry,a1,a2) with CX,CY being the CENTERPOINT of the circle/ellipse RX,RY being the horizontal and vertical RADIUS (if equal I get a CIRCLE, otherwise an ELLIPSE) A1 and A2 being the starting and ending Angles (0,360 being a full circle) CAVEAT : A2 might be LESS than A1 in which case the ARC would be drawn COUNTERCLOCKWISE.. The Direction is important, as other curveshapes will possible be included in the FIGURESHAPE to define the final shape.... and FIGURESHAPE requires proper end to end points to render properly Example : this should draw an 'IceCream Cone' Shape dim FS as FIGURESHAPE FS=Create_Circle(100,100,50,50,0,180) ' create a 1/2 circle ' connect a line to end of 1/2 circle CS=new curveshape CS.X=150 cs.y=50 cs.x2=100 cs.y2=150 fs.append cs ' CS=new curveshape CS.X=100 cs.y=150 cs.x2=50 cs.y2=50 fs.append cs ' _________________ Dave Sisemore MacPro, OSX Lion 10.7.4 RB2012r1 Note : I am not interested in any solutions that involve custom Plug-ins of any kind Top kermit Post subject: Re: Drawing a CIRCLE/Ellipse using CURVESHAPEPosted: Sun Apr 07, 2013 11:41 am Joined: Mon May 30, 2011 12:56 am Posts: 664 Quote:something like this would be perfect : dim FS as FIGURESHAPE FS=Create_Circle(cx,cy,rx,ry,a1,a2) Maybe summat like this: Dim o as New OvalShape o.width=rx*2 o.height=ry*2 o.x = cx o.y = cy o.Fillcolor=RGB(127,127,255) g.DrawObject o,o.Width,o.Height Top DaveS Post subject: Re: Drawing a CIRCLE/Ellipse using CURVESHAPEPosted: Sun Apr 07, 2013 11:48 am Joined: Sun Aug 05, 2007 10:46 am Posts: 4728 Location: San Diego, CA No... it has to be appended to a FIGURESHAPE to become part of a POLYGON description. example... look at the upper left image here ..... That is an ELLIPSE but only 340 degrees.... then two lines (also CURVESHAPES) would be appended to make the final shape Ovalshape cannot be appended to FIGURESHAPE (only CURVESHAPES can), plus OVALSHAPE is 360 degrees... I need to be able to define start/end angles I know it can be done with a series of CURVESHAPES...... I was just hoping someone already had the specifics figured out, and would be willing to share. _________________ Dave Sisemore MacPro, OSX Lion 10.7.4 RB2012r1 Note : I am not interested in any solutions that involve custom Plug-ins of any kind Top Karen Post subject: Re: Drawing a CIRCLE/Ellipse using CURVESHAPEPosted: Sun Apr 07, 2013 4:32 pm Joined: Fri Sep 30, 2005 8:53 am Posts: 981 DaveS wrote:No... it has to be appended to a FIGURESHAPE to become part of a POLYGON description. Does it really HAVE to be or would that just make it simpler... It may be able to be done as part of a group2D with overlay objects to "erase" (hide) borders that should not show... Way back when I used to do that manually in simple object oriented drawing programs to make diagrams. The balloons could be a combination of outer RectShapes Or OvalShapes with borders with a figureshape for the pointer (one that extends into the center a bit) and an inner RectShape Or OvalShape without a border to cover the figureshape border where it should not show.. Hackish? yes... But it might just get the job done! - karen Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 4 posts ] -- 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]
