MeshSpecification 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
負責保存建立規格的 Mesh
類別。
[Android.Runtime.Register("android/graphics/MeshSpecification", ApiSince=34, DoNotGenerateAcw=true)]
public class MeshSpecification : Java.Lang.Object
[<Android.Runtime.Register("android/graphics/MeshSpecification", ApiSince=34, DoNotGenerateAcw=true)>]
type MeshSpecification = class
inherit Object
- 繼承
- 屬性
備註
負責保存建立規格的 Mesh
類別。 這個類別會 MeshSpecification
透過 MeshSpecification#make(Attribute[], int, Varying[], String, String)
方法產生 ,其中會提供多個參數來設定網格,包括屬性、頂點步幅和 Varying
頂點/片段著色器。 另外還有其他方法可提供選擇性 ColorSpace
和 Alpha 類型。
例如,利用 Varying
的頂點著色器看起來可能如下所示:
Varyings main(const Attributes attributes) {
Varyings varyings;
varyings.position = attributes.position;
return varyings;
}
可能取用不同外觀的對應片段著色器,如下所示:
float2 main(const Varyings varyings, out float4 color) {
color = vec4(1.0, 0.0, 0.0, 1.0);
return varyings.position;
}
從這個片段著色器傳回的色彩會與 Paint 物件上設定的其他參數混合(例如。 Paint#setBlendMode(BlendMode)
用來繪製網格。
在片段著色器中傳回的位置,可由著色器鏈結中任何下列片段著色器取用。
如需 Android 圖形著色器語言的詳細資訊,請參閱 https://developer.android.com/develop/ui/views/graphics/agsl 。
請注意,各種網格規格有數個限制:1。 允許的屬性數量上限為8。 2. 位移對齊長度為 4 個字節。 2. 最大步幅長度為 1024。 3. 變化的最大數量為 6。
產生網格規格時,應該記住這些參數,因為超過它們會導致錯誤。
的 android.graphics.MeshSpecification
Java 檔。
此頁面的部分是根據 Android 開放原始碼專案所建立和共用的工作進行修改,並根據 Creative Commons 2.5 屬性授權中所述的詞彙使用。
建構函式
MeshSpecification(IntPtr, JniHandleOwnership) |
負責保存建立規格的 |
欄位
AlphaTypeOpaque |
已淘汰.
圖元不透明。 |
AlphaTypePremultiplied |
已淘汰.
圖元元件由 Alpha 預乘。 |
AlphaTypeUnknown |
已淘汰.
初始化。 |
AlphaTypeUnpremultiplied |
已淘汰.
圖元元件與 Alpha 無關。 |
TypeFloat |
已淘汰.
代表一個浮點數。 |
TypeFloat2 |
已淘汰.
表示兩個浮點數。 |
TypeFloat3 |
已淘汰.
表示三個浮點數。 |
TypeFloat4 |
已淘汰.
代表四個浮點數。 |
TypeUbyte4 |
已淘汰.
表示四個字節。 |
屬性
Class |
傳回這個 |
Handle |
基礎Android實例的句柄。 (繼承來源 Object) |
JniIdentityHashCode |
負責保存建立規格的 |
JniPeerMembers |
負責保存建立規格的 |
PeerReference |
負責保存建立規格的 |
ThresholdClass |
負責保存建立規格的 |
ThresholdType |
負責保存建立規格的 |
方法
Clone() |
建立並傳回這個 對象的複本。 (繼承來源 Object) |
Dispose() |
負責保存建立規格的 |
Dispose(Boolean) |
負責保存建立規格的 |
Equals(Object) |
指出其他物件是否「等於」這個物件。 (繼承來源 Object) |
GetHashCode() |
傳回此物件的雜湊碼值。 (繼承來源 Object) |
JavaFinalize() |
當垃圾收集決定不再參考物件時,垃圾收集行程在 物件上呼叫。 (繼承來源 Object) |
Make(MeshSpecification+Attribute[], Int32, MeshSpecification+Varying[], String, String, ColorSpace, MeshAlphaType) |
負責保存建立規格的 |
Make(MeshSpecification+Attribute[], Int32, MeshSpecification+Varying[], String, String, ColorSpace) |
負責保存建立規格的 |
Make(MeshSpecification+Attribute[], Int32, MeshSpecification+Varying[], String, String) |
負責保存建立規格的 |
Notify() |
喚醒正在等候此物件監視器的單一線程。 (繼承來源 Object) |
NotifyAll() |
喚醒正在等候此物件監視器的所有線程。 (繼承來源 Object) |
SetHandle(IntPtr, JniHandleOwnership) |
設定 Handle 屬性。 (繼承來源 Object) |
ToArray<T>() |
負責保存建立規格的 |
ToString() |
傳回物件的字串表示。 (繼承來源 Object) |
UnregisterFromRuntime() |
負責保存建立規格的 |
Wait() |
讓目前線程等候直到喚醒為止,通常是藉由em <notified/em>或<em>interrupted</em> 來喚醒它。<> (繼承來源 Object) |
Wait(Int64, Int32) |
讓目前的線程等到喚醒為止,通常是因為 <em>notified</em> 或 <em>interrupted</em>,或直到經過一定數量的實時為止。 (繼承來源 Object) |
Wait(Int64) |
讓目前的線程等到喚醒為止,通常是因為 <em>notified</em> 或 <em>interrupted</em>,或直到經過一定數量的實時為止。 (繼承來源 Object) |
明確介面實作
IJavaPeerable.Disposed() |
負責保存建立規格的 |
IJavaPeerable.DisposeUnlessReferenced() |
負責保存建立規格的 |
IJavaPeerable.Finalized() |
負責保存建立規格的 |
IJavaPeerable.JniManagedPeerState |
負責保存建立規格的 |
IJavaPeerable.SetJniIdentityHashCode(Int32) |
負責保存建立規格的 |
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) |
負責保存建立規格的 |
IJavaPeerable.SetPeerReference(JniObjectReference) |
負責保存建立規格的 |
擴充方法
JavaCast<TResult>(IJavaObject) |
執行 Android 執行時間檢查的類型轉換。 |
JavaCast<TResult>(IJavaObject) |
負責保存建立規格的 |
GetJniTypeName(IJavaPeerable) |
負責保存建立規格的 |