mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-05-14 07:22:41 +02:00
TAChart: Use TChartLegendItems instead of TObjectList
git-svn-id: trunk@31344 -
This commit is contained in:
parent
c1fdd2bbe1
commit
67e4a0d07f
@ -5,7 +5,7 @@ unit main;
|
||||
interface
|
||||
|
||||
uses
|
||||
Contnrs, Controls, ExtCtrls, Graphics, Spin, StdCtrls, Forms,
|
||||
Controls, ExtCtrls, Graphics, Spin, StdCtrls, Forms,
|
||||
TAGraph, TASeries, TASources, Classes, TALegend, TAFuncSeries;
|
||||
|
||||
type
|
||||
@ -47,7 +47,7 @@ type
|
||||
procedure seSpacingChange(Sender: TObject);
|
||||
procedure seSymbolWidthChange(Sender: TObject);
|
||||
private
|
||||
FItems: TObjectList;
|
||||
FItems: TChartLegendItems;
|
||||
end;
|
||||
|
||||
var
|
||||
|
@ -279,7 +279,7 @@ type
|
||||
procedure DrawLegendOn(ACanvas: TCanvas; var ARect: TRect);
|
||||
procedure EnableRedrawing;
|
||||
function GetFullExtent: TDoubleRect;
|
||||
function GetLegendItems: TObjectList;
|
||||
function GetLegendItems: TChartLegendItems;
|
||||
procedure PaintOnAuxCanvas(ACanvas: TCanvas; ARect: TRect);
|
||||
procedure PaintOnCanvas(ACanvas: TCanvas; ARect: TRect);
|
||||
procedure SaveToBitmapFile(const AFileName: String); inline;
|
||||
@ -924,7 +924,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
function TChart.GetLegendItems: TObjectList;
|
||||
function TChart.GetLegendItems: TChartLegendItems;
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
|
@ -142,10 +142,12 @@ type
|
||||
public
|
||||
procedure Assign(Source: TPersistent); override;
|
||||
procedure Draw(
|
||||
ADrawer: IChartDrawer; AItems: TObjectList; const ABounds: TRect);
|
||||
function MeasureItem(ADrawer: IChartDrawer; AItems: TObjectList): TPoint;
|
||||
ADrawer: IChartDrawer; AItems: TChartLegendItems; const ABounds: TRect);
|
||||
function MeasureItem(
|
||||
ADrawer: IChartDrawer; AItems: TChartLegendItems): TPoint;
|
||||
function Prepare(
|
||||
ADrawer: IChartDrawer; AItems: TObjectList; var AClipRect: TRect): TRect;
|
||||
ADrawer: IChartDrawer; AItems: TChartLegendItems;
|
||||
var AClipRect: TRect): TRect;
|
||||
// Not includes the margins around item.
|
||||
published
|
||||
property Alignment: TLegendAlignment
|
||||
@ -355,7 +357,7 @@ begin
|
||||
end;
|
||||
|
||||
procedure TChartLegend.Draw(
|
||||
ADrawer: IChartDrawer; AItems: TObjectList; const ABounds: TRect);
|
||||
ADrawer: IChartDrawer; AItems: TChartLegendItems; const ABounds: TRect);
|
||||
var
|
||||
i, itemHeight: Integer;
|
||||
r: TRect;
|
||||
@ -394,7 +396,7 @@ begin
|
||||
end;
|
||||
|
||||
function TChartLegend.MeasureItem(
|
||||
ADrawer: IChartDrawer; AItems: TObjectList): TPoint;
|
||||
ADrawer: IChartDrawer; AItems: TChartLegendItems): TPoint;
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
@ -410,7 +412,7 @@ begin
|
||||
end;
|
||||
|
||||
function TChartLegend.Prepare(
|
||||
ADrawer: IChartDrawer; AItems: TObjectList; var AClipRect: TRect): TRect;
|
||||
ADrawer: IChartDrawer; AItems: TChartLegendItems; var AClipRect: TRect): TRect;
|
||||
var
|
||||
x, y: Integer;
|
||||
sidebar, legendSize: TPoint;
|
||||
|
Loading…
Reference in New Issue
Block a user