Results 1 to 7 of 7
 06112008, 02:50 PM #1Member
 Join Date
 Jun 2008
 Posts
 4
 Rep Power
 0
To get the points on the perimeter of a Rounded Rectangle
Hi all
For some requirement in my project i have made a Rounded Rectangle. Now i want to know how can i calculate to get the points on the perimeter of that rounded rectangle.
I also have a point of reference which will be helpful to get the perimeter points.
Plz help me as its very urgent.
Thanks in advanceLast edited by rashibahal; 06112008 at 02:52 PM. Reason: Wanted to add more text
 06112008, 04:16 PM #2
How did you accomplish the Rectangle? That should have the data for the rectangle already.
 06122008, 07:29 AM #3Member
 Join Date
 Jun 2008
 Posts
 4
 Rep Power
 0
No it does not provide the data to calculate the perimeter. I want to know if some algo or code is available for this. I am using it in a method which does not provide any of the helpful functions. I have to calculate it myself.
 06122008, 07:38 AM #4
 Join Date
 Jul 2007
 Location
 Colombo, Sri Lanka
 Posts
 11,371
 Blog Entries
 1
 Rep Power
 20
Jordan says that, to draw a rectangle you need data, basically coordinates. You say that you don't have those?
 06122008, 07:42 AM #5Member
 Join Date
 Jun 2008
 Posts
 4
 Rep Power
 0
Ok, i misunderstood wht he said. I have the bounds of the figure i.e. the rounded rectangle, which gives me the height, width and the location of that rounded rectangle.
 06122008, 07:52 AM #6
 Join Date
 Jul 2007
 Location
 Colombo, Sri Lanka
 Posts
 11,371
 Blog Entries
 1
 Rep Power
 20
Now you know a fixed location(is that center coordination of the figure?), width and height. Just you want to find the radius of curves, right?
Seems to me you need a simple functionality find the curve length.
 06122008, 09:14 AM #7Member
 Join Date
 Jun 2008
 Posts
 4
 Rep Power
 0
No, its not so...let me tell u the whole scene.
I have a Rectangle of draw2d.geometry...which is passed in the graphics.drawRoundedRectangle() method...Hence i get a rounded rectangle figure.
Now, in some other class i am using an overriden method... i get the access of that same draw2d's Rectangle which i used to pass in the drawRoundedRectangle()..but in the present class i am using an overriden method and i dnt have the graphics object available.
Now, using that Rectangle...i want to make a method that would get the point exactly on the edge of the rounded rectangle when i would try to connect two such rounded rectangle figures. So, for that purpose i want to know some algo or method that wld get the points on the edge of the rounded rectangle.
Similar Threads

Rectangle Intersection
By Gwindow in forum Java 2DReplies: 1Last Post: 04242008, 03:53 PM 
help with rectangle class
By darkgt in forum New To JavaReplies: 7Last Post: 11142007, 07:19 PM 
Rectangle expands with applet frame
By Godzilla in forum New To JavaReplies: 1Last Post: 07102007, 07:14 PM 
Rectangle with rounded edges??
By orchid in forum Java 2DReplies: 1Last Post: 05102007, 02:31 AM
Bookmarks