LEADCAPTUREAREAOPTION

typedef struct tagLEADCAPTUREAREAOPTION
{
   L_UINT uStructSize;
   L_UINT uAreaType;
   L_INT nFillPattern;
   COLORREF crFillForeColor;
   COLORREF crFillBackColor;
   L_UINT uDrawLineStyle;
   COLORREF crDrawLineColor;
   L_UINT uEllipseWidth;
   L_UINT uEllipseHeight;
   L_UINT uFlags;
   HCURSOR hDrawCursor;
   COLORREF crTextForeColor;
   COLORREF crTextBackColor;
   L_INT nInfoLeft;
   L_INT nInfoTop;
   L_INT nInfoWidth;
   L_INT nInfoHeight;
} LEADCAPTUREAREAOPTION, * pLEADCAPTUREAREAOPTION;

This structure is used to define the options of the LScreenCapture::CaptureArea function.

Member

Description

uStructSize

Size of this structure. Use sizeof (LAYERINFO).

uAreaType

type of area to capture. Possible values are:

 

 

Value

Meaning

 

CAPTURE_AREA_TRIANGLE

[0x1] Triangle

 

CAPTURE_AREA_RECT

[0x2] Rectangle

 

CAPTURE_AREA_ROUNDRECT

[0x3] Rounded Rectangle

 

CAPTURE_AREA_ELLIPSE

[0x4] Ellipse

 

CAPTURE_AREA_POLYGON

[0x5] Polygon (each click defines point)

 

CAPTURE_AREA_FREEHAND

[0x6] Freehand (click and drag)

 

Default is CAPTURE_AREA_RECT.

 

 

nFillPattern

fill pattern for the bitmap.

 

 

Value

Meaning

 

CAPTURE_AREA_PATTERN_HORIZONTAL

HS_HORIZONTAL /* ----- */

 

CAPTURE_AREA_PATTERN_VERTICAL

HS_VERTICAL /* ||||| */

 

CAPTURE_AREA_PATTERN_FDIAGONAL

HS_FDIAGONAL /* \\\\\ */

 

CAPTURE_AREA_PATTERN_BDIAGONAL

HS_BDIAGONAL /* ///// */

 

CAPTURE_AREA_PATTERN_CROSS

HS_CROSS /* +++++ */

 

CAPTURE_AREA_PATTERN_DIAGCROSS

HS_DIAGCROSS /* xxxxx */

 

CAPTURE_AREA_PATTERN_SOLID

HS_DIAGCROSS+1 /*Solid Fill*/

 

Default is CAPTURE_AREA_PATTERN_SOLID.

 

 

crFillForeColor

foreground color. Default is RGB(0, 0, 0).

crFillBackColor

background color. Default is RGB(255, 255, 255).

uDrawLineStyle

draw line style. Possible values are:

 

 

Value

Meaning

 

CAPTURE_AREA_LINE_SOLID

PS_SOLID /*________*/

 

CAPTURE_AREA_LINE_DASH

PS_DASH /*----------*/

 

CAPTURE_AREA_LINE_DOT

PS_DOT /*..........*/

 

CAPTURE_AREA_LINE_DASHDOT

PS_DASHDOT /*-.-.-.-.-.*/

 

CAPTURE_AREA_LINE_DASHDOTDOT

PS_DASHDOTDOT /*-..-..-*/

 

Default is CAPTURE_AREA_LINE_DASH.

 

 

crDrawLineColor

line color for drawing. Default is RGB(255, 255, 255).

uEllipseWidth

width of the ellipse used when drawing a rounded rectangle. Default is 100.

uEllipseHeight

height of the ellipse used when drawing a rounded rectangle. Default is 100.

uFlags

flags for options. Possible values are:

 

 

Value

Meaning

 

CAPTURE_AREA_SHOW_DRAWCURSOR

[0x0001] show cursor during drawing

 

CAPTURE_AREA_INCLUDE_CURSOR

[0x0002] include cursor in captured image (this is the hCursor from LEADCAPTUREOPTION)

 

CAPTURE_AREA_ENABLE_KEYBOARD

[0x0004] allow Ctrl, Shift,+,- keys during capture (+/-)are used for Zooming In/Out in the info window (Ctrl) If Area is Rect, RoundRect, or Ellipse, pressing CTRL will center the drawing
(Shift) If Area is Rect, RoundRect, or Ellipse, pressing SHIFT will draw regular shapes (that is Ellipse becomes a circle , Rectangle becomes a Square, etc.)

 

CAPTURE_AREA_SHOW_OPAQUE_TEXT

[0x0008] text for cursor position and capture size should have an opaque back color. (Used only for the above CAPTURE_AREA_SHOW_CURSORPOS and CAPTURE_AREA_SHOW_CAPTURESIZE. The info window has opaque text).

 

CAPTURE_AREA_SHOW_CURSORPOS

[0x0010] show cursor position during drawing right next to the cursor

 

CAPTURE_AREA_SHOW_CAPTURESIZE

[0x0020] show the width and height of the capture

 

CAPTURE_AREA_SHOW_INFOWINDOW

[0x0040] display the info window, the current cursor location, the coordinates of the cursor, and the width and height of the area.

 

CAPTURE_AREA_SENSITIVE_INFOWINDOW

[0x0080] Enable Sensitive detection for the Info window position.

 

CAPTURE_AREA_BITMAP_WITH_REGION

[0x0100] captured bitmap will contain a region selected by user. This region will be the shape indicated in Area.

 

CAPTURE_AREA_USE_DEFAULT_VALUES

[0x0200] use default capture area options, all the other flags will be ignored if this flag is set.
When this flag is set, uAreaType and uSize must be set.

 

CAPTURE_AREA_ZOOM_NORM

[0x1000] the image is not zoomed

 

CAPTURE_AREA_ZOOM_BY2X

[0x2000] the image is zoomed 2X

 

CAPTURE_AREA_ZOOM_BY3X

[0x3000] the image is zoomed 3X

 

CAPTURE_AREA_ZOOM_BY4X

[0x4000] the image is zoomed 4X

 

CAPTURE_AREA_ZOOM_BY5X

[0x5000] the image is zoomed 5X

 

CAPTURE_AREA_ZOOM_BY6X

[0x6000] the image is zoomed 6X

 

CAPTURE_AREA_ZOOM_BY7X

[0x7000] the images is zoomed 7X

 

CAPTURE_AREA_ZOOM_BY8X

[0x8000] the image is zoomed 8X

 

CAPTURE_AREA_ZOOM_BY9X

[0x9000] the image is zoomed 9X

 

CAPTURE_AREA_ZOOM_BY10X

[0xA000] the image is zoomed 10X

 

CAPTURE_AREA_ZOOM_BY11X

[0xB000] the image is zoomed 11X

 

CAPTURE_AREA_ZOOM_BY12X

[0xC000] the image is zoomed 12X

 

CAPTURE_AREA_ZOOM_BY13X

[0xD000] the image is zoomed 13X

 

CAPTURE_AREA_ZOOM_BY14X

[0xE000] the image is zoomed 14X

 

CAPTURE_AREA_ZOOM_BY15X

[0xF000] the image is zoomed 15X

 

CAPTURE_AREA_ZOOM_MASK

[0xF000]

 

 

Default is

 

CAPTURE_AREA_SHOW_DRAWCURSOR|

 

CAPTURE_AREA_ENABLE_KEYBOARD|

 

CAPTURE_AREA_SHOW_OPAQUE_TEXT|

 

CAPTURE_AREA_SHOW_CURSORPOS|

 

CAPTURE_AREA_SHOW_CAPTURESIZE|

 

CAPTURE_AREA_SHOW_INFOWINDOW|

 

CAPTURE_AREA_SENSITIVE_INFOWINDOW|

 

CAPTURE_AREA_BITMAP_WITH_REGION|

 

CAPTURE_AREA_ZOOM_BY2X

 

hDrawCursor

cursor for drawing area. Default is (HCURSOR)CAPTURE_AREA_CROSSLINES_CURSOR

crTextForeColor

foreground color of info text. Default is RGB(0, 0, 0).

crTextBackColor

background color of info text. Default is RGB(255, 255, 0).

nInfoLeft

the left coordinate of the info window. Possible values are listed below. In addition, any other positive value specified by the user to define left position for the Info Window may be used.

 

 

Value

Meaning

 

CAPTURE_AREA_INFOWND_POS_LEFT

-1

 

CAPTURE_AREA_INFOWND_POS_RIGHT

-2

 

Default is CAPTURE_AREA_INFOWND_POS_LEFT.

 

 

nInfoTop

the top coordinate of the info window. Possible values are listed below. In addition, any other positive value specified by the user to define the top position for the Info Window may be used.

 

 

Value

Meaning

 

CAPTURE_AREA_INFOWND_POS_TOP

-3

 

CAPTURE_AREA_INFOWND_POS_BOTTOM

-4

 

Default is CAPTURE_AREA_INFOWND_POS_TOP.

 

 

nInfoWidth

the width of the info window. Possible values are listed below. In addition, any other positive value specified by the user to define custom width and height for the info window may be used.

 

 

Value

Meaning

 

CAPTURE_AREA_INFOWND_SIZE_TINY

-1

 

CAPTURE_AREA_INFOWND_SIZE_SMALL

-2

 

CAPTURE_AREA_INFOWND_SIZE_MEDIUM

-3

 

CAPTURE_AREA_INFOWND_SIZE_LARGE

-4

 

CAPTURE_AREA_INFOWND_SIZE_XLARGE

-5

 

Default is CAPTURE_AREA_INFOWND_SIZE_TINY.

 

 

nInfoHeight

the height of the info window. Possible values are the same as for nInfoWidth. Both nInfoWidth and nInfoHeight must be positive values or values from the table in nInfoWidth.

 

 

Default is CAPTURE_AREA_INFOWND_SIZE_TINY.

Comments

The area of the bitmap outside the user-defined region will be filled with the pattern defined by nFillPattern, crFillForeColor, and crFillBackColor.

The zoom factor can be obtained from the flags as follows:

zoom_factor = ((uFlags & CAPTURE_AREA_ZOOM_MASK) >> 12)

The flag can be obtained from the zoom factor as follows

Flag = (zoom_factor)<< 12

 

nInfoWidth, nInfoTop, nInfoWidth and nInfoHeight are ignored if CAPTURE_AREA_SHOW_INFOWINDOW is not set.

CAPTURE_AREA_SHOW_INFOWINDOW and CAPTURE_AREA_SHOW_CAPTURESIZE are not mutually exclusive. If both flags are set, you will have both an info window and the size of the captured area. Likewise, if CAPTURE_AREA_SHOW_INFOWINDOW and CAPTURE_AREA_SHOW_CURSORPOS are set, you will have both an info window and the position of the cursor.

After the initial placement of the info window, the window will be moved to another corner of the screen whenever the mouse cursor becomes near the info window. This way, the user will not be disturbed during the selection of the area he wants, and he will be able to see a zoomed image for the current cursor position. The info window will look like this:

image\info.gif