mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-21 08:59:37 +01:00
TAChart: Chart drawers support setting pen width.
git-svn-id: trunk@64380 -
This commit is contained in:
parent
68f758f8e2
commit
227b974139
@ -65,7 +65,8 @@ type
|
|||||||
procedure SetBrushColor(AColor: TChartColor);
|
procedure SetBrushColor(AColor: TChartColor);
|
||||||
procedure SetBrushParams(AStyle: TFPBrushStyle; AColor: TChartColor);
|
procedure SetBrushParams(AStyle: TFPBrushStyle; AColor: TChartColor);
|
||||||
procedure SetPenColor(AColor: TChartColor);
|
procedure SetPenColor(AColor: TChartColor);
|
||||||
procedure SetPenParams(AStyle: TFPPenStyle; AColor: TChartColor);
|
procedure SetPenParams(AStyle: TFPPenStyle; AColor: TChartColor; AWidth: Integer = 1);
|
||||||
|
procedure SetPenWidth(AWidth: Integer);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
@ -293,13 +294,20 @@ begin
|
|||||||
ApplyTransparency(ChartColorToFPColor(ColorOrMono(AColor)));
|
ApplyTransparency(ChartColorToFPColor(ColorOrMono(AColor)));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TAggPasDrawer.SetPenParams(AStyle: TFPPenStyle; AColor: TChartColor);
|
procedure TAggPasDrawer.SetPenParams(AStyle: TFPPenStyle; AColor: TChartColor;
|
||||||
|
AWidth: Integer = 1);
|
||||||
begin
|
begin
|
||||||
FCanvas.Pen.Style := AStyle;
|
FCanvas.Pen.Style := AStyle;
|
||||||
|
FCanvas.Pen.Width := AWidth;
|
||||||
FCanvas.Pen.FPColor :=
|
FCanvas.Pen.FPColor :=
|
||||||
ApplyTransparency(ChartColorToFPColor(ColorOrMono(AColor)));
|
ApplyTransparency(ChartColorToFPColor(ColorOrMono(AColor)));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TAggpasDrawer.SetPenWidth(AWidth: Integer);
|
||||||
|
begin
|
||||||
|
FCanvas.Pen.Width := AWidth;
|
||||||
|
end;
|
||||||
|
|
||||||
function TAggPasDrawer.SimpleTextExtent(const AText: String): TPoint;
|
function TAggPasDrawer.SimpleTextExtent(const AText: String): TPoint;
|
||||||
begin
|
begin
|
||||||
Result := FCanvas.TextExtent(AText);
|
Result := FCanvas.TextExtent(AText);
|
||||||
|
|||||||
@ -69,7 +69,8 @@ type
|
|||||||
procedure SetBrushColor(AColor: TChartColor);
|
procedure SetBrushColor(AColor: TChartColor);
|
||||||
procedure SetBrushParams(AStyle: TFPBrushStyle; AColor: TChartColor);
|
procedure SetBrushParams(AStyle: TFPBrushStyle; AColor: TChartColor);
|
||||||
procedure SetPenColor(AColor: TChartColor);
|
procedure SetPenColor(AColor: TChartColor);
|
||||||
procedure SetPenParams(AStyle: TFPPenStyle; AColor: TChartColor);
|
procedure SetPenParams(AStyle: TFPPenStyle; AColor: TChartColor; AWidth: Integer = 1);
|
||||||
|
procedure SetPenWidth(AWidth: Integer);
|
||||||
procedure SetTransparency(ATransparency: TChartTransparency);
|
procedure SetTransparency(ATransparency: TChartTransparency);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -318,13 +319,19 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TBGRABitmapDrawer.SetPenParams(
|
procedure TBGRABitmapDrawer.SetPenParams(
|
||||||
AStyle: TFPPenStyle; AColor: TChartColor);
|
AStyle: TFPPenStyle; AColor: TChartColor; AWidth: Integer = 1);
|
||||||
begin
|
begin
|
||||||
Canvas.Pen.Style := AStyle;
|
Canvas.Pen.Style := AStyle;
|
||||||
|
Canvas.Pen.Width := AWidth;
|
||||||
Canvas.Pen.Color := ColorOrMono(AColor);
|
Canvas.Pen.Color := ColorOrMono(AColor);
|
||||||
Canvas.Pen.Opacity := Opacity;
|
Canvas.Pen.Opacity := Opacity;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TBGRABitmapDrawer.SetPenWidth(AWidth: Integer);
|
||||||
|
begin
|
||||||
|
Canvas.Pen.Width := AWidth;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TBGRABitmapDrawer.SetTransparency(ATransparency: TChartTransparency);
|
procedure TBGRABitmapDrawer.SetTransparency(ATransparency: TChartTransparency);
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
|
|||||||
@ -80,7 +80,9 @@ type
|
|||||||
procedure SetBrushColor(AColor: TChartColor);
|
procedure SetBrushColor(AColor: TChartColor);
|
||||||
procedure SetBrushParams(AStyle: TFPBrushStyle; AColor: TChartColor);
|
procedure SetBrushParams(AStyle: TFPBrushStyle; AColor: TChartColor);
|
||||||
procedure SetPenColor(AColor: TChartColor);
|
procedure SetPenColor(AColor: TChartColor);
|
||||||
procedure SetPenParams(AStyle: TFPPenStyle; AColor: TChartColor);
|
procedure SetPenParams(AStyle: TFPPenStyle; AColor: TChartColor; AWidth: Integer = 1);
|
||||||
|
procedure SetPenWidth(AWidth: Integer);
|
||||||
|
|
||||||
end experimental;
|
end experimental;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
@ -427,12 +429,18 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TFPVectorialDrawer.SetPenParams(
|
procedure TFPVectorialDrawer.SetPenParams(
|
||||||
AStyle: TFPPenStyle; AColor: TChartColor);
|
AStyle: TFPPenStyle; AColor: TChartColor; AWidth: Integer = 1);
|
||||||
begin
|
begin
|
||||||
FPenStyle := AStyle;
|
FPenStyle := AStyle;
|
||||||
|
FPenWidth := AWidth;
|
||||||
FPenColor := FChartColorToFPColorFunc(AColor);
|
FPenColor := FChartColorToFPColorFunc(AColor);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TFPVectorialDrawer.SetPenWidth(AWidth: Integer);
|
||||||
|
begin
|
||||||
|
FPenWidth := AWidth;
|
||||||
|
end;
|
||||||
|
|
||||||
function TFPVectorialDrawer.SimpleTextExtent(const AText: String): TPoint;
|
function TFPVectorialDrawer.SimpleTextExtent(const AText: String): TPoint;
|
||||||
begin
|
begin
|
||||||
if FFTFont <> nil then
|
if FFTFont <> nil then
|
||||||
|
|||||||
@ -88,7 +88,8 @@ type
|
|||||||
procedure SetBrushColor(AColor: TChartColor);
|
procedure SetBrushColor(AColor: TChartColor);
|
||||||
procedure SetBrushParams(AStyle: TFPBrushStyle; AColor: TChartColor);
|
procedure SetBrushParams(AStyle: TFPBrushStyle; AColor: TChartColor);
|
||||||
procedure SetPenColor(AColor: TChartColor);
|
procedure SetPenColor(AColor: TChartColor);
|
||||||
procedure SetPenParams(AStyle: TFPPenStyle; AColor: TChartColor);
|
procedure SetPenParams(AStyle: TFPPenStyle; AColor: TChartColor; AWidth: Integer = 1);
|
||||||
|
procedure SetPenWidth(AWidth: Integer);
|
||||||
procedure SetTransparency(ATransparency: TChartTransparency);
|
procedure SetTransparency(ATransparency: TChartTransparency);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -424,13 +425,20 @@ begin
|
|||||||
FPenColor := FChartColorToFPColorFunc(AColor);
|
FPenColor := FChartColorToFPColorFunc(AColor);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TOpenGLDrawer.SetPenParams(AStyle: TFPPenStyle; AColor: TChartColor);
|
procedure TOpenGLDrawer.SetPenParams(AStyle: TFPPenStyle; AColor: TChartColor;
|
||||||
|
AWidth: Integer = 1);
|
||||||
begin
|
begin
|
||||||
FPenStyle := AStyle;
|
FPenStyle := AStyle;
|
||||||
|
FPenWidth := AWidth;
|
||||||
FPenColor := FChartColorToFPColorFunc(AColor);
|
FPenColor := FChartColorToFPColorFunc(AColor);
|
||||||
ChartGLPenStyle(AStyle);
|
ChartGLPenStyle(AStyle);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TOpenGLDrawer.SetPenWidth(AWidth: Integer);
|
||||||
|
begin
|
||||||
|
FPenWidth := AWidth;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TOpenGLDrawer.SetTransparency(ATransparency: TChartTransparency);
|
procedure TOpenGLDrawer.SetTransparency(ATransparency: TChartTransparency);
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
|
|||||||
@ -76,7 +76,8 @@ type
|
|||||||
procedure SetBrushColor(AColor: TChartColor);
|
procedure SetBrushColor(AColor: TChartColor);
|
||||||
procedure SetBrushParams(AStyle: TFPBrushStyle; AColor: TChartColor);
|
procedure SetBrushParams(AStyle: TFPBrushStyle; AColor: TChartColor);
|
||||||
procedure SetPenColor(AColor: TChartColor);
|
procedure SetPenColor(AColor: TChartColor);
|
||||||
procedure SetPenParams(AStyle: TFPPenStyle; AColor: TChartColor);
|
procedure SetPenParams(AStyle: TFPPenStyle; AColor: TChartColor; AWidth: Integer = 1);
|
||||||
|
procedure SetPenWidth(AWidth: Integer);
|
||||||
procedure SetTransparency(ATransparency: TChartTransparency);
|
procedure SetTransparency(ATransparency: TChartTransparency);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -430,13 +431,20 @@ begin
|
|||||||
GetCanvas.Pen.Color := ColorOrMono(AColor);
|
GetCanvas.Pen.Color := ColorOrMono(AColor);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCanvasDrawer.SetPenParams(AStyle: TFPPenStyle; AColor: TChartColor);
|
procedure TCanvasDrawer.SetPenParams(AStyle: TFPPenStyle; AColor: TChartColor;
|
||||||
|
AWidth: Integer = 1);
|
||||||
begin
|
begin
|
||||||
GetCanvas.Pen.Style := AStyle;
|
GetCanvas.Pen.Style := AStyle;
|
||||||
|
GetCanvas.Pen.Width := AWidth;
|
||||||
if not FXor then
|
if not FXor then
|
||||||
GetCanvas.Pen.Color := ColorOrMono(AColor);
|
GetCanvas.Pen.Color := ColorOrMono(AColor);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TCanvasDrawer.SetPenWidth(AWidth: Integer);
|
||||||
|
begin
|
||||||
|
GetCanvas.Pen.Width := AWidth;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TCanvasDrawer.SetTransparency(ATransparency: TChartTransparency);
|
procedure TCanvasDrawer.SetTransparency(ATransparency: TChartTransparency);
|
||||||
|
|
||||||
function FillAlpha(AAlpha: Byte): Byte;
|
function FillAlpha(AAlpha: Byte): Byte;
|
||||||
|
|||||||
@ -78,7 +78,8 @@ type
|
|||||||
procedure SetBrushColor(AColor: TChartColor);
|
procedure SetBrushColor(AColor: TChartColor);
|
||||||
procedure SetBrushParams(AStyle: TFPBrushStyle; AColor: TChartColor);
|
procedure SetBrushParams(AStyle: TFPBrushStyle; AColor: TChartColor);
|
||||||
procedure SetPenColor(AColor: TChartColor);
|
procedure SetPenColor(AColor: TChartColor);
|
||||||
procedure SetPenParams(AStyle: TFPPenStyle; AColor: TChartColor);
|
procedure SetPenParams(AStyle: TFPPenStyle; AColor: TChartColor; AWidth: Integer = 1);
|
||||||
|
procedure SetPenWidth(AWidth: Integer);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
@ -336,10 +337,17 @@ begin
|
|||||||
FCanvas.Pen.FPColor := FChartColorToFPColorFunc(AColor);
|
FCanvas.Pen.FPColor := FChartColorToFPColorFunc(AColor);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TFPCanvasDrawer.SetPenParams(AStyle: TFPPenStyle; AColor: TChartColor);
|
procedure TFPCanvasDrawer.SetPenParams(AStyle: TFPPenStyle; AColor: TChartColor;
|
||||||
|
AWidth: Integer = 1);
|
||||||
begin
|
begin
|
||||||
FCanvas.Pen.Style := AStyle;
|
FCanvas.Pen.Style := AStyle;
|
||||||
FCanvas.Pen.FPColor := FChartColorToFPColorFunc(AColor);
|
FCanvas.Pen.FPColor := FChartColorToFPColorFunc(AColor);
|
||||||
|
FCanvas.Pen.Width := AWidth;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFPCanvasDrawer.SetPenWidth(AWidth: Integer);
|
||||||
|
begin
|
||||||
|
FCanvas.Pen.Width := AWidth;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TFPCanvasDrawer.SimpleTextExtent(const AText: String): TPoint;
|
function TFPCanvasDrawer.SimpleTextExtent(const AText: String): TPoint;
|
||||||
|
|||||||
@ -90,7 +90,8 @@ type
|
|||||||
procedure SetBrushColor(AColor: TChartColor);
|
procedure SetBrushColor(AColor: TChartColor);
|
||||||
procedure SetBrushParams(AStyle: TFPBrushStyle; AColor: TChartColor);
|
procedure SetBrushParams(AStyle: TFPBrushStyle; AColor: TChartColor);
|
||||||
procedure SetPenColor(AColor: TChartColor);
|
procedure SetPenColor(AColor: TChartColor);
|
||||||
procedure SetPenParams(AStyle: TFPPenStyle; AColor: TChartColor);
|
procedure SetPenParams(AStyle: TFPPenStyle; AColor: TChartColor; AWidth: Integer = 1);
|
||||||
|
procedure SetPenWidth(AWidth: Integer);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -515,10 +516,17 @@ begin
|
|||||||
FPen.FPColor := FChartColorToFPColorFunc(ColorOrMono(AColor));
|
FPen.FPColor := FChartColorToFPColorFunc(ColorOrMono(AColor));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TSVGDrawer.SetPenParams(AStyle: TFPPenStyle; AColor: TChartColor);
|
procedure TSVGDrawer.SetPenParams(AStyle: TFPPenStyle; AColor: TChartColor;
|
||||||
|
AWidth: Integer = 1);
|
||||||
begin
|
begin
|
||||||
FPen.FPColor := FChartColorToFPColorFunc(ColorOrMono(AColor));
|
FPen.FPColor := FChartColorToFPColorFunc(ColorOrMono(AColor));
|
||||||
FPen.Style := AStyle;
|
FPen.Style := AStyle;
|
||||||
|
FPen.Width := AWidth;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TSVGDrawer.SetPenWidth(AWidth: Integer);
|
||||||
|
begin
|
||||||
|
FPen.Width := AWidth;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TSVGDrawer.SimpleTextExtent(const AText: String): TPoint;
|
function TSVGDrawer.SimpleTextExtent(const AText: String): TPoint;
|
||||||
|
|||||||
@ -114,7 +114,8 @@ type
|
|||||||
procedure SetMonochromeColor(AColor: TChartColor);
|
procedure SetMonochromeColor(AColor: TChartColor);
|
||||||
procedure SetPen(APen: TFPCustomPen);
|
procedure SetPen(APen: TFPCustomPen);
|
||||||
procedure SetPenColor(AColor: TChartColor);
|
procedure SetPenColor(AColor: TChartColor);
|
||||||
procedure SetPenParams(AStyle: TFPPenStyle; AColor: TChartColor);
|
procedure SetPenParams(AStyle: TFPPenStyle; AColor: TChartColor; AWidth: Integer = 1);
|
||||||
|
procedure SetPenWidth(AWidth: Integer);
|
||||||
function GetRightToLeft: Boolean;
|
function GetRightToLeft: Boolean;
|
||||||
procedure SetRightToLeft(AValue: Boolean);
|
procedure SetRightToLeft(AValue: Boolean);
|
||||||
procedure SetTransparency(ATransparency: TChartTransparency);
|
procedure SetTransparency(ATransparency: TChartTransparency);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user