Compositor.CreateSurfaceBrush 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
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 物件。
- 屬性