ImageEn, unit imageenview

TImageEnView

TImageEnView


Declaration


TImageEnView = class(TIEView);


Description


TImageEnView is an image container, viewer and editor. It supports zooming, scrolling, selections and layers.




TImageEnView encapsulates a TImageEnIO (IO property) for loading/saving/acquisition and a TImageEnProc (Proc property) component for image editing/processing (you do not need to add extra TImageEnIO and TImageEnProc components to your form).

For rapid UI development a full set of actions is also available.



Overview





Example


// Setup
with ImageEnView1 do
begin
  AutoShrink := True; // Make the image fit within the window
  BorderStyle := bsNone; // Normally don't require a 3D border
  ZoomFilter := rfFastLinear; // Use better quality drawing when the image is not 100%, Use rfFastLinear for best speed or rfLanczos3 for best quality
  MouseInteractGeneral := [miSelect]; // What action should the mouse do?
end;

// Display an image
ImageEnView1.IO.LoadFromFile('C:\MyImage.jpg');

// Rotate the image
ImageEnView1.Proc.Rotate(270, True);


Methods and Properties


Embedded Components
  Proc (Image editing and analysis methods)
  IO (Loading, saving, acquisition and printing)


Display
  AutoShrink
  AutoStretch
  Center
  CenterImage
  DisplayGridKind
  DisplayGridLyr
  DelayTimer
  DelayZoomFilter
  DelayZoomTime
  ExtentX
  ExtentY
  Fit
  FitToHeight
  FitToWidth
  GetIdealZoom
  GetMaxViewXY
  GetRenderRectangles
  IdealComponentHeight
  IdealComponentWidth
  IdealImageHeight
  IdealImageWidth
  ImageHorizAlignment
  ImageVertAlignment
  LockPaint
  LockPaintCount
  LockUpdate
  LockUpdateCount
  OffsetX
  OffsetY
  PaintRect
  SetViewXY
  SetViewXYSmooth
  SetZoomSmooth
  SmoothScrollValue
  SmoothZoomValue
  Stretch
  UnlockPaint
  UnlockUpdate
  UnlockUpdateEx
  Update
  UpdateNoPaint
  UpdateRect
  ViewX
  ViewY
  VisibleBitmapRect
  XBmp2Scr
  XScr2Bmp
  YBmp2Scr
  YScr2Bmp
  Zoom
  ZoomAt
  ZoomIn
  ZoomFilter
  ZoomOut
  ZoomSelection
  ZoomX
  ZoomY


Background
  BackgroundStyle
  Background
  GradientEndColor
  SetChessboardStyle
  WallpaperStyle
  Wallpaper


Scrollbars
  HScrollBarParams
  ScrollBarsAlwaysVisible
  ScrollBars
  VScrollBarParams


Bitmap
  Bitmap
  Blank
  ChangeResolution
  Clear
  ClearAll
  CopyFromPolygon
  CopyToPolygon
  DrawTo
  IEBitmap
  IsEmpty
  IsEmpty2
  LegacyBitmap
  SetExternalBitmap
  SetSelectedPixelsColor


Interactive Image Editing
  BrushTool
  CancelTools
  CloneTool
  CropTool
  EnactCurrentTool
  FillTool
  KeyboardShortcuts
  RotateTool


User Actions
  ChromaKeyOptions
  EnableInteractionHints
  Gestures
  MagicWandMaxFilter
  MagicWandMode
  MagicWandSize
  MagicWandTolerance
  MouseInteractGeneral
  MouseInteractLayers
  MouseScrollRate
  MouseWheelParams
  SetInteractionHint
  ShiftKeyLock (Lock ssShift, ssCtrl or ssAlt)


Selections
  AddSelBreak
  AddSelPoint
  ApplyBitmapToSelection
  AssignSelTo
  CopySelectionToBitmap
  DelayDisplaySelection
  DelLastSelPoint
  Deselect
  DiscardSavedSelection
  EnableShiftKey (Multiple selections)
  EndSelect
  GetSelectionGripStyle
  InvertSelection
  IsPointInsideSelection
  LoadSelectionFromFile
  LoadSelectionFromStream
  MakeSelectionAntiAliased
  MakeSelectionFeather
  MergeSelectionFromFile
  MergeSelectionFromStream
  MoveSelection (and Resize)
  PolySel
  PolySelCount
  PolySelPoints
  RestoreSelection
  SavedSelectionsCount
  SaveSelection
  SaveSelectionToFile
  SaveSelectionToStream
  SelColor1
  SelColor2
  Select
  SelectChromaKey
  SelectColors
  SelectCustom
  SelectNonAlpha
  Selected
  SelectedRect
  SelectEllipse
  SelectionAbsHeight
  SelectionAbsWidth
  SelectionAspectRatio
  SelectionBase
  SelectionGridHeight
  SelectionGridSize
  SelectionGridWidth
  SelectionIntensity
  SelectionMask
  SelectionMaskDepth
  SelectionOptions
  SelectMagicWand
  SelectRoundRect
  SelX1
  SelX2
  SelY1
  SelY2
  SetSelectionGripStyle
  SetSelectionMarkOuterStyle
  VisibleSelection


Alpha Channel (Transparency)
  AlphaChannel
  CopyToBitmapWithAlpha
  EnableAlphaChannel
  HasAlphaChannel
  RemoveAlphaChannel
  SetAlphaRangePixelsColor
  SetSelectedAreaAlpha


Layers - General
  CurrentLayer
  FindLayerAt
  LayersDeselectAll
  LayerOptions
  Layers
  LayersCopyToAlpha
  LayersCount
  LayersCurrent
  LayersDrawTo
  LayersImport
  LayersRect
  LayersSelCount
  LayersSaveMergedTo
  LayersSelectAll
  LayersSelectConstrains
  MaxLayerHeight
  MaxLayerWidth


Layers - Display
  LayersCaching
  LayersCropped
  LayersDrawBox
  LayersFastDrawing
  SetLayersBoxStyle
  SetLayersGripStyle
  SoftCrop
  SoftCropValue


Layers - Editing
  LayerDefaults
  LayersAdd
  LayersInsert
  LayersAlign
  LayersArrange
  LayersAutoClosePolylines
  LayersClear
  LayersCancelEditor
  LayersConvertToImageLayers
  LayersCreateFromAlpha
  LayersCreateFromClipboard
  LayersCreateFromEdge
  LayersCreateFromFile
  LayersCreateFromSelection
  LayersCreatePolylineFromSelection
  LayersCropBackground
  LayersCurvePoints
  LayersEditingLayer
  LayersFixBorders
  LayersFixRotations
  LayersFixSizes
  LayersGroup
  LayersMerge
  LayersMergeAll
  LayersMergeFilter
  LayersMergeTo
  LayersNameToIndex
  LayersNewLayerDialog
  LayersRepositionAll
  LayersRemove
  LayersResizeAspectRatio
  LayersRotateAll
  LayersRotateStep
  LayersRotationAntialias
  LayersRotationFilter
  LayersRotationUseFilterOnPreview
  LayersSetProperties
  LayersShowPropertiesDialog
  LayersSizeAll
  LayersTextRotateMode
  LayersUngroup

Also: Layer Loading and Layer Saving


Animations and Transitions
  AbortTransition
  PrepareTransition
  RunTransition
  TransitionRunning
  TransitionTiming
  Playing
  PlayLoop


Rulers and Measurement
  RulerParams
  ScaleX
  ScaleY
  SetScale
  ShowRulers


Navigator
  IsNavigator
  SetNavigator


Other
  Assign
  AutoCursors
  Cursor
  GetCanvas
  BackBuffer
  BeginPostFrames
  DrawVersion
  EndPostFrames
  GetGripAt
  HighlightedPixel
  LoadState
  Modified
  MoveContentTo
  ResetState
  SaveState
  ShowButtons
  ZoneCursor
  ZoneCursorSize



Events


Display Events
  OnSetCursor
  OnViewChange
  OnViewChanging
  OnZoomIn
  OnZoomOut


Paint Events
  OnDrawBackBuffer
  OnDrawBackground
  OnDrawCanvas
  OnDrawPolygon
  OnPaint


User Interaction Events
  OnBeforeSelectionChange
  OnButtonClick
  OnImageEnGesture
  OnMeasure
  OnSelectionChange
  OnSelectionChanging
  OnMouseEnter
  OnMouseInResizingGrip
  OnMouseInSel
  OnMouseLeave
  OnSpecialKey
  OnUserInteraction
  OnVirtualKey


Layer Events
  OnActivateTextEditor
  OnBeforeDrawLayer
  OnDeactivateTextEditor
  OnDrawLayer
  OnDrawLayerBox
  OnDrawLayerGrip
  OnLayerNotify
  OnLayerNotifyEx
  OnLayerMoveSize
  OnLayerSelectionChange
  OnNewLayer
  OnTextEditorKeyDown


Media Events
  OnDShowEvent
  OnDShowNewFrame
  OnMediaFoundationNotify


Ruler Events
  OnRulerClick
  OnRulerGetText
  OnRulerGripClick
  OnRulerGripDblClick
  OnRulerGripPosChange


Transition Effects
  OnTransitionPaint
  OnTransitionStep
  OnTransitionStop


Other Events
  OnAcquireBitmap
  OnFinishSmoothTask
  OnFinishWork
  OnImageChange
  OnImageChangeEx
  OnShowDialog
  OnPrintPage
  OnProgress
  OnSaveUndo
  OnUndoRedo