public abstract class Tile
Base class for canvas tiles.

Constructors

Tile

#
protected Tile(TileKind kind)
kind (TileKind)

Fields

FrontFace

#
protected const int FrontFace = 0
The index of the front face, which shows the tile details.

Properties

BackFace

#
protected int BackFace { get; }
Gets the index of the back face currently being painted by DrawFaceB(Graphics, RectangleF, Color, Color).

Bounds

#
public RectangleF Bounds { get; set; }
Gets or sets the bounds for this tile. Please do not set this yourself... A tile may draw outside of its bounds during rotation.

Colour

#
public Color Colour { get; set; }
Gets the colour to be used for this tile.

Kind

#
public TileKind Kind { get; }
Gets the kind of this tile.

RotationAngle

#
protected float RotationAngle { get; }
Gets the progress of the current flip, from zero (old face flat) to one (new face flat).

Methods

BackFaceAt

#
protected virtual int BackFaceAt(PointF point)
Gets the index of the back face a point asks for. The default tile has a single back face.
point (PointF)

Click

#
public abstract void Click(Canvas canvas, DocumentBag bag, MouseEventArgs e)
canvas (Canvas)
bag (DocumentBag)
e (MouseEventArgs)

Draw

#
public void Draw(Context context)
context (Context)

DrawFaceA

#
protected abstract void DrawFaceA(Graphics graphics, RectangleF frame, Color back, Color fore)
graphics (Graphics)
frame (RectangleF)
back (Color)
fore (Color)

DrawFaceB

#
protected abstract void DrawFaceB(Graphics graphics, RectangleF frame, Color back, Color fore)
graphics (Graphics)
frame (RectangleF)
back (Color)
fore (Color)

HasBackFace

#
protected virtual bool HasBackFace(int face)
Gets whether a back face has anything to show. A tile does not turn towards an empty face.
face (int)

ShowTooltip

#
public abstract void ShowTooltip(PointF point)
point (PointF)