Class TDiagramDrawer

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TDiagramDrawer = class(TPersistent)

Description

This class draws the data model into a TBitmap

Hierarchy

Overview

Methods

Public constructor create;
Public function update(): TBitmap;
Public destructor destroy; override;
Public procedure SetModel(amodel: TAbstractDiagramModel; takeOwnership: boolean); overload;
Public function posToDataX(x: longint): float;
Public function posToDataY(y: longint): float;
Public function dataToPosX(const x: float): integer;
Public function dataToPosY(const y: float): integer;
Public function pixelSizeX: float;
Public function pixelSizeY: float;

Properties

Public property Diagram: TBitmap read FDiagram;
Public property valueAreaX: longint read fvalueAreaX;
Public property ValueAreaY: longint read fvalueAreaY;
Public property ValueAreaWidth: longint read FValueAreaWidth;
Public property ValueAreaHeight: longint read FValueAreaHeight;
Public property ValueAreaRight: longint read FValueAreaRight;
Public property ValueAreaBottom: longint read FValueAreaBottom;
Published property RangeMinX: float read FRangeMinX write SetRangeMinX;
Published property RangeMaxX: float read FRangeMaxX write SetRangeMaxX;
Published property RangeMinY: float read FRangeMinY write SetRangeMinY;
Published property RangeMaxY: float read FRangeMaxY write SetRangeMaxY;
Published property AutoSetRangeX: boolean read FAutoSetRangeX write SetAutoSetRangeX;
Published property AutoSetRangeY: boolean read FAutoSetRangeY write SetAutoSetRangeY;
Published property legend: TLegend read Flegend;
Published property LeftAxis: TAxis read FLAxis;
Published property RightAxis: TAxis read FRAxis;
Published property TopAxis: TAxis read FTAxis;
Published property BottomAxis: TAxis read FBAxis;
Published property HorzMidAxis: TAxis read FXMAxis;
Published property VertMidAxis: TAxis read FYMAxis;
Published property LineStyle: TLineStyle read FLineStyle write SetLineStyle;
Published property PointStyle: TPointStyle read FPointStyle write SetPointStyle;
Published property PointSize: longint read FPointSize write SetPointSize;
Published property FillGradient: TFillGradientFlags read FFillGradient write SetFillGradient ;
Published property FillStyle: TDiagramFillStyle read FFillStyle write SetFillStyle;
Published property Model: TAbstractDiagramModel read FModel write SetModel;
Published property BackColor: TColor read FBackColor write SetBackColor;
Published property DataBackColor: TColor read FDataBackColor write SetDataBackColor;
Published property ClipValues: TClipValues read FClipValues write SetClipValues;

Description

Methods

Public constructor create;
 
Public function update(): TBitmap;

Redraws the bitmap and returns it (and updates the Diagram property)

Public destructor destroy; override;
 
Public procedure SetModel(amodel: TAbstractDiagramModel; takeOwnership: boolean); overload;

Sets the model to be drawn, if takeOwnership is true, then the model is freed automatically by the drawer, otherwise you have to free it yourself

Public function posToDataX(x: longint): float;

Translate a pixel position in the bitmap to the coordinates used by the model

Public function posToDataY(y: longint): float;

Translate a pixel position in the bitmap to the coordinates used by the model

Public function dataToPosX(const x: float): integer;

Translate model coordinates to the corresponding pixel in the bitmap (rounds)

Public function dataToPosY(const y: float): integer;

Translate model coordinates to the corresponding pixel in the bitmap (rounds)

Public function pixelSizeX: float;

Returns the width of one output pixel in data coordinates

Public function pixelSizeY: float;

Returns the height of one output pixel in data coordinates

Properties

Public property Diagram: TBitmap read FDiagram;

Last drawn bitmap

Public property valueAreaX: longint read fvalueAreaX;
 
Public property ValueAreaY: longint read fvalueAreaY;
 
Public property ValueAreaWidth: longint read FValueAreaWidth;
 
Public property ValueAreaHeight: longint read FValueAreaHeight;
 
Public property ValueAreaRight: longint read FValueAreaRight;
 
Public property ValueAreaBottom: longint read FValueAreaBottom;
 
Published property RangeMinX: float read FRangeMinX write SetRangeMinX;
 
Published property RangeMaxX: float read FRangeMaxX write SetRangeMaxX;
 
Published property RangeMinY: float read FRangeMinY write SetRangeMinY;
 
Published property RangeMaxY: float read FRangeMaxY write SetRangeMaxY;
 
Published property AutoSetRangeX: boolean read FAutoSetRangeX write SetAutoSetRangeX;
 
Published property AutoSetRangeY: boolean read FAutoSetRangeY write SetAutoSetRangeY;
 
Published property legend: TLegend read Flegend;

Class for legend settings

Published property LeftAxis: TAxis read FLAxis;

Axis left from the value area

Published property RightAxis: TAxis read FRAxis;

Axis right to the value area

Published property TopAxis: TAxis read FTAxis;

Axis over the value area

Published property BottomAxis: TAxis read FBAxis;

Axis below the value area

Published property HorzMidAxis: TAxis read FXMAxis;

Axis from the left to the right side in the vertical mid of the value area (like the x-axis in an plot)

Published property VertMidAxis: TAxis read FYMAxis;

Axis from the top to the bottom side in the horizontal mid of the value area (like the x-axis in an plot)

Published property LineStyle: TLineStyle read FLineStyle write SetLineStyle;

Line style used to draw the lines (can be overridden by the model)

Published property PointStyle: TPointStyle read FPointStyle write SetPointStyle;

Point style used to draw points (can be overridden by the model)

Published property PointSize: longint read FPointSize write SetPointSize;
 
Published property FillGradient: TFillGradientFlags read FFillGradient write SetFillGradient ;
 
Published property FillStyle: TDiagramFillStyle read FFillStyle write SetFillStyle;
 
Published property Model: TAbstractDiagramModel read FModel write SetModel;
 
Published property BackColor: TColor read FBackColor write SetBackColor;

Background color around the value area

Published property DataBackColor: TColor read FDataBackColor write SetDataBackColor;

Background color of the value area

Published property ClipValues: TClipValues read FClipValues write SetClipValues;
 

Generated by PasDoc 0.11.0 on 2012-07-31 14:28:32