Click or drag to resize
Ranorex

ImagingCaptureDesktopImagesWithSurroundingArea Method

Captures an image of the of the element and its surrounding area from the desktop, creating two images, with different borders and sizes.

Namespace:  Ranorex
Assembly:  Ranorex.Core (in Ranorex.Core.dll) Version: 12.7.4-git.38314c06
Syntax
public static Bitmap CaptureDesktopImagesWithSurroundingArea(
	Element element,
	Nullable<Point> mousePoint,
	Color highlightColor1,
	Color highlightColor2,
	int alpha,
	out Bitmap elemImage
)

Parameters

element
Type: Ranorex.CoreElement
The element to capture within its periphery.
mousePoint
Type: SystemNullablePoint
A point specifying the screen coordinates of the current mouse cursor or null in order not to capture the mouse cursor.
highlightColor1
Type: System.DrawingColor
The color used to highlight the element within its surrounding area or Empty to not highlight the element.
highlightColor2
Type: System.DrawingColor
The color used to highlight the element within its surrounding area or Empty to not highlight the element, used for elemImage.
alpha
Type: SystemInt32
The alpha value used for blending the non-highlighted area with the background.
elemImage
Type: System.DrawingBitmap
The captured image of the element rectangle without surround areas or borders.

Return Value

Type: Bitmap
The captured image.
Exceptions
ExceptionCondition
ArgumentNullExceptionelement is a null reference.
See Also