Category Archives: Rect

Setting the corner radius a Spark Rect shape in Flex 4

In a previous example, “Setting a corner radius on individual corners on a Rect in Flex 4”, we saw how you could individually set the corner radius on each corner of a Spark Rect shape in Flex 4 by setting the topLeftRadiusX, topRightRadiusX, bottomLeftRadiusX, and bottomRightRadiusX properties.

The following example shows how you can set the corner radius on all corners of a Spark Rect shape in Flex 4 by setting the radiusX and radiusY properties.

Continue reading Setting the corner radius a Spark Rect shape in Flex 4

Setting an individual x-axis and y-axis corner radius a Rect in Flex 4

In a previous example, “Setting a corner radius on individual corners on a Rect in Flex 4”, we saw how you could individually set the corner radius on each corner of a Spark Rect shape in Flex 4 by setting the topLeftRadiusX, topRightRadiusX, bottomLeftRadiusX, and bottomRightRadiusX properties.

The following example shows how you can set an individual corner radius for the x-axis and y-axis for specific corners of a Rect in Flex 4 by setting both the topLeftRadiusX and topLeftRadiusY properties.

Full code after the jump.

Continue reading Setting an individual x-axis and y-axis corner radius a Rect in Flex 4

Setting a corner radius on individual corners on a Rect in Flex 4

In a previous example, “Drawing complex rectangles in Flex using the GraphicsUtil class”, we saw how you could draw complex rectangles using the drawRoundRectComplex() method in the mx.utils.GraphicsUtil class.

The following example shows how you can individually set the corner radius on each corner of a Spark Rect shape in Flex 4 by setting the topLeftRadiusX, topRightRadiusX, bottomLeftRadiusX, and bottomRightRadiusX properties.

Full code after the jump.

Continue reading Setting a corner radius on individual corners on a Rect in Flex 4

Setting the origin X and Y coordinate for a linear gradient stroke in Flex Gumbo

The following example shows how you can set the origin X and Y coordinate for a linear gradient stroke in Flex Gumbo by setting the x and y properties on the LinearGradientStroke object.

Full code after the jump.

Continue reading Setting the origin X and Y coordinate for a linear gradient stroke in Flex Gumbo