Table of Contents

Method Blit

Namespace
Alternet.Drawing
Assembly
Alternet.UI.Common.dll

Blit(PointD, SizeD, Graphics, PointD, RasterOperationMode, bool, PointD?, GraphicsUnit)

Copy from a source Graphics to this graphics. With this method you can specify the destination coordinates and the size of area to copy which will be the same for both the source and target. If you need to apply scaling while copying, use StretchBlit(PointD, SizeD, Graphics, PointD, SizeD, RasterOperationMode, bool, PointD?, GraphicsUnit). Sizes and positions are specified in pixels.

bool Blit(PointD destPt, SizeD sz, Graphics source, PointD srcPt, RasterOperationMode rop = RasterOperationMode.Copy, bool useMask = false, PointD? srcPtMask = null, GraphicsUnit unit = GraphicsUnit.Dip)

Parameters

destPt PointD

Destination device context position.

sz SizeD

Size of source area to be copied.

source Graphics

Source device context.

srcPt PointD

Source device context position.

rop RasterOperationMode

Logical function to use.

useMask bool

If true, Blit does a transparent blit using the mask that is associated with the bitmap selected into the source device context.

srcPtMask PointD?

Source position on the mask. If it equals (-1, -1), srcPt will be assumed for the mask source position. Currently only implemented on Windows.

unit GraphicsUnit

GraphicsUnit that determines the unit of measure for the point and size parameters.

Returns

bool

Remarks

Notice that source coordinate srcPt is interpreted using the current source DC coordinate system, i.e. the scale, origin position and axis directions are taken into account when transforming them to physical(pixel) coordinates.