# Thread: To get the points on the perimeter of a Rounded Rectangle

1. Member
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.

Last edited by rashibahal; 06-11-2008 at 02:52 PM. Reason: Wanted to add more text

2. How did you accomplish the Rectangle? That should have the data for the rectangle already.

3. Member
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.

4. Jordan says that, to draw a rectangle you need data, basically coordinates. You say that you don't have those?

5. Member
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.

6. 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.

7. Member
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.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•