Share via


ScalingCanvas Class

Definition

A canvas implementation that applies scaling to drawing operations before delegating to a wrapped canvas.

public ref class ScalingCanvas : Microsoft::Maui::Graphics::IBlurrableCanvas, Microsoft::Maui::Graphics::ICanvas
public class ScalingCanvas : Microsoft.Maui.Graphics.IBlurrableCanvas, Microsoft.Maui.Graphics.ICanvas
type ScalingCanvas = class
    interface ICanvas
    interface IBlurrableCanvas
Public Class ScalingCanvas
Implements IBlurrableCanvas, ICanvas
Inheritance
ScalingCanvas
Implements

Constructors

ScalingCanvas(ICanvas)

Initializes a new instance of the ScalingCanvas class.

Properties

Alpha

Sets the opacity of am object.

Antialias

Sets a value that indicates whether to use anti-aliasing is enabled.

BlendMode

Sets the blend mode, which determines what happens when an object is rendered on top of an existing object.

DisplayScale

Gets or sets a value that represents the scaling factor to scale the UI by.

FillColor

Sets the color used to paint an object's interior.

Font

Sets the font used when drawing text.

FontColor

Sets the font color when drawing text.

FontSize

Sets the size of the font used when drawing text.

MiterLimit

Sets the limit of the miter length of line joins in an object.

ParentCanvas

Gets the parent canvas.

StrokeColor

Sets the Color used to paint an object's outline.

StrokeDashOffset

Sets the distance within the dash pattern where a dash begins.

StrokeDashPattern

Sets the pattern of dashes and gaps that are used to outline an object.

StrokeLineCap

Sets the shape at the start and end of a line.

StrokeLineJoin

Sets the type of join used at the vertices of a shape.

StrokeSize

Sets the width of the stroke used to draw an object's outline.

Wrapped

Gets the wrapped canvas instance.

Methods

ClipPath(PathF, WindingMode)
ClipRectangle(Single, Single, Single, Single)
ConcatenateTransform(Matrix3x2)
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)
GetScale()
GetStringSize(String, IFont, Single, HorizontalAlignment, VerticalAlignment)
GetStringSize(String, IFont, Single)
ResetState()
RestoreState()
Rotate(Single, Single, Single)
Rotate(Single)
SaveState()
Scale(Single, Single)
SetBlur(Single)
SetFillPaint(Paint, RectF)
SetShadow(SizeF, Single, Color)
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)

Draws a line between two points.

DrawPath(ICanvas, PathF)
DrawRectangle(ICanvas, Rect)

Draws the outline of a rectangle.

DrawRectangle(ICanvas, RectF)

Draws the outline of a rectangle.

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)

Fills a rectangle with the current brush.

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