SKPathEffect.CreateDash(Single[], Single) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates a dash path effect by specifying the dash intervals.
public static SkiaSharp.SKPathEffect CreateDash (float[] intervals, float phase);
Parameters
- intervals
- Single[]
The definition of the dash pattern via an even number of entries.
- phase
- Single
The offset into the intervals array. (mod the sum of all of the intervals).
Returns
Returns the new SKPathEffect, or null on error.
Remarks
The dash pattern is defined via an array containing an even number of entries (>=2), with the even indices specifying the length of "on" intervals, and the odd indices specifying the length of "off" intervals.
For example: if the intervals = new [] { 10, 20 } and the phase = 25, then the dash pattern will be: 5 pixels off, 10 pixels on, 20 pixels off, 10 pixels on, 20 pixels off, etc. A phase of -5, 25, 55, 85, etc. would all result in the same path, because the sum of all the intervals is 30.
Applies to
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應