Class TBGRAOriginalEditor

Unit

Declaration

type TBGRAOriginalEditor = class(TObject)

Description

Graphical editor for an original

Hierarchy

Overview

Fields

Protected FClickPointHandlers: TClickPointHandlers;
Protected FConsecutiveClickCount: integer;
Protected FCurHoverPoint: integer;
Protected FDoubleClickTime: TDateTime;
Protected FGridActive: boolean;
Protected FGridMatrix: TAffineMatrix;
Protected FGridMatrixInverse: TAffineMatrix;
Protected FHoverPointHandlers: THoverPointHandlers;
Protected FLastClickPos: TPointF;
Protected FLastClickTime: TDateTime;
Protected FMatrix: TAffineMatrix;
Protected FMatrixInverse: TAffineMatrix;
Protected FMovingRightButton: boolean;
Protected FPointCoordDelta: TPointF;
Protected FPointMoving: integer;
Protected FPoints: array of record Origin, Coord: TPointF; OnMove, OnAlternateMove: TOriginalMovePointEvent; RightButton, Highlighted: boolean; SnapToPoint: integer; HitBox: TAffineBox; end;
Protected FPointSize: single;
Protected FPointWasMoved: boolean;
Protected FPolylines: array of record Coords: array of TPointF; Closed: boolean; Style: TBGRAOriginalPolylineStyle; BackColor: TBGRAPixel; end;
Protected FPrevMousePos: TPointF;
Protected FStartMoveHandlers: TStartMoveHandlers;

Methods

Public constructor Create;
Public destructor Destroy; override;
Public function AddArrow(const AOrigin, AEndCoord: TPointF; AOnMoveEnd: TOriginalMovePointEvent; ARightButton: boolean = false): integer;
Public function AddFixedPoint(const ACoord: TPointF; ARightButton: boolean = false): integer;
Public function AddPoint(const ACoord: TPointF; AOnMove: TOriginalMovePointEvent; ARightButton: boolean = false; ASnapToPoint: integer = -1): integer;
Public function AddPolyline(const ACoords: array of TPointF; AClosed: boolean; AStyle: TBGRAOriginalPolylineStyle; ABackColor: TBGRAPixel): integer; overload;
Public function AddPolyline(const ACoords: array of TPointF; AClosed: boolean; AStyle: TBGRAOriginalPolylineStyle): integer; overload;
Public function GetPointAt(const ACoord: TPointF; ARightButton: boolean): integer;
Public function GetRenderBounds(const ALayoutRect: TRect): TRect; virtual;
Public function OriginalCoordToView(const AImageCoord: TPointF): TPointF;
Public function Render(ADest: TBGRABitmap; const ALayoutRect: TRect): TRect; virtual;
Public function SnapToGrid(const ACoord: TPointF; AIsViewCoord: boolean): TPointF;
Public function ViewCoordToOriginal(const AViewCoord: TPointF): TPointF;
Protected function GetFixedShiftForButton(AShift: TShiftState; ARightDown: boolean): TShiftState;
Protected function GetMoveCursor(APointIndex: integer): TOriginalEditorCursor; virtual;
Protected function GetRenderArrowBounds(AOrigin, AEndCoord: TPointF): TRect; virtual;
Protected function GetRenderPointBounds(ACoord: TPointF; AHighlighted: boolean): TRect; virtual;
Protected function GetRenderPolygonBounds(ACoords: array of TPointF): TRect;
Protected function RenderArrow(ADest: TBGRABitmap; AOrigin, AEndCoord: TPointF): TRect; virtual;
Protected function RenderPoint(ADest: TBGRABitmap; ACoord: TPointF; AAlternateColor: boolean; AHighlighted: boolean): TRect; virtual;
Protected function RenderPolygon(ADest: TBGRABitmap; ACoords: array of TPointF; AClosed: boolean; AStyle: TBGRAOriginalPolylineStyle; ABackColor: TBGRAPixel): TRect; virtual;
Public procedure AddClickPointHandler(AOnClickPoint: TOriginalClickPointEvent);
Public procedure AddHoverPointHandler(AOnHoverPoint: TOriginalHoverPointEvent);
Public procedure AddPointAlternateMove(AIndex: integer; AOnAlternateMove: TOriginalMovePointEvent);
Public procedure AddStartMoveHandler(AOnStartMove: TOriginalStartMovePointEvent);
Public procedure Clear; virtual;
Public procedure KeyDown(Shift: TShiftState; Key: TSpecialKey; out AHandled: boolean); virtual;
Public procedure KeyPress(UTF8Key: string; out AHandled: boolean); virtual;
Public procedure KeyUp(Shift: TShiftState; Key: TSpecialKey; out AHandled: boolean); virtual;
Public procedure MouseDown(RightButton: boolean; Shift: TShiftState; ViewX, ViewY: single; out ACursor: TOriginalEditorCursor; out AHandled: boolean); virtual;
Public procedure MouseMove(Shift: TShiftState; ViewX, ViewY: single; out ACursor: TOriginalEditorCursor; out AHandled: boolean); virtual;
Public procedure MouseUp(RightButton: boolean; Shift: TShiftState; ViewX, ViewY: single; out ACursor: TOriginalEditorCursor; out AHandled: boolean); virtual;
Public procedure SetHitBox(AIndex: integer; AHitBox: TAffineBox);
Protected procedure SetGridActive(AValue: boolean);
Protected procedure SetGridMatrix(AValue: TAffineMatrix);
Protected procedure SetMatrix(AValue: TAffineMatrix);

Properties

Public property ConsecutiveClickCount: integer read FConsecutiveClickCount;
Public property Focused: boolean read FFocused write SetFocused;
Public property GridActive: boolean read FGridActive write SetGridActive;
Public property GridMatrix: TAffineMatrix read FGridMatrix write SetGridMatrix;
Public property IsMovingPoint: boolean read GetIsMovingPoint;
Public property Matrix: TAffineMatrix read FMatrix write SetMatrix;
Public property OnFocusChanged: TNotifyEvent read FOnFocusChanged write FOnFocusChanged;
Public property PointCoord[AIndex: integer]: TPointF read GetPointCoord;
Public property PointCount: integer read GetPointCount;
Public property PointHighlighted[AIndex: integer]: boolean read GetPointHighlighted write SetPointHighlighted;
Public property PointSize: single read FPointSize write FPointSize;

Description

Fields

Protected FClickPointHandlers: TClickPointHandlers;

This item has no description.

Protected FConsecutiveClickCount: integer;

This item has no description.

Protected FCurHoverPoint: integer;

This item has no description.

Protected FDoubleClickTime: TDateTime;

This item has no description.

Protected FGridActive: boolean;

grid matrix in original coord

Protected FGridMatrix: TAffineMatrix;

view matrix from original coord

Protected FGridMatrixInverse: TAffineMatrix;

view matrix from original coord

Protected FHoverPointHandlers: THoverPointHandlers;

This item has no description.

Protected FLastClickPos: TPointF;

This item has no description.

Protected FLastClickTime: TDateTime;

This item has no description.

Protected FMatrix: TAffineMatrix;

This item has no description.

Protected FMatrixInverse: TAffineMatrix;

This item has no description.

Protected FMovingRightButton: boolean;

This item has no description.

Protected FPointCoordDelta: TPointF;

This item has no description.

Protected FPointMoving: integer;

This item has no description.

Protected FPoints: array of record Origin, Coord: TPointF; OnMove, OnAlternateMove: TOriginalMovePointEvent; RightButton, Highlighted: boolean; SnapToPoint: integer; HitBox: TAffineBox; end;

This item has no description.

Protected FPointSize: single;

This item has no description.

Protected FPointWasMoved: boolean;

This item has no description.

Protected FPolylines: array of record Coords: array of TPointF; Closed: boolean; Style: TBGRAOriginalPolylineStyle; BackColor: TBGRAPixel; end;

This item has no description.

Protected FPrevMousePos: TPointF;

This item has no description.

Protected FStartMoveHandlers: TStartMoveHandlers;

This item has no description.

Methods

Public constructor Create;

This item has no description.

Public destructor Destroy; override;

This item has no description.

Public function AddArrow(const AOrigin, AEndCoord: TPointF; AOnMoveEnd: TOriginalMovePointEvent; ARightButton: boolean = false): integer;

This item has no description.

Public function AddFixedPoint(const ACoord: TPointF; ARightButton: boolean = false): integer;

This item has no description.

Public function AddPoint(const ACoord: TPointF; AOnMove: TOriginalMovePointEvent; ARightButton: boolean = false; ASnapToPoint: integer = -1): integer;

This item has no description.

Public function AddPolyline(const ACoords: array of TPointF; AClosed: boolean; AStyle: TBGRAOriginalPolylineStyle; ABackColor: TBGRAPixel): integer; overload;

This item has no description.

Public function AddPolyline(const ACoords: array of TPointF; AClosed: boolean; AStyle: TBGRAOriginalPolylineStyle): integer; overload;

This item has no description.

Public function GetPointAt(const ACoord: TPointF; ARightButton: boolean): integer;

This item has no description.

Public function GetRenderBounds(const ALayoutRect: TRect): TRect; virtual;

This item has no description.

Public function OriginalCoordToView(const AImageCoord: TPointF): TPointF;

This item has no description.

Public function Render(ADest: TBGRABitmap; const ALayoutRect: TRect): TRect; virtual;

This item has no description.

Public function SnapToGrid(const ACoord: TPointF; AIsViewCoord: boolean): TPointF;

This item has no description.

Public function ViewCoordToOriginal(const AViewCoord: TPointF): TPointF;

This item has no description.

Protected function GetFixedShiftForButton(AShift: TShiftState; ARightDown: boolean): TShiftState;

This item has no description.

Protected function GetMoveCursor(APointIndex: integer): TOriginalEditorCursor; virtual;

This item has no description.

Protected function GetRenderArrowBounds(AOrigin, AEndCoord: TPointF): TRect; virtual;

This item has no description.

Protected function GetRenderPointBounds(ACoord: TPointF; AHighlighted: boolean): TRect; virtual;

This item has no description.

Protected function GetRenderPolygonBounds(ACoords: array of TPointF): TRect;

This item has no description.

Protected function RenderArrow(ADest: TBGRABitmap; AOrigin, AEndCoord: TPointF): TRect; virtual;

This item has no description.

Protected function RenderPoint(ADest: TBGRABitmap; ACoord: TPointF; AAlternateColor: boolean; AHighlighted: boolean): TRect; virtual;

This item has no description.

Protected function RenderPolygon(ADest: TBGRABitmap; ACoords: array of TPointF; AClosed: boolean; AStyle: TBGRAOriginalPolylineStyle; ABackColor: TBGRAPixel): TRect; virtual;

This item has no description.

Public procedure AddClickPointHandler(AOnClickPoint: TOriginalClickPointEvent);

This item has no description.

Public procedure AddHoverPointHandler(AOnHoverPoint: TOriginalHoverPointEvent);

This item has no description.

Public procedure AddPointAlternateMove(AIndex: integer; AOnAlternateMove: TOriginalMovePointEvent);

This item has no description.

Public procedure AddStartMoveHandler(AOnStartMove: TOriginalStartMovePointEvent);

This item has no description.

Public procedure Clear; virtual;

This item has no description.

Public procedure KeyDown(Shift: TShiftState; Key: TSpecialKey; out AHandled: boolean); virtual;

This item has no description.

Public procedure KeyPress(UTF8Key: string; out AHandled: boolean); virtual;

This item has no description.

Public procedure KeyUp(Shift: TShiftState; Key: TSpecialKey; out AHandled: boolean); virtual;

This item has no description.

Public procedure MouseDown(RightButton: boolean; Shift: TShiftState; ViewX, ViewY: single; out ACursor: TOriginalEditorCursor; out AHandled: boolean); virtual;

This item has no description.

Public procedure MouseMove(Shift: TShiftState; ViewX, ViewY: single; out ACursor: TOriginalEditorCursor; out AHandled: boolean); virtual;

This item has no description.

Public procedure MouseUp(RightButton: boolean; Shift: TShiftState; ViewX, ViewY: single; out ACursor: TOriginalEditorCursor; out AHandled: boolean); virtual;

This item has no description.

Public procedure SetHitBox(AIndex: integer; AHitBox: TAffineBox);

This item has no description.

Protected procedure SetGridActive(AValue: boolean);

This item has no description.

Protected procedure SetGridMatrix(AValue: TAffineMatrix);

This item has no description.

Protected procedure SetMatrix(AValue: TAffineMatrix);

This item has no description.

Properties

Public property ConsecutiveClickCount: integer read FConsecutiveClickCount;

This item has no description.

Public property Focused: boolean read FFocused write SetFocused;

This item has no description.

Public property GridActive: boolean read FGridActive write SetGridActive;

This item has no description.

Public property GridMatrix: TAffineMatrix read FGridMatrix write SetGridMatrix;

This item has no description.

Public property IsMovingPoint: boolean read GetIsMovingPoint;

This item has no description.

Public property Matrix: TAffineMatrix read FMatrix write SetMatrix;

This item has no description.

Public property OnFocusChanged: TNotifyEvent read FOnFocusChanged write FOnFocusChanged;

This item has no description.

Public property PointCoord[AIndex: integer]: TPointF read GetPointCoord;

This item has no description.

Public property PointCount: integer read GetPointCount;

This item has no description.

Public property PointHighlighted[AIndex: integer]: boolean read GetPointHighlighted write SetPointHighlighted;

This item has no description.

Public property PointSize: single read FPointSize write FPointSize;

This item has no description.