Android Guides | Samples

Android.Graphics.Drawables.Shapes.Shape Class

Defines a generic graphical "shape.

See Also: Shape

Syntax

[Android.Runtime.Register("android/graphics/drawable/shapes/Shape", DoNotGenerateAcw=true)]
public abstract class Shape : Object, ICloneable, IDisposable

Remarks

Defines a generic graphical "shape." Any Shape can be drawn to a Canvas with its own draw() method, but more graphical control is available if you instead pass it to a ShapeDrawable.

[Android Documentation]

Requirements

Namespace: Android.Graphics.Drawables.Shapes
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1

The members of Android.Graphics.Drawables.Shapes.Shape are listed below.

See Also: Object

Public Constructors

Protected Constructors

A constructor used when creating managed representations of JNI objects; called by the runtime.

Public Properties

[read-only]
HasAlphaBoolean. Checks whether the Shape is opaque.
[read-only]
HeightSingle. Returns the height of the Shape.
[read-only]
WidthSingle. Returns the width of the Shape.

Protected Properties

[read-only]
override
ThresholdClassIntPtr. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.
[read-only]
override
ThresholdTypeType. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Public Methods

Clone() : Shape
Creates and returns a copy of this Object.
abstract
Draw(Canvas, Paint)
Draw this shape into the provided Canvas, with the provided Paint.
GetOutline(Outline)
Compute the Outline of the shape and return it in the supplied Outline parameter.
Resize(Single, Single)
Resizes the dimensions of this shape.

Protected Methods

OnResize(Single, Single)
Callback method called when Shape.Resize(Single,Single) is executed.