Any idea how i can create a rectangle with specific absolute roundness values. Now i calculate it from the small side value in percentage. But this gives me not a usable exactly result. Because the int is from 0 to 100 value. The inaccuracy arises when converting double to int
1 2 3 4 5 6 7 8 9 10 11 12
double test = 0; if (xSize < ySize) { test = xSize / 100; } else { test = ySize / 100; } cornerRadius = (cornerRadius / test) * 2; corelApp.ActiveLayer.CreateRectangle(0, 0, xSize, ySize, (int)cornerRadius, (int)cornerRadius, (int)cornerRadius, (int)cornerRadius);
You could create the rectangle, then set the corner radius.
The Rectangle.RadiusLowerLeft property, for example, is a double, and is in document units.
Many thanks, this works perfectly.