ChartDirector 7.1 (C++ Edition)

BaseBoxLayer.setRoundedCorners


Usage

void setRoundedCorners(int r1 = -0x7fffffff, int r2 = -0x7fffffff, int r3 = -0x7fffffff, int r4 = -0x7fffffff);

Description

Configures rounded corners for the boxes. This method currently is only supported by the BoxWhiskerLayer.

A box has 4 corners, two of them are at "box-top", and two of them are at "box-bottom". Note that "box-top" and "bottom-bottom" refer to the sides of the box representing the boxTop and boxBottom parameters in XYChart.addBoxWhiskerLayer or XYChart.addBoxLayer. Note that they are not necessarily the geometric top or bottom of the box. For example, if the y-axis is reversed (such as configured using Axis.setReverse), the top and bottom side may be reversed. For horizontal boxes (with XYChart.swapXY in effect), the box-top and box-bottom sides may actually be the right and left sides.

Of the 2 box-top corners, one of them is at the negative x direction while the other is at the positive x direction. The same applies to the box-bottom corners.

This method accepts 0, 1, 2 or 4 radius values. The usage of these values depend how many values are provided as follows.

Values ProvidedDescription
0The radii of all the box corners are automatically determined.
1The radii of all the box corners are set to the specified value.
2The radii of the box-top corners are set to the first value. The radii of the box-bottom corners are set to the second value.
4The radius of the box-top corner at the negative x direction is set to the first value. The radius of the box-top corner at the positive x direction is set to the second value. The radius of the box-bottom corner at the negative x direction is set to the third value. The radius of the box-bottom corner at the positive x direction is set to the fourth value.

Arguments

ArgumentDefaultDescription
r1-0x7fffffffThe first radius. See description above on how this radius value is used.
r2-0x7fffffffThe second radius. See description above on how this radius value is used.
r3-0x7fffffffThe third radius. See description above on how this radius value is used.
r4-0x7fffffffThe fourth radius. See description above on how this radius value is used.

Return Value

None