ImageEn, unit histogrambox

THistogramBox

Properties · Methods · Events · Demos · Examples

Declaration

THistogramBox = class(TCustomControl);


Description

THistogramBox displays a histogram of the colors of an image.
The source of the color information is provided from a TIEBitmap or a TImageEnProc component.


Demos


Demo  Demos\ImageAnalysis\Histogram\Histogram.dpr
Demo  Demos\ImageEditing\CompleteEditor\PhotoEn.dpr

Examples


// Setup
with HistogramBox1 do
begin
  Background     := clBtnFace;                   // Change background color to a theming color
  GrayColor      := clWindowText;                // Change line color to a theming color
  Font.Color     := clGrayText;                  // Change font and chart color to gray
  MouseInteract  := mhSelectValue;               // Allow selection of a single value
  HistogramKind  := [ hkRed, hkGreen, hkBlue ];  // Histogram to show RGB levels
  HistogramStyle := hsFilledLines;               // Show a filled line graph instead of bars
end;

// Display histogram of colors in current image
HistogramBox1.UpdateFromBitmap( ImageEnView1.IEBitmap );

Methods and Properties


Properties
Published Property  AttachedImageEnProc
Published Property  Background
Public Property  Bitmap
Published Property  CompBar
Published Property  GrayColor
Published Property  HistogramKind
Published Property  HistogramStyle
Public Property  HistogramAbsXPos
Published Property  Labels
Published Property  MouseInteract
Public Property  MinSelected
Public Property  MaxSelected
Public Property  Scale
Public Property  SelectionColor
Public Property  TruncateLabels

Methods
Public Method  Clear
Public Method  GetIEBitmap
Public Method  UpdateFromBitmap
Public Method  UpdateFromHistogram

Events
Event  OnSelectionChanged
Event  OnSelectionChanging