Click or drag to resize
Ranorex

ImagingCaptureDesktopImageWithSurroundingArea Method

Captures an image of the of the element and its surrounding area from the desktop.

Namespace:  Ranorex
Assembly:  Ranorex.Core (in Ranorex.Core.dll) Version: 12.7.4-git.38314c06
Syntax
public static Bitmap CaptureDesktopImageWithSurroundingArea(
	Element element,
	Nullable<Point> mousePoint,
	Color highlightColor
)

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.
highlightColor
Type: System.DrawingColor
The color used to highlight the element within its surrounding area or Empty to not highlight the element.

Return Value

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