Class TCustomZoomDisplay (unit ZoomDisp) |
Inherits from
TCustomControl
constructor Create(AOwner: TComponent);
- TCustomZoomDisplay
procedure BeginZoom(X, Y: Integer);
Rectangle doesn't include the right column and bottom row of pixels.
procedure DeleteMarkersMarking(Marked: TObject);
function DeviceX(X: TWorldCoord): Double;
function DeviceY(Y: TWorldCoord): Double;
procedure HideHighlightedSample;
procedure InvalidateWorldWindow;
strip first character of ClassName
procedure IterateMarkers(Proc: TMarkerProc; Param: DWord);
procedure LineTo(X, Y: TWorldCoord);
Draw the end point if neccessary
procedure MoveTo(X, Y: TWorldCoord);
procedure Plot24BitSamples(
const Samples: array of T24BitSample;
Offset: Longint;
Channels: Integer;
AChannel: Integer);
PaintMode = spSolid
procedure PlotByteArray(
const Samples: array of Byte;
Offset: Longint;
Channels: Integer;
AChannel: Integer);
PaintMode = spSolid
procedure PlotIntArray(
const Samples: array of Integer;
Offset: Longint;
Channels: Integer;
AChannel: Integer);
PaintMode = spSolid
procedure PlotSamples(Sample: Pointer; Amplitude: TAmpFunc);
-1 to compensate for the fact that LineTo doesn't draw the last point
procedure PlotSmallintArray(
const Samples: array of Smallint;
Offset: Longint;
Channels: Integer;
AChannel: Integer);
PaintMode = spSolid
procedure SaveToFile(FileName: string);
saves signal image.
procedure SetSelection(StartValue, EndValue: Integer);
procedure SetWindowSizeLimits(
MinWidth, MinHeight,
MaxWidth, MaxHeight: Integer);
function WorldX(X: integer): TWorldCoord;
function WorldY(Y: integer): TWorldCoord;
procedure CreateWnd;
destructor Destroy;
procedure DoWaveformPaint;
procedure DragDrop(Source: TObject; X, Y: Integer);
procedure DragOver(Source: TObject; X, Y: Integer; State: TDragState;
var Accept: Boolean);
function GetPalette: HPalette;
procedure GetZoomWindow(var AWindow: TRect);
sets Brush.
procedure Loaded;
procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
procedure MouseMove(Shift: TShiftState; X, Y: Integer);
The following code has the effect of avoiding some dirt
otherwise left behind by *DragLine when dragging is
started by clicking in a TCustomZoomDisplay placed in a
window which is partially covered by another window.
procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
procedure Paint;
procedure RealizeZoom;
procedure ScrollBy(Dx, Dy: Integer);
procedure UpdateIncrements;
function UpdateWorldWindow: boolean;
procedure WaveformPaint;
procedure WndProc(var Message: TMessage);
function BoundWindow(var AWindow: TRect): Boolean;
Result :=
procedure CMDrag(var Message: TCMDrag);
function TCustomZoomDisplay.
procedure CMMouseLeave(var Message: TMessage);
procedure ContinueZoom(X, Y: Integer);
sets Brush.
function DevicePositionCode(P: TDoublePoint): TClipCode;
procedure DoAutoScroll;
procedure DoLineTo(DC: hDC; X, Y: TWorldCoord);
procedure DoMouseLeave;
procedure DrawHLSample;
procedure DrawMarkerPositions;
procedure DrawScales;
procedure DrawSelection;
procedure DrawZoomBox;
procedure EndZoom;
procedure Error(Text: string);
function GetBitmap: TBitmap;
function GetBuffered: Boolean;
function GetSelectionRect: TRect;
function GetCanvas: TCanvas; else do nothing
function GetViewport: TRect;
function GetWaveformCanvas: TCanvas;
function GetWindowHeight: Integer;
function GetWindowWidth: Integer;
function GetWorldHeight: Integer;
function GetWorldWidth: Integer;
function HighlightedRect: TRect;
procedure HorzDragLine(X, Y: Integer; DragLineVisible: Boolean);
procedure HScroll(var Message: TWMScroll);
function PositionCode(P: TPoint): TClipCode;
procedure InvalidateHLSample;
procedure MoveWindow(X, Y: Integer);
procedure PenChanged(Sender: TObject);
procedure ScrollTo(X, Y: Integer);
procedure SetBuffered(Value: Boolean);
procedure SetColor(Value: TColor);
mouse left client area
procedure SetDrawSelectionMode(Value: TDrawSelectionMode);
procedure SetHighlightColor(Value: TColor);
procedure SetHighlightedSample(Value: Integer);
procedure SetHorzScale(Value: TDisplayScale);
procedure SetHorzScrollBar(Value: TDisplayScrollBar);
procedure SetMaxWindowHeight(Value: Integer);
procedure SetMaxWindowWidth(Value: Integer);
procedure SetMinVertScaleWidth(Value: Integer);
procedure SetMinWindowHeight(Value: Integer);
procedure SetMinWindowWidth(Value: Integer);
procedure SetMonochromeBitmap(Value: Boolean);
PaintMode = spSolid
procedure SetPaintMode(Value: TSignalPaintMode);
procedure SetPen(Value: TPen);
procedure SetSelectionColor(Value: TColor);
procedure SetSelectionEnd(Value: Integer);
procedure SetSelectionStart(Value: Integer);
swap
procedure SetVertScale(Value: TDisplayScale);
procedure SetVertScrollBar(Value: TDisplayScrollBar);
procedure SetViewport(Left, Top, Width, Height: Integer);
procedure SetWindow(Value: TRect);
procedure SetWindowHeight(Value: Integer);
procedure SetWindowLeft(Value: Integer);
procedure SetWindowTop(Value: Integer);
procedure SetWindowWidth(Value: Integer);
procedure SetWorld(const Value: TRect);
procedure SetWorldHeight(Value: Integer);
procedure SetWorldLeft(Value: Integer);
procedure SetWorldTop(Value: Integer);
procedure SetWorldWidth(Value: Integer);
procedure UpdateHighlightedX;
procedure UpdateHorzScale;
procedure UpdateMarkers;
procedure UpdateScales;
procedure UpdateScrollBars;
procedure UpdateVertScale;
procedure UpdateViewport;
procedure VertDragLine(X, Y: Integer; DragLineVisible: Boolean);
procedure VerticalLine(DC: hDC; X, Ymin, Ymax: Integer);
procedure VScroll(var Message: TWMScroll);
procedure WindowChange;
procedure WMHScroll(var Message: TWMHScroll);
procedure WMNCMouseMove(var Message: TMessage);
might be sent by a child control when it is left
procedure WMSize(var Message: TWMSize);
procedure WMVScroll(var Message: TWMVScroll);
procedure WorldPosChanged(MouseX, MouseY: Integer);
property ZoomMode : TZoomMode
property Bitmap : TBitmap
property HighlightedSample : Integer
property SelectionEnd : Integer
property SelectionStart : Integer
property WaveformCanvas : TCanvas
property Window : TRect
property World : TRect
property AutoScrollHorz : Boolean
property AutoScrollVert : Boolean
property Buffered : Boolean
property Color :
property Cursor :
property DrawSelectionMode : TDrawSelectionMode
property Height :
property HighlightColor : TColor
property HorzScale : TDisplayScale
property HorzScrollBar : TDisplayScrollBar
property ImageFileFormat : TImageFileFormat
property MaxWindowHeight : Integer
Max(Right-Left+1
property MaxWindowWidth : Integer
Min(Top-Bottom+1
property MinVertScaleWidth : Integer
property MinWindowHeight : Integer
Min(Right-Left+1
property MinWindowWidth : Integer
property MonochromeBitmap : Boolean
Max(Top-Bottom+1
property PaintMode : TSignalPaintMode
property ParentColor :
property Pen : TPen
property SelectionColor : TColor
property VertScale : TDisplayScale
property VertScrollBar : TDisplayScrollBar
property Viewport : TRect
property Width :
Font used by scales
property WindowHeight : Integer
property WindowLeft : Integer
property WindowTop : Integer
property WindowWidth : Integer
property WorldHeight : Integer
property WorldLeft : Integer
property WorldTop : Integer
property WorldWidth : Integer
property ZoomStartMode : TZoomStartMode
event OnMouseDown :
event OnGetHorzScalePoint : TGetScalePointProc
event OnGetVertScalePoint : TGetScalePointProc
event OnMouseLeave : TNotifyEvent
event OnPaint : TNotifyEvent
event OnSelectionChange : TNotifyEvent
event OnWindowChange : TNotifyEvent
event OnWorldPosChange : TPosEvent
event OnZoomMax : TNotifyEvent
event OnZoomMin : TNotifyEvent
FAutoScrollHorz : Boolean;
FAutoScrollVert : Boolean;
FBitmap : TBitmap;
FBitmapInvalid : Boolean;
FCurrentCode : TClipCode;
FCurrentPos : TDoublePoint;
FDoDrawMarkerPositions : Boolean;
FDragLineVisible : Boolean;
FDragPos : TPoint;
FDrawSelectionMode : TDrawSelectionMode;
FHighlightColor : TColor;
FHighlightedX : Integer;
FHLSample : Integer;
FHLSampleValid : Boolean;
FHorzScale : TDisplayScale;
FHorzScrollBar : TDisplayScrollBar;
FImageFileFormat : TImageFileFormat;
FInWaveformPaint : Boolean;
FMaxWindowHeight : Integer;
FMaxWindowWidth : Integer;
FMetafileCanvas : TMetafileCanvas;
FMinVertScaleWidth : Integer;
FMinWindowHeight : Integer;
FMinWindowWidth : Integer;
FMonochromeBitmap : Boolean;
FMouseOver : Boolean;
FMouseX : Integer;
FMouseY : Integer;
FOnGetHorzScalePoint : TGetScalePointProc;
FOnGetVertScalePoint : TGetScalePointProc;
FOnMouseLeave : TNotifyEvent;
FOnPaint : TNotifyEvent;
FOnSelectionChange : TNotifyEvent;
FOnWindowChange : TNotifyEvent;
FOnWorldPosChange : TPosEvent;
FOnZoomMax : TNotifyEvent;
FOnZoomMin : TNotifyEvent;
FPaintMode : TSignalPaintMode;
FPen : TPen;
FPrevWindow : TRect;
FRestoreColors : Boolean;
FSelBrush : TBrush;
FSelectionColor : TColor;
FSelectionEnd : Integer;
FSelectionStart : Integer;
FVertScale : TDisplayScale;
FVertScrollBar : TDisplayScrollBar;
FWindow : TRect;
FWindowInvalid : Boolean;
FWorld : TRect;
FXIncrement : Cardinal;
FXPos : Integer;
FYIncrement : Cardinal;
FYPos : Integer;
FZooming : Boolean;
FZoomMode : TZoomMode;
FZoomStartMode : TZoomStartMode;
constructor Create(AOwner: TComponent);
TCustomZoomDisplay
procedure BeginZoom(X, Y: Integer);
Rectangle doesn't include the right column and bottom row of pixels.
procedure DeleteMarkersMarking(Marked: TObject);
function DeviceX(X: TWorldCoord): Double;
function DeviceY(Y: TWorldCoord): Double;
procedure HideHighlightedSample;
procedure InvalidateWorldWindow;
strip first character of ClassName
procedure IterateMarkers(Proc: TMarkerProc; Param: DWord);
procedure LineTo(X, Y: TWorldCoord);
Draw the end point if neccessary
procedure MoveTo(X, Y: TWorldCoord);
procedure Plot24BitSamples(
const Samples: array of T24BitSample;
Offset: Longint;
Channels: Integer;
AChannel: Integer);
PaintMode = spSolid
procedure PlotByteArray(
const Samples: array of Byte;
Offset: Longint;
Channels: Integer;
AChannel: Integer);
PaintMode = spSolid
procedure PlotIntArray(
const Samples: array of Integer;
Offset: Longint;
Channels: Integer;
AChannel: Integer);
PaintMode = spSolid
procedure PlotSamples(Sample: Pointer; Amplitude: TAmpFunc);
-1 to compensate for the fact that LineTo doesn't draw the last point
procedure PlotSmallintArray(
const Samples: array of Smallint;
Offset: Longint;
Channels: Integer;
AChannel: Integer);
PaintMode = spSolid
procedure SaveToFile(FileName: string);
saves signal image.
procedure SetSelection(StartValue, EndValue: Integer);
procedure SetWindowSizeLimits(
MinWidth, MinHeight,
MaxWidth, MaxHeight: Integer);
function WorldX(X: integer): TWorldCoord;
function WorldY(Y: integer): TWorldCoord;
procedure CreateWnd;
destructor Destroy;
procedure DoWaveformPaint;
procedure DragDrop(Source: TObject; X, Y: Integer);
procedure DragOver(Source: TObject; X, Y: Integer; State: TDragState;
var Accept: Boolean);
function GetPalette: HPalette;
procedure GetZoomWindow(var AWindow: TRect);
sets Brush.Style to bsSolid
procedure Loaded;
procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
procedure MouseMove(Shift: TShiftState; X, Y: Integer);
The following code has the effect of avoiding some dirt
otherwise left behind by *DragLine when dragging is
started by clicking in a TCustomZoomDisplay placed in a
window which is partially covered by another window.
procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
procedure Paint;
procedure RealizeZoom;
procedure ScrollBy(Dx, Dy: Integer);
procedure UpdateIncrements;
function UpdateWorldWindow: boolean;
procedure WaveformPaint;
procedure WndProc(var Message: TMessage);
function BoundWindow(var AWindow: TRect): Boolean;
Result :=
procedure CMDrag(var Message: TCMDrag);
function TCustomZoomDisplay.PositionCode(P: TPoint): TClipCode;
begin
Result := [ccCenter];
if P.Y > FWindow.Top then Include(Result, ccTop) else
if P.Y < FWindow.Bottom then Include(Result, ccBottom);
if P.X > FWindow.Right then Include(Result, ccRight) else
if P.X < FWindow.Left then Include(Result, ccLeft);
end;
procedure CMMouseLeave(var Message: TMessage);
procedure ContinueZoom(X, Y: Integer);
sets Brush.Color to clWhite
function DevicePositionCode(P: TDoublePoint): TClipCode;
procedure DoAutoScroll;
procedure DoLineTo(DC: hDC; X, Y: TWorldCoord);
procedure DoMouseLeave;
procedure DrawHLSample;
procedure DrawMarkerPositions;
procedure DrawScales;
procedure DrawSelection;
procedure DrawZoomBox;
procedure EndZoom;
procedure Error(Text: string);
function GetBitmap: TBitmap;
function GetBuffered: Boolean;
function GetSelectionRect: TRect;
function GetCanvas: TCanvas;
else do nothing
function GetViewport: TRect;
function GetWaveformCanvas: TCanvas;
function GetWindowHeight: Integer;
function GetWindowWidth: Integer;
function GetWorldHeight: Integer;
function GetWorldWidth: Integer;
function HighlightedRect: TRect;
procedure HorzDragLine(X, Y: Integer; DragLineVisible: Boolean);
procedure HScroll(var Message: TWMScroll);
function PositionCode(P: TPoint): TClipCode;
procedure InvalidateHLSample;
procedure MoveWindow(X, Y: Integer);
procedure PenChanged(Sender: TObject);
procedure ScrollTo(X, Y: Integer);
procedure SetBuffered(Value: Boolean);
procedure SetColor(Value: TColor);
mouse left client area
procedure SetDrawSelectionMode(Value: TDrawSelectionMode);
procedure SetHighlightColor(Value: TColor);
procedure SetHighlightedSample(Value: Integer);
procedure SetHorzScale(Value: TDisplayScale);
procedure SetHorzScrollBar(Value: TDisplayScrollBar);
procedure SetMaxWindowHeight(Value: Integer);
procedure SetMaxWindowWidth(Value: Integer);
procedure SetMinVertScaleWidth(Value: Integer);
procedure SetMinWindowHeight(Value: Integer);
procedure SetMinWindowWidth(Value: Integer);
procedure SetMonochromeBitmap(Value: Boolean);
PaintMode = spSolid
procedure SetPaintMode(Value: TSignalPaintMode);
procedure SetPen(Value: TPen);
procedure SetSelectionColor(Value: TColor);
procedure SetSelectionEnd(Value: Integer);
procedure SetSelectionStart(Value: Integer);
swap
procedure SetVertScale(Value: TDisplayScale);
procedure SetVertScrollBar(Value: TDisplayScrollBar);
procedure SetViewport(Left, Top, Width, Height: Integer);
procedure SetWindow(Value: TRect);
procedure SetWindowHeight(Value: Integer);
procedure SetWindowLeft(Value: Integer);
procedure SetWindowTop(Value: Integer);
procedure SetWindowWidth(Value: Integer);
procedure SetWorld(const Value: TRect);
procedure SetWorldHeight(Value: Integer);
procedure SetWorldLeft(Value: Integer);
procedure SetWorldTop(Value: Integer);
procedure SetWorldWidth(Value: Integer);
procedure UpdateHighlightedX;
procedure UpdateHorzScale;
procedure UpdateMarkers;
procedure UpdateScales;
procedure UpdateScrollBars;
procedure UpdateVertScale;
procedure UpdateViewport;
procedure VertDragLine(X, Y: Integer; DragLineVisible: Boolean);
procedure VerticalLine(DC: hDC; X, Ymin, Ymax: Integer);
procedure VScroll(var Message: TWMScroll);
procedure WindowChange;
procedure WMHScroll(var Message: TWMHScroll);
procedure WMNCMouseMove(var Message: TMessage);
might be sent by a child control when it is left
procedure WMSize(var Message: TWMSize);
procedure WMVScroll(var Message: TWMVScroll);
procedure WorldPosChanged(MouseX, MouseY: Integer);
property ZoomMode : TZoomMode
property Bitmap : TBitmap
property HighlightedSample : Integer
property SelectionEnd : Integer
property SelectionStart : Integer
property WaveformCanvas : TCanvas
property Window : TRect
property World : TRect
property AutoScrollHorz : Boolean
property AutoScrollVert : Boolean
property Buffered : Boolean
property Color :
property Cursor :
property DrawSelectionMode : TDrawSelectionMode
property Height :
property HighlightColor : TColor
property HorzScale : TDisplayScale
property HorzScrollBar : TDisplayScrollBar
property ImageFileFormat : TImageFileFormat
property MaxWindowHeight : Integer
Max(Right-Left+1
property MaxWindowWidth : Integer
Min(Top-Bottom+1
property MinVertScaleWidth : Integer
property MinWindowHeight : Integer
Min(Right-Left+1
property MinWindowWidth : Integer
property MonochromeBitmap : Boolean
Max(Top-Bottom+1
property PaintMode : TSignalPaintMode
property ParentColor :
property Pen : TPen
property SelectionColor : TColor
property VertScale : TDisplayScale
property VertScrollBar : TDisplayScrollBar
property Viewport : TRect
property Width :
Font used by scales
property WindowHeight : Integer
property WindowLeft : Integer
property WindowTop : Integer
property WindowWidth : Integer
property WorldHeight : Integer
property WorldLeft : Integer
property WorldTop : Integer
property WorldWidth : Integer
property ZoomStartMode : TZoomStartMode
event OnMouseDown :
event OnGetHorzScalePoint : TGetScalePointProc
event OnGetVertScalePoint : TGetScalePointProc
event OnMouseLeave : TNotifyEvent
event OnPaint : TNotifyEvent
event OnSelectionChange : TNotifyEvent
event OnWindowChange : TNotifyEvent
event OnWorldPosChange : TPosEvent
event OnZoomMax : TNotifyEvent
event OnZoomMin : TNotifyEvent
FAutoScrollHorz : Boolean;
FAutoScrollVert : Boolean;
FBitmap : TBitmap;
FBitmapInvalid : Boolean;
FCurrentCode : TClipCode;
FCurrentPos : TDoublePoint;
FDoDrawMarkerPositions : Boolean;
FDragLineVisible : Boolean;
FDragPos : TPoint;
FDrawSelectionMode : TDrawSelectionMode;
FHighlightColor : TColor;
FHighlightedX : Integer;
FHLSample : Integer;
FHLSampleValid : Boolean;
FHorzScale : TDisplayScale;
FHorzScrollBar : TDisplayScrollBar;
FImageFileFormat : TImageFileFormat;
FInWaveformPaint : Boolean;
FMaxWindowHeight : Integer;
FMaxWindowWidth : Integer;
FMetafileCanvas : TMetafileCanvas;
FMinVertScaleWidth : Integer;
FMinWindowHeight : Integer;
FMinWindowWidth : Integer;
FMonochromeBitmap : Boolean;
FMouseOver : Boolean;
FMouseX : Integer;
FMouseY : Integer;
FOnGetHorzScalePoint : TGetScalePointProc;
FOnGetVertScalePoint : TGetScalePointProc;
FOnMouseLeave : TNotifyEvent;
FOnPaint : TNotifyEvent;
FOnSelectionChange : TNotifyEvent;
FOnWindowChange : TNotifyEvent;
FOnWorldPosChange : TPosEvent;
FOnZoomMax : TNotifyEvent;
FOnZoomMin : TNotifyEvent;
FPaintMode : TSignalPaintMode;
FPen : TPen;
FPrevWindow : TRect;
FRestoreColors : Boolean;
FSelBrush : TBrush;
FSelectionColor : TColor;
FSelectionEnd : Integer;
FSelectionStart : Integer;
FVertScale : TDisplayScale;
FVertScrollBar : TDisplayScrollBar;
FWindow : TRect;
FWindowInvalid : Boolean;
FWorld : TRect;
FXIncrement : Cardinal;
FXPos : Integer;
FYIncrement : Cardinal;
FYPos : Integer;
FZooming : Boolean;
FZoomMode : TZoomMode;
FZoomStartMode : TZoomStartMode;