Add shapeAppearance and shapeAppearanceOverlay attributes. These attributes combine to support shapes theming. ShapeAppearance is modeled after TextAppearance. A shapeAppearance attribute contains a style reference that is meant to be defined at the theme level. Since changing anything defined in the shapeAppearance would clobber everything else in the ShapeAppearance, the shapeAppearanceOverlay attribute is provided for clients to modify the shapeAppearance.
PiperOrigin-RevId: 215242636
This commit renames ShapePathModel to ShapeAppearanceModel to align with the new shapeAppearance attributes that will be added for shape theming.
PiperOrigin-RevId: 214818189
Anti-aliasing the Paint by default eliminates the appearance of jagged edges and corners.
Anti-aliasing is currently supported by calling setPaintFlags() on MaterialShapeDrawable, but it is not yet enabled by default.
PiperOrigin-RevId: 212709536
Before this change, MaterialShapeDrawable incorrectly handled ColorStateLists. Only the color defined "last" in a ColorStateList was used. This is because MaterialShapeDrawable was not properly updating and handling state changes. This change fixes the issue by updating the tint filter appropriately and overriding some methods which should have been overridden.
PiperOrigin-RevId: 210779870
Before this change, MaterialShapeDrawable did not draw with respect to InsetDrawables. The problem was that MaterialShapeDrawable was using the Canvas to determine where to draw, rather than the bounds. This change reworks MaterialShapeDrawable to use the bounds to calculate and draw the shape's path, rather than the Canvas.
PiperOrigin-RevId: 210724227