Method DrawFocusRect
DrawFocusRect(SKCanvas, SKRect, SKColor, float, float, float, float, bool, bool)
Draws a focus-like dashed rectangle (similar to WinForms DrawFocusRectangle). Uses CreateFocusRectPaint internally.
public static void DrawFocusRect(SKCanvas canvas, SKRect rect, SKColor color, float strokeWidth = 1, float dashOn = 1, float gap = 1, float phase = 0, bool useXorBlend = true, bool antialiasing = false)
Parameters
canvasSKCanvasTarget canvas (must not be null).
rectSKRectRectangle in canvas coordinates.
colorSKColorPrimary color used for the stroke (when xor==true, result depends on blend and background).
strokeWidthfloatStroke width in canvas units (use 1 for a typical hairline).
dashOnfloatDash "on" length (small value produces dot-like strokes, e.g. 1).
gapfloatDash "off" length (space between dots).
phasefloatDash phase offset (use to create marching-ants animation).
useXorBlendboolIf true, sets paint.BlendMode = SKBlendMode.Xor to try to mimic GDI+ XOR drawing (backend dependent).
antialiasingboolWhether to enable antialiasing for the paint.
DrawFocusRect(SKCanvas, SKRect, SKColor)
Draws a focus rectangle on the specified canvas using the given color. FocusRectPaint is used to draw the rectangle.
public static void DrawFocusRect(SKCanvas canvas, SKRect rect, SKColor color)