Class EmfMaskBlt
Namespace: Aspose.Imaging.FileFormats.Emf.Emf.Records
Assembly: Aspose.Imaging.dll (25.7.0)
The EMR_MASKBLT record specifies a block transfer of pixels from a source bitmap to a destinationrectangle, optionally in combination with a brush pattern and with the application of a color maskbitmap, according to specified foreground and background raster operations.
public sealed class EmfMaskBlt : EmfBitmapRecordType
{
public int SrcX;
public int SrcY;
public int Width;
public int Height;
public bool Rop;
public short BltSequence(Graphics g, Rectangle bounds)
{
var srcRect = new Rectangle(SrcX, SrcY, Width, Height);
var dstRect = new Rectangle(bounds.X, bounds.Y, bounds.Width, bounds.Height);
using (var bmp = g.GetImage() as Bitmap)
{
if (bmp != null && Rop)
{
using (GraphicsPath srcPath = new GraphicsPath())
{
srcPath.AddRectangle(srcRect);
g.SetClip(srcPath, CombineMode.Intersect);
g.DrawImage(bmp, dstRect);
}
}
else
{
g.DrawImage(bmp, dstRect, srcRect, GraphicsUnit.Pixel, Rop ? XorRop : SourceCopy);
}
}
return (short)(srcRect.Width + SrcX);
}
}
Inheritance
object ← MetaObject ← EmfRecord ← EmfBitmapRecordType ← EmfMaskBlt
Inherited Members
EmfRecord.Type , EmfRecord.Size , object.GetType() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()
Constructors
EmfMaskBlt(EmfRecord)
Initializes a new instance of the Aspose.Imaging.FileFormats.Emf.Emf.Records.EmfMaskBlt class.
public EmfMaskBlt(EmfRecord source)
{
}
Parameters
source
EmfRecord
The source.
Properties
Argb32BkColorSrc
Gets or sets a WMF ColorRef object ([MS-WMF] section 2.2.2.8 that specifies thebackground color of the source bitmap.
public int Argb32BkColorSrc
{
get;
set;
}
Property Value
Bounds
Gets or sets a WMF RectL object ([MS-WMF] section 2.2.2.19) that defines thedestination bounding rectangle in device units.
public Rectangle Bounds
{
get;
set;
}
Property Value
CxDest
Gets or sets a 32-bit signed integer that specifies the logical width of the destination rectangle.
public int CxDest
{
get;
set;
}
Property Value
CyDest
Gets or sets a 32-bit signed integer that specifies the logical height of the destination rectangle.
public int CyDest
{
get;
set;
}
Property Value
MaskBitmap
Gets or sets a buffer containing the mask bitmaps, which are notrequired to be contiguous with the fixed portion of the EMR_MASKBLT record or with eachother. Accordingly, fields in this buffer that are labeled “UndefinedSpace” are optional andMUST be ignored.
public WmfDeviceIndendentBitmap MaskBitmap
{
get;
set;
}
Property Value
Rop4
Gets or sets a quaternary raster operation, which specifies ternary raster operations forthe foreground and background colors of a bitmap. These values define how the color data ofthe source rectangle is to be combined with the color data of the destination rectangle.
public EmfRop4 Rop4
{
get;
set;
}
Property Value
SourceBitmap
Gets or sets a buffer containing the source bitmaps, which are notrequired to be contiguous with the fixed portion of the EMR_MASKBLT record or with eachother. Accordingly, fields in this buffer that are labeled “UndefinedSpace” are optional andMUST be ignored.
public WmfDeviceIndependentBitmap SourceBitmap
{
get;
set;
}
Property Value
UsageMask
Gets or sets a 32-bit unsigned integer that specifies how to interpret values in thecolor table in the mask bitmap header. This value MUST be in the DIBColors enumeration.
public EmfDibColors UsageMask
{
get;
set;
}
Property Value
UsageSrc
Gets or sets a 32-bit unsigned integer that specifies how to interpret values in thecolor table in the source bitmap header. This value MUST be in the DIBColors enumeration (section 2.1.9).
public int UsageSrc
{
get;
set;
}
Property Value
XDest
Gets or sets a 32-bit signed integer that specifies the logical x-coordinate of the upper-leftcorner of the destination rectangle.
public int XDest
{
get;
set;
}
Property Value
XMask
Gets or sets a 32-bit signed integer that specifies the logical x-coordinate of the upper-left corner of the mask bitmap.
public int XMask
{
get;
set;
}
Property Value
XSrc
Gets or sets a 32-bit signed integer that specifies the logical x-coordinate of the upper-leftcorner of the source rectangle.
public int XSrc
{
get;
set;
}
Property Value
XformSrc
Gets or sets an XForm object (section 2.2.28) that specifies a world-space to page-space transform to apply to the source bitmap.
public Matrix XformSrc
{
get;
set;
}
Property Value
YDest
Gets or sets a 32-bit signed integer that specifies the logical y-coordinate of the upper-leftcorner of the destination rectangle.
public int YDest
{
get;
set;
}
Property Value
YMask
Gets or sets a 32-bit signed integer that specifies the logical y-coordinate of the upper-left corner of the mask bitmap.
public int YMask
{
get;
set;
}
Property Value
YSrc
Gets or sets a 32-bit signed integer that specifies the logical y-coordinate of the upper-leftcorner of the source rectangle.
public int YSrc
{
get;
set;
}