 | 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
Syntaxpublic static Bitmap CaptureDesktopImagesWithSurroundingArea(
Element element,
Nullable<Point> mousePoint,
Color highlightColor1,
Color highlightColor2,
int alpha,
out Bitmap elemImage
)
Public Shared Function CaptureDesktopImagesWithSurroundingArea (
element As Element,
mousePoint As Nullable(Of Point),
highlightColor1 As Color,
highlightColor2 As Color,
alpha As Integer,
<OutAttribute> ByRef elemImage As Bitmap
) As Bitmap
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:
BitmapThe captured image.
Exceptions| Exception | Condition |
|---|
| ArgumentNullException | element is a null reference. |
See Also