Package-level declarations
Properties
Returns the color space encoded in the specified color long.
Indicates whether the color is in a wide-gamut color space.
Returns the relative luminance of a color int, assuming sRGB encoding. Based on the formula for relative luminance defined in WCAG 2.0, W3C Recommendation 11 December 2008.
Returns the relative luminance of a color. Based on the formula for relative luminance defined in WCAG 2.0, W3C Recommendation 11 December 2008.
Functions
Returns the intersection of two paths as a new Path. If the paths do not intersect, returns an empty path.
Returns the intersection of two rectangles as a new rectangle. If the rectangles do not intersect, returns a copy of the left hand side rectangle.
Return the intersection of this region and the specified Rect as a new region.
Return the intersection of this region and the specified region as a new region.
Returns the first component of the color. For instance, when the color model of the color is android.graphics.ColorSpace.Model.RGB, the first component is "red".
Returns the x coordinate of this point.
Returns "left", the first component of the rectangle.
Return the alpha component of a color int. This is equivalent to calling:
Returns the second component of the color. For instance, when the color model of the color is android.graphics.ColorSpace.Model.RGB, the second component is "green".
Returns the y coordinate of this point.
Returns "top", the second component of the rectangle.
Return the red component of a color int. This is equivalent to calling:
Returns the third component of the color. For instance, when the color model of the color is android.graphics.ColorSpace.Model.RGB, the third component is "blue". = * This method allows to use destructuring declarations when working with colors, for example:
Returns "right", the third component of the rectangle.
Return the green component of a color int. This is equivalent to calling:
Returns the third component of the color. For instance, when the color model of the color is android.graphics.ColorSpace.Model.RGB, the third component is "blue".
Returns the fourth component of the color. For instance, when the color model of the color is android.graphics.ColorSpace.Model.RGB, the fourth component is "alpha".
Returns "bottom", the fourth component of the rectangle.
Return the blue component of a color int. This is equivalent to calling:
Returns true if the specified point is inside the bitmap. A point is contained if: 0 <= x < width and 0 <= y < height. An empty bitmap never contains any point.
Returns true if the specified point is inside the rectangle. The left and top are considered to be inside, while the right and bottom are not. This means that for a point to be contained: left <= x < right and top <= y < bottom. An empty rectangle never contains any point.
Return true if the region contains the specified Point.
Converts the color receiver to a color in the specified color space. This is equivalent to calling:
Converts the color int receiver to a color long in the specified color space. This is equivalent to calling:
Converts the color long receiver to a color long in the specified color space. This is equivalent to calling:
Returns a mutable bitmap with the specified width and height. A config can be optionally specified. If not, the default config is Bitmap.Config.ARGB_8888.
Returns a mutable bitmap with the specified width and height. The config, transparency and color space can optionally be specified. They respectively default to Bitmap.Config.ARGB_8888, true
and sRGB.
Create a Bitmap from a Source
Create a Drawable from a Source
Flattens (or approximate) the Path with a series of line segments.
Returns the difference of two paths as a new Path.
Offsets this point by the negation of the specified point and returns the result as a new point.
Offsets this point by the negation of the specified amount on both X and Y axis and returns the result as a new point.
Returns a new rectangle representing this rectangle offset by the negation of the specified point.
Returns the difference of this rectangle and the specified rectangle as a new region.
Returns a new rectangle representing this rectangle offset by the negation of the specified amount on both X and Y axis.
Returns the difference of this rectangle and the specified rectangle as a new region. This rectangle is first converted to a Rect using RectF.toRect.
Return the difference of this region and the specified Rect as a new region.
Return the difference of this region and the specified region as a new region.
Composites two translucent colors together. More specifically, adds two colors using the source over blending mode. The colors must not be pre-multiplied and the result is a non pre-multiplied color.
Returns the union of two paths as a new Path.
Offsets this point by the specified point and returns the result as a new point.
Offsets this point by the specified amount on both X and Y axis and returns the result as a new point.
Returns a new rectangle representing this rectangle offset by the specified point.
Performs the union of this rectangle and the specified rectangle and returns the result as a new rectangle.
Returns a new rectangle representing this rectangle offset by the specified amount on both X and Y axis.
Return the union of this region and the specified Rect as a new region.
Return the union of this region and the specified region as a new region.
Convenience method to configure the BlendMode of a Paint in a backward compatible way. This method is a no-op for BlendModes that have no equivalent on older API levels
Creates a new Color instance from a color long.
Creates a new PorterDuffColorFilter that uses this PorterDuff.Mode as the alpha compositing or blending mode, and the specified color.
Converts the specified color long to an ARGB color int.
Converts the specified ARGB color int to an RGBA color long in the sRGB color space.
Creates a new PorterDuffXfermode that uses this PorterDuff.Mode as the alpha compositing or blending mode.
Returns a new point representing the negation of this point.
Returns the negation of this region as a new region.
Returns the 9 values of this Matrix as a new array of floats.
Wrap the specified block in calls to Canvas.save/Canvas.clipPath and Canvas.restoreToCount.
Wrap the specified block in calls to Canvas.save/Canvas.clipRect and Canvas.restoreToCount.
Wrap the specified block in calls to Canvas.save/Canvas.concat and Canvas.restoreToCount.
Wrap the specified block in calls to Canvas.save/Canvas.rotate and Canvas.restoreToCount.
Wrap the specified block in calls to Canvas.save and Canvas.restoreToCount.
Wrap the specified block in calls to Canvas.save/Canvas.scale and Canvas.restoreToCount.
Wrap the specified block in calls to Canvas.save/Canvas.skew and Canvas.restoreToCount.
Wrap the specified block in calls to Canvas.save/Canvas.translate and Canvas.restoreToCount.
Returns the union minus the intersection of two paths as a new Path.
Returns the union minus the intersection of two rectangles as a new region.
Returns the union minus the intersection of two rectangles as a new region. The two rectangles are first converted to Rect using RectF.toRect.
Return the union minus the intersection of this region and the specified Rect as a new region.
Return the union minus the intersection of this region and the specified region as a new region.