NinePatchAppearance
Draws a NinePatch to fill a rectangular region defined by 2 opposite corners of a rectangle (corner0 and corner2).
NOTE. Changing the details of the NinePatch after creating a NinePatchAppearance has no effect. You can think of NinePatch being data which helps create a NinePatchAppearance, but once it is created, the NinePatch is no longer needed.
Properties
The positions of two opposite corners in CoordinateSystem.local coordinates. Initially, these are determined by the NinePatch's data such that none of the patches are scaled. i.e. the drawn image will be exactly the same size as the original image (with no scaling).
In conjunction with corner2, this defines a rectangle in CoordinateSystem.local coordinates.
Most appearances are TintedAppearance, but checking if an appearance is a TintedAppearance can be onerous. This gives the illusion that all appearances have a tint. For those without a tint, the value will be Color.WHITE, and setting this value will do nothing.
When we draw, every pixel is multiplied by this tint
color. The default tint is fully-opaque white (1,1,1,1), therefore, the final image doesn't change color (or opacity).
Functions
Pose and Graphic return themselves. NinePatch returns a NinePatchAppearance.
Creates an Appearance with the same tint. Also, if the new appearances is StretchableAppearance then it will have the same bounds as the previous appearance.
Set the actor's appearance.
Given a point in local coordinates, is it within the bounding box of this Appearance?
The actor's transformation has already been applied to Backend (using Backend.transform). So we do NOT need to use Actor.position, Actor.scale or Actor.angleRadians.
Returns two corners of a bounding rectangle in local coordinates.
Returns a list of local points which describes the bounding polygon. local
means the points are unrelated to the Actor's position, angle or scale.