XFINIUM.PDF Documentation
DrawStencilMask(PdfStencilMask,PdfBrush,Double,Double,Double,Double,Double,PdfFlipDirection) Method



Xfinium.Pdf.Graphics Namespace > PdfGraphics Class > DrawStencilMask Method : DrawStencilMask(PdfStencilMask,PdfBrush,Double,Double,Double,Double,Double,PdfFlipDirection) Method
PdfStencilMask to draw.
PdfBrush that defines the characteristics of the stencil mask fill.
The x-coordinate of the upper-left corner of the drawn stencil mask.
The y-coordinate of the upper-left corner of the drawn stencil mask.
Width of the drawn stencil mask.
Height of the drawn stencil mask.
Rotation angle of the drawn stencil mask.
Direction for flipping the drawn stencil mask.
Draws the specified PdfStencilMask at the specified location and with the specified size.
Syntax
'Declaration
 
Public Overloads Function DrawStencilMask( _
   ByVal stencilMask As PdfStencilMask, _
   ByVal brush As PdfBrush, _
   ByVal x As Double, _
   ByVal y As Double, _
   ByVal width As Double, _
   ByVal height As Double, _
   ByVal rotation As Double, _
   ByVal flipDirection As PdfFlipDirection _
) As PdfSize
'Usage
 
Dim instance As PdfGraphics
Dim stencilMask As PdfStencilMask
Dim brush As PdfBrush
Dim x As Double
Dim y As Double
Dim width As Double
Dim height As Double
Dim rotation As Double
Dim flipDirection As PdfFlipDirection
Dim value As PdfSize
 
value = instance.DrawStencilMask(stencilMask, brush, x, y, width, height, rotation, flipDirection)

Parameters

stencilMask
PdfStencilMask to draw.
brush
PdfBrush that defines the characteristics of the stencil mask fill.
x
The x-coordinate of the upper-left corner of the drawn stencil mask.
y
The y-coordinate of the upper-left corner of the drawn stencil mask.
width
Width of the drawn stencil mask.
height
Height of the drawn stencil mask.
rotation
Rotation angle of the drawn stencil mask.
flipDirection
Direction for flipping the drawn stencil mask.

Return Value

The size of the drawn stencil mask.
Remarks
A stencil mask is a B/W image where the 1 pixels are left transparent and 0 pixels are filled with the brush.
If width is zero or negative then width is automatically computed in order to keep the original aspect ratio. If height is zero or negative then height is automatically computed in order to keep the original aspect ratio. If both width and height are negative then the stencil mask is scaled automatically to fit the given area and the original aspect ratio is kept.
Requirements

Supported .NET Platforms: .NET 4.0 and higher, Windows Forms, ASP.NET, Windows Presentation Foundation 4.x, Silverlight 5, WinRT, Universal Windows Platform, Xamarin Mac, iOS & Android, Portable Class Library, .NET Core, .NET Standard


Target Platforms:Windows 10, Windows 8.1, Windows 8 , Windows 7, Windows Vista SP1 or later, Windows Server 2008, Windows Server 2008 R2

See Also

Reference

PdfGraphics Class
PdfGraphics Members
Overload List