共用方式為


Compositor.CreateSurfaceBrush 方法

定義

多載

CreateSurfaceBrush()

建立 CompositionSurfaceBrush的實例。

CreateSurfaceBrush(ICompositionSurface)

使用指定的組合介面建立 CompositionSurfaceBrush 的實例。

CreateSurfaceBrush()

建立 CompositionSurfaceBrush的實例。

public:
 virtual CompositionSurfaceBrush ^ CreateSurfaceBrush() = CreateSurfaceBrush;
/// [Windows.Foundation.Metadata.Overload("CreateSurfaceBrush")]
CompositionSurfaceBrush CreateSurfaceBrush();
[Windows.Foundation.Metadata.Overload("CreateSurfaceBrush")]
public CompositionSurfaceBrush CreateSurfaceBrush();
function createSurfaceBrush()
Public Function CreateSurfaceBrush () As CompositionSurfaceBrush

傳回

會傳回建立的 CompositionSurfaceBrush 物件。

屬性

範例

SpriteVisual visual= compositor.CreateSpriteVisual();

var surface = graphicsDevice.CreateDrawingSurface(new Size(300, 50), 
                       Windows.Graphics.DirectX.DirectXPixelFormat.B8G8R8A8UIntNormalized, 
                       CompositionAlphaMode.Ignore); 

var surfaceBrush = _compositor.CreateSurfaceBrush(surface);
surfaceBrush.HorizontalAlignmentRatio = 0.0;
surfaceBrush.VerticalAlignmentRatio= 0.0;
surfaceBrush.Stretch = CompositionStretch.None;

visual.Brush = surfaceBrush;

另請參閱

適用於

CreateSurfaceBrush(ICompositionSurface)

使用指定的組合介面建立 CompositionSurfaceBrush 的實例。

public:
 virtual CompositionSurfaceBrush ^ CreateSurfaceBrush(ICompositionSurface ^ surface) = CreateSurfaceBrush;
/// [Windows.Foundation.Metadata.Overload("CreateSurfaceBrushWithSurface")]
CompositionSurfaceBrush CreateSurfaceBrush(ICompositionSurface const& surface);
[Windows.Foundation.Metadata.Overload("CreateSurfaceBrushWithSurface")]
public CompositionSurfaceBrush CreateSurfaceBrush(ICompositionSurface surface);
function createSurfaceBrush(surface)
Public Function CreateSurfaceBrush (surface As ICompositionSurface) As CompositionSurfaceBrush

參數

surface
ICompositionSurface

要與 CompositionSurfaceBrush建立關聯的組合介面。

傳回

會傳回建立的 CompositionSurfaceBrush 物件。

屬性

另請參閱

適用於