⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 iemview.pas

📁 ·ImageEn 2.3.0 ImageEn一组用于图像处理、查看和分析的Delphi控件。能够保存几种图像格式
💻 PAS
📖 第 1 页 / 共 5 页
字号:

<FM>Description<FN>
StoreType specifies how an image is stored in the TImageEnMView component.
!!}
    property StoreType: TIEStoreType read fStoreType write fStoreType default ietNormal;

    property ThumbWidth: integer read fThumbWidth write SetThumbWidth default 100;
    property ThumbHeight: integer read fThumbHeight write SetThumbHeight default 100;
    property HorizBorder: integer read fHorizBorder write SetHorizBorder default 4;
    property VertBorder: integer read fVertBorder write SetVertBorder default 4;
    property BottomGap: integer read fBottomGap write SetBottomGap default 0;
    property UpperGap: integer read fUpperGap write SetUpperGap default 0;

{!!
<FS>TImageEnMView.OnViewChange

<FM>Declaration<FC>
property OnViewChange: <A TViewChangeEvent>;

<FM>Description<FN>
Notifies when ViewX or ViewY properties change.
!!}
    property OnViewChange: TViewChangeEvent read fOnViewChange write fOnViewChange;


{!!
<FS>TImageEnMView.OnImageIDRequest

<FM>Declaration<FC>
property OnImageIDRequest: <A TIEImageIDRequestEvent>;

<FM>Description<FN>
This event is called if you have inserted a value in <A TImageEnMView.ImageID> property and the image must be shown.

ID is the ID you have specified in <A TImageEnMView.ImageID> property;
Bitmap is the bitmap to show. The bitmap is copied in TImageEnMView, and must be freed when it is no longer necessary.
!!}
    property OnImageIDRequest: TIEImageIDRequestEvent read fOnImageIDRequest write fOnImageIDRequest;

{!!
<FS>TImageEnMView.OnImageIDRequestEx

<FM>Declaration<FC>
property OnImageIDRequestEx: <A TIEImageIDRequestExEvent>;

<FM>Description<FN>
The OnImageIDRequestEx event is called if you have inserted a value in the <A TImageEnMView.ImageID> property and the image must be shown.
!!}
    property OnImageIDRequestEx: TIEImageIDRequestExEvent read fOnImageIDRequestEx write fOnImageIDRequestEx;

{!!
<FS>TImageEnMView.OnBeforeImageDraw

<FM>Declaration<FC>
property OnBeforeImageDraw:<A TIEImageDrawEvent>;

<FM>Description<FN>
OnBeforeImageDraw event occurs just before an image is drawn. It is useful to prepare some parameters prior to drawing the image (as <A TImageEnMView.ImageTopText>, <A TImageEnMView.ImageBottomText> and <A TImageEnMView.ImageInfoText>).
!!}
    property OnBeforeImageDraw: TIEImageDrawEvent read fOnBeforeImageDraw write fOnBeforeImageDraw;

{!!
<FS>TImageEnMView.OnBeforeImageDrawEx

<FM>Declaration<FC>
property OnBeforeImageDrawEx: <A TIEImageDrawEventEx>;

<FM>Description<FN>

OnBeforeImageDrawEx occurs just before the image idx is painted.
Left, Top are the left-top coordinates where the image will be drawn (Dest bitmap coordinates).
Dest is the destination bitmap (the canvas where the image must be drawn).
ThumbRect specifies the destination rectangle for the image. You can change this parameter, so the image will be drawn where you want.

When this event is assigned, the selection is not shown.

Look at 'customthumbs' demo for more info.
!!}
    property OnBeforeImageDrawEx: TIEImageDrawEventEx read fOnBeforeImageDrawEx write fOnBeforeImageDrawEx;

{!!
<FS>TImageEnMView.OnImageDraw

<FM>Declaration<FC>
property OnImageDraw: <A TIEImageDrawEvent>;

<FM>Description<FN>
This event is called whenever an image is painted.

<FM>Example<FC>

// This method display the image index and sizes on bottom of the thumbnail.
// Set properly the BottomGap property
procedure TForm1.ImageEnMView1ImageDraw(Sender: TObject; idx: Integer;
  Left, Top: Integer; Canvas: TCanvas);
begin
  with canvas do
  begin
    Font.Height:=15;
    Font.Color:=clWhite;
    textout(Left,Top+imageenmview1.ThumbHeight-imageenmview1.bottomgap+2,inttostr(idx));
    textout(Left,Top,inttostr(imageenmview1.imageWidth[idx])+'x'+inttostr(imageenmview1.imageHeight[idx]));
  end;
end;
!!}
    property OnImageDraw: TIEImageDrawEvent read fOnImageDraw write fOnImageDraw;

{!!
<FS>TImageEnMView.OnImageDraw2

<FM>Declaration<FC>
property OnImageDraw2: <A TIEImageDraw2Event>;

<FM>Description<FN>
This event is called whenever an image is painted. The thumbnail rectangle is available.
!!}
    property OnImageDraw2: TIEImageDraw2Event read fOnImageDraw2 write fOnImageDraw2;

{!!
<FS>TImageEnMView.OnImageSelect

<FM>Declaration<FC>
property OnImageSelect: <A TIEImageSelectEvent>;

<FM>Description<FN>
This event is called whenever an image is selected.
!!}
    property OnImageSelect: TIEImageSelectEvent read fOnImageSelect write fOnImageSelect;

{!!
<FS>TImageEnMView.OnImageDeselect

<FM>Declaration<FC>
property OnImageDeselect: <A TIEImageSelectEvent>;

<FM>Description<FN>
This event occurs when an image is deselected by an user action.
!!}
    property OnImageDeselect: TIEImageSelectEvent read fOnImageDeselect write fOnImageDeselect;

{!!
<FS>TImageEnMView.OnIOProgress

<FM>Declaration<FC>
property OnIOProgress: <A TIEProgressEvent>;

<FM>Description<FN>
OnIOProgress event is called on input/output operations.
!!}
    property OnIOProgress: TIEProgressEvent read fOnIOProgress write fOnIOProgress;

{!!
<FS>TImageEnMView.OnDrawProgress

<FM>Declaration<FC>
property OnDrawProgress:<A TIEMProgressEvent>;

<FM>Description<FN>
The OnDrawProgress event is called on paint for each image drawn.

<FM>Example<FC>

procedure TForm1.ImageEnMView1DrawProgress(Sender: TObject; per,
  idx: Integer);
begin
  ProgressBar1.Position:=per;
end;
!!}
    property OnDrawProgress: TIEMProgressEvent read fOnDrawProgress write fOnDrawProgress;

{!!
<FS>TImageEnMView.OnWrongImage

<FM>Declaration<FC>
property OnWrongImage:<A TIEWrongImageEvent>;

TIEWrongImageEvent = procedure(Sender:TObject; OutBitmap:TIEBitmap; idx:integer; var Handled:boolean) of object;

<FM>Description<FN>
OnWrongImage occurs whenever TImageEnMView cannot load the image specified in <A TImageEnMView.ImageFileName> property, for instance when the file is corrupted or not recognized.

Applications can specify an alternative bitmap to display by changing the OutBitmap property.

<FM>Example<FC>
Procedure Form1_OnWrongImage(Sender:TObject; OutBitmap:TIEBitmap; idx:integer; var Handled:boolean);
Var
   io:TImageEnIO;
begin
   io:=TImageEnIO.Create(nil);
   io.AttachedIEBitmap:=OutBitmap;
   io.LoadFromFile('error_image.bmp');
   io.Free;
   Handled:=True;
end;
!!}
    property OnWrongImage: TIEWrongImageEvent read fOnWrongImage write fOnWrongImage;

    property VisibleSelection: boolean read fVisibleSelection write SetVisibleSelection default true;
    property MouseInteract: TIEMMouseInteract read GetMouseInteract write SetMouseInteract default [mmiSelect];
    property KeyInteract: TIEMKeyInteract read GetKeyInteract write SetKeyInteract default [mkiMoveSelected];
    property DisplayMode: TIEMDisplayMode read fDisplayMode write SetDisplayMode default mdGrid;
    property GridWidth: integer read fGridWidth write SetGridWidth default 0;
    property SelectionWidth: integer read fSelectionWidth write SetSelectionWidth;
    property SelectionColor: TColor read fSelectionColor write SetSelectionColor;
    property RemoveCorrupted: boolean read fRemoveCorrupted write SetRemoveCorrupted default false;
    property DrawImageBackground: boolean read fDrawImageBackground write SetDrawImageBackground default false;
    property ImageCacheSize: integer read fImageCacheSize write SetImageCacheSize default 10;

{!!
<FS>TImageEnMView.TransitionEffect

<FM>Declaration<FC>
property TransitionEffect:<A TIETransitionType>;

<FM>Description<FN>
TransitionEffect specifies the effect to apply when the application changes the currently displayed frame. The DisplayMode must be mdSingle. To change current frame, use the VisibleFrame property.

<FM>Example<FC>

// design time properties...
ImageEnMView1.DisplayMode:=mdSingle;
ImageEnMView1.TransitionEffect:=iettCrossDissolve;
ImageEnMView1.TransitionDuration:=1500;
// display next frame using cross dissolve
ImageEnMView1.VisibleFrame:=ImageEnMView1.VisibleFrame+1;
!!}
    property TransitionEffect: TIETransitionType read fTransitionEffect write fTransitionEffect default iettNone;

{!!
<FS>TImageEnMView.TransitionDuration

<FM>Declaration<FC>
property TransitionDuration:integer;

<FM>Description<FN>
TransitionDuration specifies the duration of the transition in milliseconds.

<FM>Example<FC>

// design time properties...
ImageEnMView1.DisplayMode:=mdSingle;
ImageEnMView1.TransitionEffect:=iettCrossDissolve;
ImageEnMView1.TransitionDuration:=1500;
// display next frame using cross dissolve
ImageEnMView1.VisibleFrame:=ImageEnMView1.VisibleFrame+1;
!!}
    property TransitionDuration: integer read fTransitionDuration write fTransitionDuration default 1000;

    property Style: TIEMStyle read fStyle write SetStyle default iemsACD;
    property SelectionStyle: TIESStyle read fSelectionStyle write SetSelectionStyle default iessAround;

{!!
<FS>TImageEnMView.ThumbnailsBackground

<FM>Declaration<FC>
property ThumbnailsBackground:TColor;

<FM>Description<FN>
ThumbnailsBackground specifies the background color of the thumbnails.
!!}
    property ThumbnailsBackground: TColor read fThumbnailsBackground write fThumbnailsBackground default clBtnFace;

    property EnableMultiSelect: boolean read fEnableMultiSelect write SetEnableMultiSelect default false;

{!!
<FS>TImageEnMView.MultiSelectionOptions

<FM>Declaration<FC>
property MultiSelectionOptions:<A TIEMultiSelectionOptions>;

<FM>Description<FN>
MultiSelectionOptions specifies how the user selects more rows.
If you specify an empty value the entire row is selected. By specifying iemoRegion only specified columns are selected.

<FM>Example<FC>
ImageEnMView1.MultiSelectionOptions:=[];
<IMG help_images\64.bmp>

ImageEnMView1.MultiSelectionOptions:=[iemoRegion];
<IMG help_images\65.bmp>

For default ImageEn select an image on mouse down. By specifying iemoSelectOnMouseUp , ImageEn select on mouse up (the old version's default).
!!}
    property MultiSelectionOptions: TIEMultiSelectionOptions read fMultiSelectionOptions write fMultiSelectionOptions default [];

    property ThumbnailsBorderWidth: integer read fThumbnailsBorderWidth write SetThumbnailsBorderWidth default 0;
    property ThumbnailsBorderColor: TColor read fThumbnailsBorderColor write SetThumbnailsBorderColor default clBtnFace;
    property ThumbnailsInternalBorder: boolean read fThumbnailsInternalBorder write SetThumbnailsInternalBorder default false;
    property ThumbnailsInternalBorderColor: TColor read fThumbnailsInternalBorderColor write SetThumbnailsInternalBorderColor default clBlack;
    property WallPaper: TPicture read fWallPaper write SetWallPaper;
    property WallPaperStyle: TIEWallPaperStyle read fWallPaperStyle write SetWallPaperStyle default iewoNormal;
    property OnProgress: TIEProgressEvent read GetOnProgress write SetOnProgress;

{!!
<FS>TImageEnMView.ThreadPoolSize

<FM>Declaration<FC>
property ThreadPoolSize:integer;

<FM>Description<FN>
ThreadPoolSize specifies how many threads can be created to load images. If it is 0 all images are loaded in the main thread.
!!}
    property ThreadPoolSize: integer read fThreadPoolSize write fThreadPoolSize default 5;

    property EnableAlphaChannel: boolean read fEnableAlphaChannel write SetEnableAlphaChannel default true;
    property BackgroundStyle: TIEBackgroundStyle read fBackgroundStyle write SetBackgroundStyle default iebsSolid;
    property ThumbnailsBackgroundStyle: TIEBackgroundStyle read fThumbnailsBackgroundStyle write SetThumbnailsBackgroundStyle default iebsSolid;

{!!
<FS>TImageEnMView.OnAllDisplayed

<FM>Declaration<FC>
property OnAllDisplayed:TNotifyEvent;

<FM>Description<FN>
This event occurs when all images are loaded and displayed.
!!}
    property OnAllDisplayed:TNotifyEvent read fOnAllDisplayed write fOnAllDisplayed;

{!!
<FS>TImageEnMView.OnFinishWork

<FM>Declaration<FC>
property OnFinishWork: TNotifyEvent;

<FM>Description<FN>
This event occurs whenever an image processing task or input/output terminates.
This event is called after the last call to <A TImageEnMView.OnProgress>, so you can reset here your progress bar.
!!}
    property OnFinishWork: TNotifyEvent read GetOnFinishWork write SetOnFinishWork;

    property ImageEnVersion:string read GetImageEnVersion write SetImageEnVersion;
    {$ifdef IEINCLUDEFLATSB}
    property FlatScrollBars:boolean read fFlatScrollBars write SetFlatScrollBars default False;
    {$endif}
{$IFDEF IESUPPORTANCHORS}
    property Anchors;
{$ENDIF}
{$IFDEF IEMOUSEWHEELEVENTS}
    property OnMouseWheel;
    property OnMouseWheelDown;
    property OnMouseWheelUp;
{$ENDIF}
    property Align;
    property DragCursor;
    property DragMode;
    property Enabled;
    property ParentShowHint;
    property Popup

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -