The Android development team recently announced Graphics Shapes Version 1.0, a library which allows for the creation and rendering of rounded polygonal shapes, as well as automatic animation between different shapes.

With the alpha01 version, users are enabled to use the Polygon API to create regular and star polygons with the necessary number of vertices, use optional CornerRounding parameters to set the rounding radius and smoothing parameters for the corners, and use the new Morph(Polygon, Polygon) APIto calculate a “morph” shape whose progress can be set from 0 to 1 to animate between staring and ending shapes. 

The newly released alpha02 version of Graphics Shapes Version 1.0 brings with it several API Changes, including the merging of the Polygon superclass with its subclass, RoundedPolygon. With this, all polygons are now [optionally] rounded polygons.

Additionally, the Star function now takes an innerRadius value rather than an innerRadiusRatio parameter. The company stated that this change is geared at making things simpler and more consistent.

Along with this, the numOuterVertices parameter was also renamed to numVerticesPerRadius in order to make it clear that the same number is applied to both the inner and the outer radii.

Lastly, CornerRounding.radius had previously been documented to be relative to the size of the polygon, but now the documentation has been updated to show that it is an absolute, not a relative value, and the annotation limiting it to a maximum value of 1.0 was fixed. 

The alpha02 release also made it so that in order to add a dependency on Graphics, the user needs to add the Google Maven repository to their projects.

To learn more about Graphics Shapes Version 1.0, visit the website