本文整理汇总了C#中SharpDX.Direct2D1.RenderTarget.CreateLayer方法的典型用法代码示例。如果您正苦于以下问题:C# RenderTarget.CreateLayer方法的具体用法?C# RenderTarget.CreateLayer怎么用?C# RenderTarget.CreateLayer使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SharpDX.Direct2D1.RenderTarget
的用法示例。
在下文中一共展示了RenderTarget.CreateLayer方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Layer
/// <summary>
/// Creates a layer resource that can be used with this render target and its compatible render targets. The new layer has the specified initial size.
/// </summary>
/// <remarks>
/// Regardless of whether a size is initially specified, the layer automatically resizes as needed.
/// </remarks>
/// <param name="renderTarget">an instance of <see cref = "SharpDX.Direct2D1.RenderTarget" /></param>
/// <param name="size">If (0, 0) is specified, no backing store is created behind the layer resource. The layer resource is allocated to the minimum size when {{PushLayer}} is called.</param>
/// <unmanaged>HRESULT CreateLayer([In, Optional] const D2D1_SIZE_F* size,[Out] ID2D1Layer** layer)</unmanaged>
public Layer(RenderTarget renderTarget, DrawingSizeF? size) : base(IntPtr.Zero)
{
renderTarget.CreateLayer(size, this);
}