Class PdfMask
Base class for bitmap masking objects.
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Syncfusion.Pdf.Graphics
Assembly: Syncfusion.Pdf.Base.dll
Syntax
public abstract class PdfMask
Examples
//Create a PDF document
PdfDocument doc = new PdfDocument();
//Add pages to the document
PdfPage page = doc.Pages.Add();
//Create PDF graphics for the page
PdfGraphics graphics = page.Graphics;
//Load the Tiff image
PdfBitmap image = new PdfBitmap("image.tif");
//Create masking image
PdfMask mask = new PdfImageMask(new PdfBitmap("mask.bmp"));
image.Mask = mask;
//Draw the image
graphics.DrawImage(image, 0, 0);
//Saves the document
doc.Save("Output.pdf");
//Close the document
doc.Close(true);
'Create a PDF document
Dim doc As New PdfDocument()
'Add pages to the document
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics
'Load the Tiff image
Dim image As New PdfBitmap("image.tif")
'Create masking image
Dim mask As New PdfImageMask(New PdfBitmap("mask.bmp"))
image.Mask = mask
'Draw the image
graphics.DrawImage(image, 0, 0)
'Saves the document
doc.Save("Output.pdf")
'Close the document
doc.Close(True)
Constructors
PdfMask()
Declaration
protected PdfMask()