SKCanvas 類別

定義

封裝了所有關於繪製到裝置(點陣圖或表面)的狀態。

public class SKCanvas : SkiaSharp.SKObject
繼承
衍生

範例

var info = new SKImageInfo(640, 480);
using (var surface = SKSurface.Create(info)) {
    SKCanvas canvas = surface.Canvas;

    canvas.Clear(SKColors.White);

    // set up drawing tools
    var paint = new SKPaint {
        IsAntialias = true,
        Color = new SKColor(0x2c, 0x3e, 0x50),
        StrokeCap = SKStrokeCap.Round
    };

    // create the Xamagon path
    var path = new SKPath();
    path.MoveTo(71.4311121f, 56f);
    path.CubicTo(68.6763107f, 56.0058575f, 65.9796704f, 57.5737917f, 64.5928855f, 59.965729f);
    path.LineTo(43.0238921f, 97.5342563f);
    path.CubicTo(41.6587026f, 99.9325978f, 41.6587026f, 103.067402f, 43.0238921f, 105.465744f);
    path.LineTo(64.5928855f, 143.034271f);
    path.CubicTo(65.9798162f, 145.426228f, 68.6763107f, 146.994582f, 71.4311121f, 147f);
    path.LineTo(114.568946f, 147f);
    path.CubicTo(117.323748f, 146.994143f, 120.020241f, 145.426228f, 121.407172f, 143.034271f);
    path.LineTo(142.976161f, 105.465744f);
    path.CubicTo(144.34135f, 103.067402f, 144.341209f, 99.9325978f, 142.976161f, 97.5342563f);
    path.LineTo(121.407172f, 59.965729f);
    path.CubicTo(120.020241f, 57.5737917f, 117.323748f, 56.0054182f, 114.568946f, 56f);
    path.LineTo(71.4311121f, 56f);
    path.Close();

    // draw the Xamagon path
    canvas.DrawPath(path, paint);
}

備註

畫布封裝了所有關於繪製到裝置(點陣圖或曲面)的狀態。

這包括對裝置本身的參考,以及一堆矩陣/剪輯值。 對於任何給定的繪圖呼叫(例如 DrawRect),被繪製物件的幾何體會透過堆疊中所有矩陣的串接而轉換。 轉換後的幾何體會被堆疊中所有剪裁的交叉點所裁剪。

畫布保存繪圖裝置的狀態,而被繪製物件的狀態(風格)則由顏料持有,顏料作為每種「繪製」方法的參數。 Paint 會儲存顏色、字體、文字大小、筆劃寬度、著色器(例如漸層、圖案)等屬性。

當進入 SKSurface.Canvas 某個表面的屬性時,畫布會被返回。

建築

SkiaSharp 有多個後端,這些後端可接收 SKCanvas 繪製指令,包括:

  • 光柵 Surface
  • GPU Surface
  • PDF 文件
  • XPS 文件 (實驗性)
  • SVG Canvas (實驗性)
  • 圖片
  • Null Canvas (用於測試)

構建光柵 Surface

光柵後端會繪製到一個記憶體區塊。 這些記憶體可由 SkiaSharp 或用戶端管理。

為 Raster 和 Ganesh 後端建立畫布的推薦方法是使用 SKSurface一個物件,這是一個管理畫布指令被繪製到記憶體中的物件。

// define the surface properties
var info = new SKImageInfo(256, 256);

// construct a new surface
var surface = SKSurface.Create(info);

// get the canvas from the surface
var canvas = surface.Canvas;

// draw on the canvas ...

或者,我們也可以明確指定 Surface 的記憶體,而不是請 SkiaSharp 來管理。

// define the surface properties
var info = new SKImageInfo(256, 256);

// allocate memory
var memory = Marshal.AllocCoTaskMem(info.BytesSize);

// construct a surface around the existing memory
var surface = SKSurface.Create(info, memory, info.RowBytes);

// get the canvas from the surface
var canvas = surface.Canvas;

// draw on the canvas ...

建構 GPU Surface

GPU 表面必須有一個 GRContext 物件來管理 GPU 上下文,以及相關的材質和字型快取。

GRContext 物件會與 OpenGL 上下文或 Vulkan 裝置一一匹配。 也就是說,所有 SKSurface 將被渲染成相同 OpenGL 情境或 Vulkan 裝置的實例,都應該共享一個 GRContext.

SkiaSharp 不會幫你建立 OpenGL 情境或 Vulkan 裝置。 在 OpenGL 模式下,當 SkiaSharp 呼叫時,也假設正確的 OpenGL 上下文已與當前執行緒保持最新。

// an OpenGL context must be created and set as current

// define the surface properties
var info = new SKImageInfo(256, 256);

// create the surface
var context = GRContext.CreateGl();
var surface = SKSurface.Create(context, false, info);

// get the canvas from the surface
var canvas = surface.Canvas;

// draw on the canvas ...

建構 PDF 文件

PDF 後端使用 SKDocumentSKSurface,因為文件必須包含多個頁面。

// create the document
var stream = SKFileWStream.OpenStream("document.pdf");
var document = SKDocument.CreatePdf(stream);

// get the canvas from the page
var canvas = document.BeginPage(256, 256);

// draw on the canvas ...

// end the page and document
document.EndPage();
document.Close();

建構 XPS 文件 (實驗性)

XPS 後端使用 SKDocumentSKSurface,因為文件必須包含多個頁面。

// create the document
var stream = SKFileWStream.OpenStream("document.xps");
var document = SKDocument.CreateXps(stream);

// get the canvas from the page
var canvas = document.BeginPage(256, 256);

// draw on the canvas ...

// end the page and document
document.EndPage();
document.Close();

構建 SVG 畫布 (實驗性)

SVG 後端使用 SKSvgCanvas.

// create the canvas
var stream = SKFileWStream.OpenStream("image.svg");
var writer = new SKXmlStreamWriter(stream);
var canvas = SKSvgCanvas.Create(SKRect.Create(256, 256), writer);

// draw on the canvas ...

構建畫面

XPS 後端使用 SKPictureRecorderSKSurface。

// create the picture recorder
var recorder = new SKPictureRecorder();

// get the canvas from the page
var canvas = recorder.BeginRecording(SKRect.Create(256, 256));

// draw on the canvas ...

// finish recording
var picture = recorder.EndRecording();

構建一個虛無畫布 (用於測試)

空畫布是一個忽略所有繪圖指令且不做任何動作的畫布。

// create the dummy canvas
var canvas = new SKNoDrawCanvas(256, 256);

// draw on the canvas ...

Transformations

畫布支援多種 2D 變換。 與其他 2D 圖形系統如 CoreGraphics 或 Cairo 不同,SKCanvas 將轉換擴展至包含透視功能。

你可以使用 Scale、 Skew、 Translate、 RotateDegrees來 RotateRadians 執行一些最常見的二維變換。

為了更精確的控制,你可以用 和 SetMatrix 來設定任意轉換SKMatrixConcat,將轉換串接SKMatrix到目前使用的矩陣。

可用來 ResetMatrix 重置矩陣的狀態。

繪圖

繪圖操作可以設定 SKPaint 參數來影響繪圖。 你用 SKPaint 物件來快取樣式和顏色資訊,來繪製幾何體、文字和點陣圖。

剪裁與狀態

你可以透過呼叫 Save 保持電流轉換矩陣的方法來保存電流變換,然後你可以透過 Restore or RestoreToCount 方法修改矩陣並恢復先前狀態。

此外,也可以推送一個新狀態 SaveLayer ,將區域的螢幕外複製,繪圖完成後,呼叫 Restore() 將螢幕外點陣圖複製到畫布上的方法。

建構函式

名稱 Description
SKCanvas(SKBitmap)

建立一個畫布,裡面有指定的點陣圖來繪製。

屬性

名稱 Description
Context

取得與此畫布相關的 GPU 錄影上下文。

DeviceClipBounds

取得目前剪輯的邊界(以裝置座標表示)。

Handle

取得或設定 handle 為底層的原生物件。

(繼承來源 SKObject)
IgnorePublicDispose

獲得一個值,表示該呼叫 Dispose() 是否應該 no-op。

(繼承來源 SKNativeObject)
IsClipEmpty

會得到一個值,表示目前的片段是否是空的。

IsClipRect

會得到一個值,表示目前的剪輯是否是長方形。

IsDisposed

會獲得一個值,表示該物件是否已被處置。

(繼承來源 SKNativeObject)
LocalClipBounds

取得當前剪輯的邊界(以當地座標計算)。

OwnsHandle

取得或設定一個值,指示該物件是否擁有其句柄,並在處理時應銷毀原生物件。

(繼承來源 SKNativeObject)
SaveCount

取得畫布私有堆疊上的矩陣/剪輯狀態數量。

Surface

取得與此畫布相關的表面。

TotalMatrix

取得畫布上目前的矩陣。

TotalMatrix44

取得畫布上目前的 4x4 變換矩陣。

方法

名稱 Description
Clear()

將畫布目前剪輯中的所有像素替換成該 Empty 顏色。

Clear(SKColor)

將畫布目前剪輯中所有像素替換為指定顏色。

Clear(SKColorF)

用指定的顏色填滿整個畫布。

ClipPath(SKPath, SKClipOperation, Boolean)

用指定的路徑修改目前的剪輯。

ClipRect(SKRect, SKClipOperation, Boolean)

用指定的矩形修改目前的剪輯。

ClipRegion(SKRegion, SKClipOperation)

修改當前片段並指定區域。

ClipRoundRect(SKRoundRect, SKClipOperation, Boolean)

用指定的圓角矩形修改目前的剪輯。

Concat(SKMatrix)

將提供的轉換矩陣與電流轉換矩陣預先連接。

Concat(SKMatrix44)

將當前矩陣與指定的 4x4 矩陣預先連接。

Discard()

這會讓畫布內容變得無法定義。

Dispose()

釋放所有被使用。SKNativeObject

(繼承來源 SKNativeObject)
Dispose(Boolean)

釋放 未管理的資源, SKCanvas 並可選擇性地釋放受管理資源。

DisposeInternal()

觸發 一個 處置,忽略 的 IgnorePublicDispose值。

(繼承來源 SKNativeObject)
DisposeManaged()

由派生 SKObject 型別實作以銷毀任何受管理物件。

(繼承來源 SKObject)
DisposeNative()

由派生 SKObject 型別實作,用來銷毀任何原生物件。

DisposeUnownedManaged()

由派生 SKObject 型別實作,用來丟棄本實例不擁有的受管理物件。

(繼承來源 SKObject)
DrawAnnotation(SKRect, String, SKData)

把鍵值對「註解」傳送到畫布。

DrawArc(SKRect, Single, Single, Boolean, SKPaint)

在畫布上畫出弧線。

DrawAtlas(SKImage, SKRect[], SKRotationScaleMatrix[], SKColor[], SKBlendMode, SKPaint)
已淘汰.

從圖集影像中繪製一組精靈,並進行色彩混合。

DrawAtlas(SKImage, SKRect[], SKRotationScaleMatrix[], SKColor[], SKBlendMode, SKRect, SKPaint)
已淘汰.

從圖集影像中繪製一組精靈,並支援剔除。

DrawAtlas(SKImage, SKRect[], SKRotationScaleMatrix[], SKColor[], SKBlendMode, SKSamplingOptions, SKPaint)

從圖集圖像中繪製一組精靈,並進行取樣與色彩混合。

DrawAtlas(SKImage, SKRect[], SKRotationScaleMatrix[], SKColor[], SKBlendMode, SKSamplingOptions, SKRect, SKPaint)

從圖集影像中繪製一組精靈,包含所有選項。

DrawAtlas(SKImage, SKRect[], SKRotationScaleMatrix[], SKPaint)
已淘汰.

從圖集圖片中繪製一組精靈,並帶有變換。

DrawAtlas(SKImage, SKRect[], SKRotationScaleMatrix[], SKSamplingOptions, SKPaint)

從圖集影像中繪製一組精靈,並有變換和取樣選項。

DrawBitmap(SKBitmap, Single, Single, SKPaint)
已淘汰.

在畫布上畫出點陣圖。

DrawBitmap(SKBitmap, Single, Single, SKSamplingOptions, SKPaint)

利用給定的取樣選項和繪圖,在指定座標繪製點陣圖。

DrawBitmap(SKBitmap, SKPoint, SKPaint)
已淘汰.

在畫布上畫出點陣圖。

DrawBitmap(SKBitmap, SKPoint, SKSamplingOptions, SKPaint)

利用給定的取樣選項和繪圖在指定位置繪製點陣圖。

DrawBitmap(SKBitmap, SKRect, SKPaint)
已淘汰.

在畫布上畫出點陣圖。

DrawBitmap(SKBitmap, SKRect, SKRect, SKPaint)
已淘汰.

在畫布上畫出點陣圖。

DrawBitmap(SKBitmap, SKRect, SKRect, SKSamplingOptions, SKPaint)

利用給定的取樣選項,將指定位圖的一部分繪製到目標矩形中。

DrawBitmap(SKBitmap, SKRect, SKSamplingOptions, SKPaint)

利用給定的取樣選項將指定的位圖繪製到目的地矩形中。

DrawBitmapLattice(SKBitmap, Int32[], Int32[], SKRect, SKFilterMode, SKPaint)

使用格點縮放繪製,並帶有明確的除法與濾波模式。

DrawBitmapLattice(SKBitmap, Int32[], Int32[], SKRect, SKPaint)

繪製點陣圖,並以不同方式拉伸或縮小,以符合目的地矩形。

DrawBitmapLattice(SKBitmap, SKLattice, SKRect, SKFilterMode, SKPaint)

利用格點(九片)縮放並使用指定的濾波器模式繪製位圖。

DrawBitmapLattice(SKBitmap, SKLattice, SKRect, SKPaint)

繪製點陣圖,並以不同方式拉伸或縮小,以符合目的地矩形。

DrawBitmapNinePatch(SKBitmap, SKRectI, SKRect, SKFilterMode, SKPaint)

使用指定的濾波器模式,使用九個音色尺度繪製點陣圖。

DrawBitmapNinePatch(SKBitmap, SKRectI, SKRect, SKPaint)

繪製點陣圖,並以不同方式拉伸或縮小,以符合目的地矩形。

DrawCircle(Single, Single, Single, SKPaint)

在畫布上畫了一個圓圈。

DrawCircle(SKPoint, Single, SKPaint)

在畫布上畫了一個圓圈。

DrawColor(SKColor, SKBlendMode)

使用指定的色彩與混合模式,將當前的裁剪區域填滿指定的顏色。

DrawColor(SKColorF, SKBlendMode)

使用混合模式將整個畫布填滿指定的顏色。

DrawDrawable(SKDrawable, Single, Single)

在畫布上畫一個可繪製的圖畫。

DrawDrawable(SKDrawable, SKMatrix)

在畫布上畫一個可繪製的圖畫。

DrawDrawable(SKDrawable, SKPoint)

在畫布上畫一個可繪製的圖畫。

DrawImage(SKImage, Single, Single, SKPaint)
已淘汰.

在畫布上畫出一幅圖像。

DrawImage(SKImage, Single, Single, SKSamplingOptions, SKPaint)

在指定座標繪製影像並提供取樣選項。

DrawImage(SKImage, SKPoint, SKPaint)
已淘汰.

在畫布上畫出一幅圖像。

DrawImage(SKImage, SKPoint, SKSamplingOptions, SKPaint)

在指定點繪製圖像,並提供取樣選項。

DrawImage(SKImage, SKRect, SKPaint)
已淘汰.

在畫布上畫出一幅圖像。

DrawImage(SKImage, SKRect, SKRect, SKPaint)
已淘汰.

在畫布上畫出一幅圖像。

DrawImage(SKImage, SKRect, SKRect, SKSamplingOptions, SKPaint)

繪製一段縮放成目標矩形的影像,並提供取樣選項。

DrawImage(SKImage, SKRect, SKSamplingOptions, SKPaint)

繪製一張縮放成符合目標矩形的影像,並提供取樣選項。

DrawImageLattice(SKImage, Int32[], Int32[], SKRect, SKFilterMode, SKPaint)

使用格點縮放繪製圖像,並有明確的除法與濾波模式。

DrawImageLattice(SKImage, Int32[], Int32[], SKRect, SKPaint)

繪製圖像,經過不同拉伸或縮小以符合目標矩形。

DrawImageLattice(SKImage, SKLattice, SKRect, SKFilterMode, SKPaint)

使用格點(九片)縮放並使用指定的濾波器模式繪製影像。

DrawImageLattice(SKImage, SKLattice, SKRect, SKPaint)

繪製圖像,經過不同拉伸或縮小以符合目標矩形。

DrawImageNinePatch(SKImage, SKRectI, SKRect, SKFilterMode, SKPaint)

使用指定的濾波器模式,使用九片縮放繪製圖像。

DrawImageNinePatch(SKImage, SKRectI, SKRect, SKPaint)

繪製圖像,經過不同拉伸或縮小以符合目標矩形。

DrawLine(Single, Single, Single, Single, SKPaint)

在畫布上劃出一條線。

DrawLine(SKPoint, SKPoint, SKPaint)

在畫布上劃出一條線。

DrawLinkDestinationAnnotation(SKRect, SKData)

透過將指定的矩形連結到指定目的地來註解畫布(參見 DrawNamedDestinationAnnotation(SKPoint, SKData))。

DrawLinkDestinationAnnotation(SKRect, String)

透過將指定的矩形連結到指定目的地來註解畫布(參見 DrawNamedDestinationAnnotation(SKPoint, String))。

DrawNamedDestinationAnnotation(SKPoint, SKData)

透過將名稱與指定點關聯來註解畫布(參見 DrawLinkDestinationAnnotation(SKRect, SKData))。

DrawNamedDestinationAnnotation(SKPoint, String)

透過將名稱與指定點關聯來註解畫布(參見 DrawLinkDestinationAnnotation(SKRect, String))。

DrawOval(Single, Single, Single, Single, SKPaint)

在畫布上畫了一個橢圓形。

DrawOval(SKPoint, SKSize, SKPaint)

在畫布上畫了一個橢圓形。

DrawOval(SKRect, SKPaint)

在畫布上畫了一個橢圓形。

DrawPaint(SKPaint)

會用指定的塗裝填滿目前的裁剪路徑。

DrawPatch(SKPoint[], SKColor[], SKPoint[], SKBlendMode, SKPaint)

用指定的混合模式在畫布上畫一個浣熊斑塊。

DrawPatch(SKPoint[], SKColor[], SKPoint[], SKPaint)

在畫布上畫了一個浣熊斑。

DrawPath(SKPath, SKPaint)

在畫布上畫出一條路徑。

DrawPicture(SKPicture, Single, Single, SKPaint)

在畫布上畫了一幅畫。

DrawPicture(SKPicture, SKMatrix, SKPaint)

在畫布上畫了一幅畫。

DrawPicture(SKPicture, SKPaint)

在畫布上畫了一幅畫。

DrawPicture(SKPicture, SKPoint, SKPaint)

在畫布上畫了一幅畫。

DrawPoint(Single, Single, SKColor)

在畫布上畫出指定顏色的點。

DrawPoint(Single, Single, SKPaint)

在畫布上畫出指定顏色的點。

DrawPoint(SKPoint, SKColor)

在畫布上畫出指定顏色的點。

DrawPoint(SKPoint, SKPaint)

在畫布上畫出指定顏色的點。

DrawPoints(SKPointMode, SKPoint[], SKPaint)

一次繪製一個點、線條或多邊形陣列。

DrawRect(Single, Single, Single, Single, SKPaint)

在畫布上畫一個長方形。

DrawRect(SKRect, SKPaint)

在畫布上畫一個長方形。

DrawRegion(SKRegion, SKPaint)

使用指定的油漆繪製指定區域的輪廓。

DrawRoundRect(Single, Single, Single, Single, Single, Single, SKPaint)

在畫布上畫一個圓角矩形。

DrawRoundRect(SKRect, Single, Single, SKPaint)

在畫布上畫一個圓角矩形。

DrawRoundRect(SKRect, SKSize, SKPaint)

在畫布上畫一個圓角矩形。

DrawRoundRect(SKRoundRect, SKPaint)

在畫布上畫一個圓角矩形。

DrawRoundRectDifference(SKRoundRect, SKRoundRect, SKPaint)

繪製兩個圓角矩形之間的區域。

DrawSurface(SKSurface, Single, Single, SKPaint)

在畫布上畫一個表面。

DrawSurface(SKSurface, Single, Single, SKSamplingOptions, SKPaint)

利用給定的取樣選項,將指定的表面繪製到畫布上。

DrawSurface(SKSurface, SKPoint, SKPaint)

在畫布上畫一個表面。

DrawSurface(SKSurface, SKPoint, SKSamplingOptions, SKPaint)

利用給定的取樣選項,將指定的曲面繪製到給定點的畫布上。

DrawText(SKTextBlob, Single, Single, SKPaint)

在指定的座標畫布上畫出一個文字斑點。

DrawText(String, Single, Single, SKFont, SKPaint)
已淘汰.

使用字型與繪畫在指定座標繪製指定的文字。

DrawText(String, Single, Single, SKTextAlign, SKFont, SKPaint)

使用字型與繪畫,繪製指定的文字,並圍繞給定座標排列。

DrawText(String, SKPoint, SKFont, SKPaint)
已淘汰.

使用字型和繪畫在指定點繪製指定的文字。

DrawText(String, SKPoint, SKTextAlign, SKFont, SKPaint)

使用字型與繪畫,繪製指定文字並圍繞該點對齊。

DrawTextOnPath(String, SKPath, Single, Single, SKFont, SKPaint)
已淘汰.

沿著帶有水平與垂直偏移的路徑繪製文字。

DrawTextOnPath(String, SKPath, Single, Single, SKTextAlign, SKFont, SKPaint)

沿著帶有偏移和對齊的路徑繪製文字。

DrawTextOnPath(String, SKPath, SKPoint, Boolean, SKFont, SKPaint)
已淘汰.

沿路徑繪製文字,並可選擇字形扭曲,使用指定字型。

DrawTextOnPath(String, SKPath, SKPoint, Boolean, SKTextAlign, SKFont, SKPaint)

沿著路徑繪製文字,並可選地進行對齊及字形扭曲。

DrawTextOnPath(String, SKPath, SKPoint, SKFont, SKPaint)
已淘汰.

使用指定的字型沿著路徑繪製文字。

DrawTextOnPath(String, SKPath, SKPoint, SKTextAlign, SKFont, SKPaint)

使用指定的字型沿著路徑繪製文字並對齊。

DrawUrlAnnotation(SKRect, SKData)

透過將指定的 URL 與指定的矩形(以當地座標)關聯來註解畫布。

DrawUrlAnnotation(SKRect, String)

透過將指定的 URL 與指定的矩形(以當地座標)關聯來註解畫布。

DrawVertices(SKVertexMode, SKPoint[], SKColor[], SKPaint)

繪製一個頂點陣列,根據模式將頂點解讀為三角形。

DrawVertices(SKVertexMode, SKPoint[], SKPoint[], SKColor[], SKBlendMode, UInt16[], SKPaint)

繪製一個頂點陣列,根據模式將頂點解讀為三角形。

DrawVertices(SKVertexMode, SKPoint[], SKPoint[], SKColor[], SKPaint)

繪製一個頂點陣列,根據模式將頂點解讀為三角形。

DrawVertices(SKVertexMode, SKPoint[], SKPoint[], SKColor[], UInt16[], SKPaint)

繪製一個頂點陣列,根據模式將頂點解讀為三角形。

DrawVertices(SKVertices, SKBlendMode, SKPaint)

繪製一組頂點。

Flush()

觸發所有待處理的繪製操作立即執行。

GetDeviceClipBounds(SKRectI)

回傳目前剪輯的邊界(以裝置座標表示)。

GetLocalClipBounds(SKRect)

回傳目前剪輯的邊界(以當地座標計算)。

QuickReject(SKPath)

檢查指定的路徑在被當前矩陣轉換後,是否會完全位於當前剪輯之外。

QuickReject(SKRect)

檢查指定的矩形在被當前矩陣轉換後,是否會完全位於當前剪輯之外。

ResetMatrix()

將當前矩陣設定為單位元。

Restore()

恢復畫布狀態。

RestoreToCount(Int32)

有效率地將國家恢復到特定層級。

RotateDegrees(Single, Single, Single)

預先將當前矩陣與指定的旋轉連結,繞著指定點進行。

RotateDegrees(Single)

預先將當前矩陣與指定的旋轉連結起來。

RotateRadians(Single, Single, Single)

預先將當前矩陣與指定的旋轉連結,繞著指定點進行。

RotateRadians(Single)

預先將當前矩陣與指定的旋轉連結起來。

Save()

這樣可以拯救畫布狀態。

SaveLayer()

儲存目前的矩陣和剪輯,並分配一個螢幕外緩衝區供後續繪製。

SaveLayer(SKCanvasSaveLayerRec)

儲存目前的矩陣和剪輯,並依指定參數分配螢幕外緩衝區。

SaveLayer(SKPaint)

儲存畫布狀態並分配螢幕外的點陣圖。

SaveLayer(SKRect, SKPaint)

儲存畫布狀態並分配螢幕外的點陣圖。

Scale(Single, Single, Single, Single)

預接當前矩陣與指定刻度,並以特定偏移量連接。

Scale(Single, Single)

將當前矩陣與指定的刻度預先串接。

Scale(Single)

將當前矩陣與指定的刻度預先串接。

Scale(SKPoint)

將當前矩陣與指定的刻度預先串接。

SetMatrix(SKMatrix)

將當前矩陣替換為指定矩陣的副本。

SetMatrix(SKMatrix44)

將當前矩陣替換為指定的 4x4 矩陣副本。

Skew(Single, Single)

預先將當前矩陣與指定的偏斜連接起來。

Skew(SKPoint)

預先將當前矩陣與指定的偏斜連接起來。

Translate(Single, Single)

預先將當前矩陣與指定的平移連接起來。

Translate(SKPoint)

預先將當前矩陣與指定的平移連接起來。

適用於