AbstractCanvas<TState> Class

Definition

generic <typename TState>
 where TState : CanvasStatepublic ref class AbstractCanvas abstract : IDisposable, Microsoft::Maui::Graphics::ICanvas
public abstract class AbstractCanvas<TState> : IDisposable, Microsoft.Maui.Graphics.ICanvas where TState : CanvasState
type AbstractCanvas<'State (requires 'State :> CanvasState)> = class
    interface ICanvas
    interface IDisposable
Public MustInherit Class AbstractCanvas(Of TState)
Implements ICanvas, IDisposable

Type Parameters

TState
Inheritance
AbstractCanvas<TState>
Derived
Implements

Constructors

AbstractCanvas<TState>(ICanvasStateService<TState>, IStringSizeService)

Properties

Alpha
Antialias
AssignedStrokeLimit
BlendMode
CurrentState
DisplayScale
FillColor
Font
FontColor
FontSize
LimitStrokeScaling
LimitStrokeScalingEnabled
MiterLimit
PlatformStrokeSize
StrokeColor
StrokeDashOffset
StrokeDashPattern
StrokeLimit
StrokeLineCap
StrokeLineJoin
StrokeSize

Methods

ClipPath(PathF, WindingMode)
ClipRectangle(Single, Single, Single, Single)
ConcatenateTransform(Matrix3x2)
Dispose()
DrawArc(Single, Single, Single, Single, Single, Single, Boolean, Boolean)
DrawEllipse(Single, Single, Single, Single)
DrawImage(IImage, Single, Single, Single, Single)
DrawLine(Single, Single, Single, Single)
DrawPath(PathF)
DrawRectangle(Single, Single, Single, Single)
DrawRoundedRectangle(Single, Single, Single, Single, Single)
DrawString(String, Single, Single, HorizontalAlignment)
DrawString(String, Single, Single, Single, Single, HorizontalAlignment, VerticalAlignment, TextFlow, Single)
DrawText(IAttributedText, Single, Single, Single, Single)
FillArc(Single, Single, Single, Single, Single, Single, Boolean)
FillEllipse(Single, Single, Single, Single)
FillPath(PathF, WindingMode)
FillRectangle(Single, Single, Single, Single)
FillRoundedRectangle(Single, Single, Single, Single, Single)
GetStringSize(String, IFont, Single, HorizontalAlignment, VerticalAlignment)
GetStringSize(String, IFont, Single)
PlatformConcatenateTransform(Matrix3x2)
PlatformDrawArc(Single, Single, Single, Single, Single, Single, Boolean, Boolean)
PlatformDrawEllipse(Single, Single, Single, Single)
PlatformDrawLine(Single, Single, Single, Single)
PlatformDrawPath(PathF)
PlatformDrawRectangle(Single, Single, Single, Single)
PlatformDrawRoundedRectangle(Single, Single, Single, Single, Single)
PlatformRotate(Single, Single, Single, Single)
PlatformRotate(Single, Single)
PlatformScale(Single, Single)
PlatformSetStrokeDashPattern(Single[], Single, Single)
PlatformTranslate(Single, Single)
ResetState()
RestoreState()
Rotate(Single, Single, Single)
Rotate(Single)
SaveState()
Scale(Single, Single)
SetFillPaint(Paint, RectF)
SetShadow(SizeF, Single, Color)
StateRestored(TState)
SubtractFromClip(Single, Single, Single, Single)
Translate(Single, Single)

Extension Methods

ClipPath(ICanvas, PathF, WindingMode)
ClipRectangle(ICanvas, Rect)
ClipRectangle(ICanvas, RectF)
DrawArc(ICanvas, Rect, Single, Single, Boolean, Boolean)

Draws the arc. This is a helper method to draw an arc when you have a rectangle already defined for the ellipse bounds.

DrawArc(ICanvas, RectF, Single, Single, Boolean, Boolean)

Draws the arc. This is a helper method to draw an arc when you have a rectangle already defined for the ellipse bounds.

DrawCircle(ICanvas, Point, Double)
DrawCircle(ICanvas, PointF, Single)
DrawCircle(ICanvas, Single, Single, Single)
DrawEllipse(ICanvas, Rect)
DrawEllipse(ICanvas, RectF)
DrawLine(ICanvas, PointF, PointF)
DrawPath(ICanvas, PathF)
DrawRectangle(ICanvas, Rect)
DrawRectangle(ICanvas, RectF)
DrawRoundedRectangle(ICanvas, Rect, Double, Double, Double, Double)
DrawRoundedRectangle(ICanvas, Rect, Double)
DrawRoundedRectangle(ICanvas, RectF, Single, Single, Single, Single)
DrawRoundedRectangle(ICanvas, RectF, Single, Single)
DrawRoundedRectangle(ICanvas, RectF, Single)
DrawRoundedRectangle(ICanvas, Single, Single, Single, Single, Single, Single, Single, Single)
DrawString(ICanvas, String, Rect, HorizontalAlignment, VerticalAlignment, TextFlow, Single)
DrawString(ICanvas, String, RectF, HorizontalAlignment, VerticalAlignment, TextFlow, Single)
EnableDefaultShadow(ICanvas, Single)

Enables the default shadow.

FillArc(ICanvas, Rect, Single, Single, Boolean)

Fills the arc. This is a helper method to fill an arc when you have a rectangle already defined for the ellipse bounds.

FillArc(ICanvas, RectF, Single, Single, Boolean)

Fills the arc. This is a helper method to fill an arc when you have a rectangle already defined for the ellipse bounds.

FillArc(ICanvas, Single, Single, Single, Single, Single, Single, Paint, Boolean)

Fills the arc with the specified paint. This is a helper method for when filling an arc with a gradient, so that you don't need to worry about calculating the gradient handle locations based on the rectangle size and location.

FillCircle(ICanvas, Point, Double)
FillCircle(ICanvas, PointF, Single)
FillCircle(ICanvas, Single, Single, Single)
FillEllipse(ICanvas, Rect)
FillEllipse(ICanvas, RectF)
FillPath(ICanvas, PathF, WindingMode)
FillPath(ICanvas, PathF)
FillRectangle(ICanvas, Rect)
FillRectangle(ICanvas, RectF)
FillRoundedRectangle(ICanvas, Rect, Double, Double, Double, Double)
FillRoundedRectangle(ICanvas, Rect, Double)
FillRoundedRectangle(ICanvas, RectF, Single, Single, Single, Single)
FillRoundedRectangle(ICanvas, RectF, Single, Single)
FillRoundedRectangle(ICanvas, RectF, Single)
FillRoundedRectangle(ICanvas, Single, Single, Single, Single, Single, Single, Single, Single)
ResetStroke(ICanvas)

Resets the stroke to the default settings:

  • Stroke Size: 1
  • Stroke Dash Pattern: None
  • Stroke Location: Center
  • Stroke Line Join: Miter
  • Stroke Line Cap: Butt
  • Stroke Brush: None
  • Stroke Color: Black
SetFillPaint(ICanvas, Paint, Point, Point)
SetFillPaint(ICanvas, Paint, PointF, PointF)
SetFillPaint(ICanvas, Paint, Rect)
SetFillPaint(ICanvas, Paint, RectF)
SetFillPattern(ICanvas, IPattern, Color)
SetFillPattern(ICanvas, IPattern)
SubtractFromClip(ICanvas, Rect)
SubtractFromClip(ICanvas, RectF)
SetFillImage(ICanvas, IImage)

Applies to