Class TCompressedBitmapItem

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TCompressedBitmapItem = class(TCollectionItem)

Description

TCompressedBitmapItem holds a TCompressedBitmap.

TCompressedBitmapItem is used to store bitmaps in GoPhast.

Hierarchy

Overview

Fields

Private FBitmap: TCompressedBitmap;
Private FCalculatedValues: boolean;
Private FMeasurementPoints: TMeasurementPointCollection;
Private FName: string;
Private FScaleX: double;
Private FScaleY: double;
Private FViewDirection: TViewDirection;
Private FVisible: boolean;
Private FX: double;
Private FY: double;
Private FCanShow: boolean;
Private FDisplayMessage: boolean;

Methods

Private procedure Calculate;
Private function GetScaleX: double;
Private function GetScaleY: double;
Private function GetX: double;
Private function GetY: double;
Private procedure SetBitmap(const Value: TCompressedBitmap);
Private procedure SetMeasurementPoints(const Value: TMeasurementPointCollection);
Private procedure SetViewDirection(const Value: TViewDirection);
Private procedure SetVisible(const Value: boolean);
Private function XCoord(const X: double): double;
Private function YCoord(const Y: double): double;
Public procedure Assign(Source: TPersistent); override;
Public constructor Create(Collection: TCollection); override;
Public destructor Destroy; override;
Public procedure Invalidate;
Public procedure DrawCompressedImage(Destination: TBitMap32);

Properties

Public property ScaleX: double read GetScaleX;
Public property ScaleY: double read GetScaleY;
Public property X: double read GetX;
Public property Y: double read GetY;
Public property CanShow: boolean read FCanShow write FCanShow;
Public property DisplayMessage: boolean read FDisplayMessage write FDisplayMessage;
Published property Bitmap: TCompressedBitmap read FBitmap write SetBitmap;
Published property Name: string read FName write FName;
Published property MeasurementPoints: TMeasurementPointCollection read FMeasurementPoints write SetMeasurementPoints;
Published property ViewDirection: TViewDirection read FViewDirection write SetViewDirection;
Published property Visible: boolean read FVisible write SetVisible;

Description

Fields

Private FBitmap: TCompressedBitmap;

See Bitmap.

Private FCalculatedValues: boolean;

See Calculate.

Private FMeasurementPoints: TMeasurementPointCollection;

See MeasurementPoints.

Private FName: string;

FName is the name of the bitmap.

Private FScaleX: double;

See ScaleX.

Private FScaleY: double;

See ScaleY.

Private FViewDirection: TViewDirection;

See ViewDirection.

Private FVisible: boolean;

See Visible.

Private FX: double;

See X.

Private FY: double;

See Y.

Private FCanShow: boolean;
 
Private FDisplayMessage: boolean;
 

Methods

Private procedure Calculate;

Calculate checks whether FCalculatedValues is true. If not, it calculates and stores X, Y, ScaleX, and ScaleY and sets FCalculatedValues to true. Otherwise it uses the stored values. It uses MeasurementPoints to make the calculation.

Calculate is called whenever X, Y, ScaleX, or ScaleY is read.

Private function GetScaleX: double;

See ScaleX.

Private function GetScaleY: double;

See ScaleY.

Private function GetX: double;

See X.

Private function GetY: double;

See Y.

Private procedure SetBitmap(const Value: TCompressedBitmap);

See Bitmap.

Private procedure SetMeasurementPoints(const Value: TMeasurementPointCollection);

See MeasurementPoints.

Private procedure SetViewDirection(const Value: TViewDirection);

See ViewDirection.

Private procedure SetVisible(const Value: boolean);

See Visible.

Private function XCoord(const X: double): double;

XCoord returns the pixel X-coordinate corresponding to X.

Private function YCoord(const Y: double): double;

YCoord returns the pixel Y-coordinate corresponding to Y.

Public procedure Assign(Source: TPersistent); override;

Assign copies the published properties from Source.

Public constructor Create(Collection: TCollection); override;

Create creates and initializes an instance of TCompressedBitmapItem.

Public destructor Destroy; override;

Destroy destroys the current instance of TCompressedBitmapItem. Do not call Destroy directly. Call Free instead.

Public procedure Invalidate;

Invalidate causes X, Y, ScaleX, and ScaleY to be recalculated the next time they are read.

Public procedure DrawCompressedImage(Destination: TBitMap32);
 

Properties

Public property ScaleX: double read GetScaleX;

ScaleX is the ratio of the real-world scale to the pixel-scale in the X direction.

Public property ScaleY: double read GetScaleY;

ScaleY is the ratio of the real-world scale to the pixel-scale in the Y direction.

Public property X: double read GetX;

X is the position where the left edge of the bitmap should be drawn on the appropriate Image32 as determined by ViewDirection.

Public property Y: double read GetY;

Y is the position where the top edge of the bitmap should be drawn on the appropriate Image32 as determined by ViewDirection.

Public property CanShow: boolean read FCanShow write FCanShow;
 
Public property DisplayMessage: boolean read FDisplayMessage write FDisplayMessage;
 
Published property Bitmap: TCompressedBitmap read FBitmap write SetBitmap;

Bitmap is the bitmap that will be drawn.

Published property Name: string read FName write FName;

Name is the name used to refer to the bitmap by the user.

Published property MeasurementPoints: TMeasurementPointCollection read FMeasurementPoints write SetMeasurementPoints;

MeasurementPoints is the collection of TMeasurementPointItems that determine how the pixels relate to real-world coordinates.

Published property ViewDirection: TViewDirection read FViewDirection write SetViewDirection;

ViewDirection determines whether the bitmap should be viewed on the top, front, or side view of the model.

Published property Visible: boolean read FVisible write SetVisible;

Visible determines whether or not the bitmap is visible.


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