Class TfrmImportBitmap

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TfrmImportBitmap = class(TfrmCustomGoPhast)

Description

TfrmImportBitmap is used to help import or edit bitmaps in GoPhast.

See TfrmGoPhast.miImportBitmapClick, TfrmGoPhast.miEditBitmapsClick, and TfrmSelectImage.btnOKClick.

Hierarchy

Overview

Fields

Implicit btnCancel: TBitBtn;
Implicit btnHelp: TBitBtn;
Implicit btnImportWorldFile: TButton;
Implicit btnOK: TBitBtn;
Implicit btnSelectImage: TButton;
Implicit cbVisible: TCheckBox;
Implicit edName: TEdit;
Implicit lblName: TLabel;
Implicit odWorldFiled: TOpenDialog;
Implicit OpenDialogBitmap: TOpenDialog;
Implicit pnlBottom: TPanel;
Implicit rgViewDirection: TRadioGroup;
Implicit Splitter1: TSplitter;
Implicit dgPoints: TRbwDataGrid4;
Implicit seNumRows: TJvSpinEdit;
Implicit lblNumRows: TLabel;
Implicit GridPanel1: TGridPanel;
Implicit sbAddRow: TSpeedButton;
Implicit sbInsertRow: TSpeedButton;
Implicit sbDeleteRow: TSpeedButton;
Implicit ScrollBox1: TScrollBox;
Implicit ZoomBox: TQRbwZoomBox2;
Private FBitMap: TBitmap;
Private FBitmapItem: TCompressedBitmapItem;
Private FImageFileName: String;

Methods

Implicit procedure btnImportWorldFileClick(Sender: TObject);
Implicit procedure btnOKClick(Sender: TObject);
Implicit procedure btnSelectImageClick(Sender: TObject);
Implicit procedure dgPointsExit(Sender: TObject);
Implicit procedure dgPointsSetEditText(Sender: TObject; ACol, ARow: Integer; const Value: String);
Implicit procedure FormCreate(Sender: TObject); override;
Implicit procedure FormDestroy(Sender: TObject); override;
Implicit procedure rgViewDirectionClick(Sender: TObject);
Implicit procedure ZoomBoxImage32MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer; Layer: TCustomLayer);
Implicit procedure seNumRowsChange(Sender: TObject);
Implicit procedure sbAddRowClick(Sender: TObject);
Implicit procedure sbInsertRowClick(Sender: TObject);
Implicit procedure sbDeleteRowClick(Sender: TObject);
Implicit procedure dgPointsEndUpdate(Sender: TObject);
Implicit procedure FormShow(Sender: TObject);
Private procedure EnableOKButton;
Private procedure ImportWorldFile(const FileName: string);
Private procedure LabelColumns;
Private procedure NumberRows;
Private procedure SetData;
Private procedure DrawPointsOnBitMap32(Sender: TObject; Buffer: TBitmap32);
Public procedure AddPoint(const PixelX, PixelY: integer; const RealX, RealY: double);
Public procedure GetData(ABitmapItem: TCompressedBitmapItem);

Description

Fields

Implicit btnCancel: TBitBtn;

btnCancel: TBitBtn; Clicking btnCancel closes TfrmImportBitmap without changing anything.

Implicit btnHelp: TBitBtn;

btnHelp: TBitBtn; Clicking btnHelp displays help on TfrmImportBitmap.

Implicit btnImportWorldFile: TButton;

btnImportWorldFile is used to import ESRI *.wld files. See http://support.esri.com/index.cfm?fa=knowledgebase.techarticles.articleShow&d=16106

The basic format is

pixel-x,pixel-y real-world-x,real-world-y

  • There is a space between each pair of coordinates.

  • There is a comma (with no space) separating the X and X coordinates of each pair.

  • There are two such points

Implicit btnOK: TBitBtn;

btnOK: TBitBtn; See btnOKClick.

Implicit btnSelectImage: TButton;

btnSelectImage: TButton; See btnSelectImageClick.

Implicit cbVisible: TCheckBox;

cbVisible: TCheckBox; cbVisible determines whether or not a bitmap will be visible or not.

Implicit edName: TEdit;

edName: TEdit; edName holds the name for the bitmap.

Implicit lblName: TLabel;

lblName: TLabel; lblName displays "Name".

Implicit odWorldFiled: TOpenDialog;

odWorldFiled is used to select a .wld file. .

See also
btnImportWorldFile
btnImportWorldFile is used to import ESRI *.wld files.
Implicit OpenDialogBitmap: TOpenDialog;

OpenDialogBitmap: TOpenDialog; OpenDialogBitmap is used to select the bitmap to import.

Implicit pnlBottom: TPanel;

pnlBottom: TPanel; pnlBottom holds the buttons and other controls at the bottom of TfrmImportBitmap.

Implicit rgViewDirection: TRadioGroup;

rgViewDirection: TRadioGroup; rgViewDirection determines whether the bitmap is to be displayed on the top, front, or side view of the model.

Implicit Splitter1: TSplitter;

Splitter1: TSplitter; Splitter1 is used to resize the relative areas of dgPoints and ZoomBox.

Implicit dgPoints: TRbwDataGrid4;
 
Implicit seNumRows: TJvSpinEdit;
 
Implicit lblNumRows: TLabel;
 
Implicit GridPanel1: TGridPanel;
 
Implicit sbAddRow: TSpeedButton;
 
Implicit sbInsertRow: TSpeedButton;
 
Implicit sbDeleteRow: TSpeedButton;
 
Implicit ScrollBox1: TScrollBox;
 
Implicit ZoomBox: TQRbwZoomBox2;
 
Private FBitMap: TBitmap;

FBitMap is the bitmap that is being imported or edited.

Private FBitmapItem: TCompressedBitmapItem;

FBitmapItem: TCompressedBitmapItem; FBitmapItem is used to store FBitMap in GoPhast.

Private FImageFileName: String;
 

Methods

Implicit procedure btnImportWorldFileClick(Sender: TObject);

btnImportWorldFileClick imports a .wld file. .

See also
btnImportWorldFile
btnImportWorldFile is used to import ESRI *.wld files.
Implicit procedure btnOKClick(Sender: TObject);

Clicking btnOKClick causes the bitmap that is being dealt with to either be imported into GoPhast or its properties to be edited.

Implicit procedure btnSelectImageClick(Sender: TObject);

btnSelectImageClick uses OpenDialogBitmap to select a bitmap which is then read into FBitMap.

Implicit procedure dgPointsExit(Sender: TObject);

dgPointsExit causes ZoomBox to be redrawn and enables or disables btnOK. See DrawPointsOnBitMap32.

Implicit procedure dgPointsSetEditText(Sender: TObject; ACol, ARow: Integer; const Value: String);

dgPointsSetEditText causes ZoomBox to be redrawn and enables or disables btnOK. See DrawPointsOnBitMap32.

Implicit procedure FormCreate(Sender: TObject); override;

FormCreate initializes TfrmImportBitmap.

Implicit procedure FormDestroy(Sender: TObject); override;

FormDestroy destroys FBitMap.

Implicit procedure rgViewDirectionClick(Sender: TObject);

rgViewDirectionClick calls LabelColumns.

Implicit procedure ZoomBoxImage32MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer; Layer: TCustomLayer);
 
Implicit procedure seNumRowsChange(Sender: TObject);
 
Implicit procedure sbAddRowClick(Sender: TObject);
 
Implicit procedure sbInsertRowClick(Sender: TObject);
 
Implicit procedure sbDeleteRowClick(Sender: TObject);
 
Implicit procedure dgPointsEndUpdate(Sender: TObject);
 
Implicit procedure FormShow(Sender: TObject);
 
Private procedure EnableOKButton;

EnableOKButton enables or disables btnOK depending on whether or not an image has been selected and enough points have been specified.

Private procedure ImportWorldFile(const FileName: string);

ImportWorldFile imports a .wld file. .

See also
btnImportWorldFile
btnImportWorldFile is used to import ESRI *.wld files.
Private procedure LabelColumns;

LabelColumns labels the columns in dgPoints depending on the direction from which the bitmap will be viewed. See rgViewDirection.

Private procedure NumberRows;

NumberRows numbers the rows in dgPoints.

Private procedure SetData;

SetData stores FBitMap in a new or existing FBitmapItem along with the associated coordinates of pixels and real-world coordinates.

Private procedure DrawPointsOnBitMap32(Sender: TObject; Buffer: TBitmap32);
 
Public procedure AddPoint(const PixelX, PixelY: integer; const RealX, RealY: double);

AddPoint adds a point to dgPoints.

Public procedure GetData(ABitmapItem: TCompressedBitmapItem);

GetData is called when editing a bitmap to retrieve data from ABitmapItem. GetData is not called when importing a bitmap.


Generated by PasDoc 0.12.1 on 2013-05-13 15:41:37