ImageEn, unit imageenview

TImageEnView.SelX1

TImageEnView.SelX1


Declaration

property SelX1: integer; (Read-only)


Description

Returns the top-left X (column) coordinate of the selected area.
The value is a coordinate of the Bitmap itself, i.e. it is independent of scrolling (ViewX and ViewY) and Zoom (e.g. you will get the same result whether the zoom is 50% or 100%).

Note:
You can convert the returned value to a screen value using XBmp2Scr
The selected area can be specified using Select
SelX2 and SelY2 are inclusive values, unlike Select. Consider the following:

ImageEnView1.SelectionBase := iesbBitmap;
ImageEnView1.Select( 100, 100, 200, 200 );
Caption := format(' %d,%d,%d,%d', [ ImageEnView1.SelX1, ImageEnView1.SelY1, ImageEnView1.SelX2, ImageEnView1.SelY2 ]);
// Caption will be: 100,100,199,199



Example

// Enlarge the selection by ten pixels on all sides
ImageEnView1.SelectionBase := iesbBitmap;
ImageEnView1.Select( ImageEnView1.SelX1 - 10, ImageEnView1.SelY1 - 10, ImageEnView1.SelX2 - 10, ImageEnView1.SelY2 - 10 );


See Also

SelY1
SelX2
SelY2
Select
XBmp2Scr
YBmp2Scr
XScr2Bmp
YScr2Bmp