mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-20 12:19:31 +02:00
Merged revision(s) 51266 #a9f558b56b, 51307 #dde0721065 from trunk:
TAChart: Add "ResetFont" to drawing interface to fix issue #27163 without interfering with nogui widgetset. ........ TAChart: Add missing "ResetFont" for TAggpasDrawer forgotten in r51266 #a9f558b56b ........ git-svn-id: branches/fixes_1_6@51327 -
This commit is contained in:
parent
61158d5456
commit
915e906be0
@ -56,6 +56,7 @@ type
|
||||
AStartAngle16Deg, AAngleLength16Deg: Integer);
|
||||
procedure Rectangle(const ARect: TRect);
|
||||
procedure Rectangle(AX1, AY1, AX2, AY2: Integer);
|
||||
procedure ResetFont;
|
||||
procedure SetBrushColor(AColor: TChartColor);
|
||||
procedure SetBrushParams(AStyle: TFPBrushStyle; AColor: TChartColor);
|
||||
procedure SetPenParams(AStyle: TFPPenStyle; AColor: TChartColor);
|
||||
@ -196,6 +197,11 @@ begin
|
||||
FCanvas.Rectangle(ARect);
|
||||
end;
|
||||
|
||||
procedure TAggPasDrawer.ResetFont;
|
||||
begin
|
||||
FCanvas.Font.Orientation := 0;
|
||||
end;
|
||||
|
||||
procedure TAggPasDrawer.SetBrush(ABrush: TFPCustomBrush);
|
||||
begin
|
||||
with FCanvas.Brush do begin
|
||||
|
@ -60,6 +60,7 @@ type
|
||||
AStartAngle16Deg, AAngleLength16Deg: Integer);
|
||||
procedure Rectangle(const ARect: TRect);
|
||||
procedure Rectangle(AX1, AY1, AX2, AY2: Integer);
|
||||
procedure ResetFont;
|
||||
procedure SetBrushColor(AColor: TChartColor);
|
||||
procedure SetBrushParams(AStyle: TFPBrushStyle; AColor: TChartColor);
|
||||
procedure SetPenParams(AStyle: TFPPenStyle; AColor: TChartColor);
|
||||
@ -214,6 +215,11 @@ begin
|
||||
Rectangle(Left, Top, Right, Bottom)
|
||||
end;
|
||||
|
||||
procedure TBGRABitmapDrawer.ResetFont;
|
||||
begin
|
||||
Canvas.Font.Orientation := 0;
|
||||
end;
|
||||
|
||||
procedure TBGRABitmapDrawer.SetAntialiasingMode(AValue: TChartAntialiasingMode);
|
||||
begin
|
||||
Canvas.AntialiasingMode := TAntialiasingMode(AValue);
|
||||
|
@ -65,6 +65,7 @@ type
|
||||
AStartAngle16Deg, AAngleLength16Deg: Integer);
|
||||
procedure Rectangle(const ARect: TRect);
|
||||
procedure Rectangle(AX1, AY1, AX2, AY2: Integer);
|
||||
procedure ResetFont;
|
||||
procedure SetAntialiasingMode(AValue: TChartAntialiasingMode);
|
||||
procedure SetBrushColor(AColor: TChartColor);
|
||||
procedure SetBrushParams(AStyle: TFPBrushStyle; AColor: TChartColor);
|
||||
@ -264,6 +265,11 @@ begin
|
||||
GetCanvas.Rectangle(ARect);
|
||||
end;
|
||||
|
||||
procedure TCanvasDrawer.ResetFont;
|
||||
begin
|
||||
GetCanvas.Font.Orientation := 0;
|
||||
end;
|
||||
|
||||
procedure TCanvasDrawer.SetAntialiasingMode(AValue: TChartAntialiasingMode);
|
||||
begin
|
||||
GetCanvas.AntialiasingMode := TAntialiasingMode(AValue);
|
||||
|
@ -65,6 +65,7 @@ type
|
||||
AStartAngle16Deg, AAngleLength16Deg: Integer);
|
||||
procedure Rectangle(const ARect: TRect);
|
||||
procedure Rectangle(AX1, AY1, AX2, AY2: Integer);
|
||||
procedure ResetFont;
|
||||
procedure SetBrushColor(AColor: TChartColor);
|
||||
procedure SetBrushParams(AStyle: TFPBrushStyle; AColor: TChartColor);
|
||||
procedure SetPenParams(AStyle: TFPPenStyle; AColor: TChartColor);
|
||||
@ -231,6 +232,11 @@ begin
|
||||
FCanvas.Rectangle(ARect);
|
||||
end;
|
||||
|
||||
procedure TFPCanvasDrawer.ResetFont;
|
||||
begin
|
||||
FCanvas.Font.Orientation := 0;
|
||||
end;
|
||||
|
||||
procedure TFPCanvasDrawer.SetBrush(ABrush: TFPCustomBrush);
|
||||
begin
|
||||
AssignFPCanvasHelper(FCanvas.Brush, ABrush);
|
||||
|
@ -68,6 +68,7 @@ type
|
||||
AStartAngle16Deg, AAngleLength16Deg: Integer);
|
||||
procedure Rectangle(const ARect: TRect);
|
||||
procedure Rectangle(AX1, AY1, AX2, AY2: Integer);
|
||||
procedure ResetFont;
|
||||
procedure SetBrushColor(AColor: TChartColor);
|
||||
procedure SetBrushParams(AStyle: TFPBrushStyle; AColor: TChartColor);
|
||||
procedure SetPenParams(AStyle: TFPPenStyle; AColor: TChartColor);
|
||||
@ -303,6 +304,11 @@ begin
|
||||
Rectangle(Left, Top, Right, Bottom);
|
||||
end;
|
||||
|
||||
procedure TFPVectorialDrawer.ResetFont;
|
||||
begin
|
||||
FFont.Orientation := 0;
|
||||
end;
|
||||
|
||||
procedure TFPVectorialDrawer.SetBrush(ABrush: TFPCustomBrush);
|
||||
begin
|
||||
if ABrush is TBrush then
|
||||
|
@ -61,6 +61,7 @@ type
|
||||
AStartAngle16Deg, AAngleLength16Deg: Integer);
|
||||
procedure Rectangle(const ARect: TRect);
|
||||
procedure Rectangle(AX1, AY1, AX2, AY2: Integer);
|
||||
procedure ResetFont;
|
||||
procedure SetAntialiasingMode(AValue: TChartAntialiasingMode);
|
||||
procedure SetBrushColor(AColor: TChartColor);
|
||||
procedure SetBrushParams(AStyle: TFPBrushStyle; AColor: TChartColor);
|
||||
@ -254,6 +255,10 @@ begin
|
||||
Rectangle(ARect.Left, ARect.Top, ARect.Right, ARect.Bottom);
|
||||
end;
|
||||
|
||||
procedure TOpenGLDrawer.ResetFont;
|
||||
begin
|
||||
end;
|
||||
|
||||
procedure TOpenGLDrawer.SetAntialiasingMode(AValue: TChartAntialiasingMode);
|
||||
begin
|
||||
case AValue of
|
||||
|
@ -89,6 +89,7 @@ type
|
||||
AStartAngle16Deg, AAngleLength16Deg: Integer);
|
||||
procedure Rectangle(const ARect: TRect);
|
||||
procedure Rectangle(AX1, AY1, AX2, AY2: Integer);
|
||||
procedure ResetFont;
|
||||
procedure SetAntialiasingMode(AValue: TChartAntialiasingMode);
|
||||
procedure SetBrushColor(AColor: TChartColor);
|
||||
procedure SetBrushParams(AStyle: TFPBrushStyle; AColor: TChartColor);
|
||||
@ -378,6 +379,11 @@ begin
|
||||
Rectangle(Left, Top, Right, Bottom);
|
||||
end;
|
||||
|
||||
procedure TSVGDrawer.ResetFont;
|
||||
begin
|
||||
FFont.Orientation := 0;
|
||||
end;
|
||||
|
||||
procedure TSVGDrawer.SetAntialiasingMode(AValue: TChartAntialiasingMode);
|
||||
const
|
||||
AM_TO_CSS: array [amOn .. amOff] of String =
|
||||
|
@ -90,6 +90,7 @@ type
|
||||
AStartAngle16Deg, AAngleLength16Deg: Integer);
|
||||
procedure Rectangle(const ARect: TRect);
|
||||
procedure Rectangle(AX1, AY1, AX2, AY2: Integer);
|
||||
procedure ResetFont;
|
||||
function Scale(ADistance: Integer): Integer;
|
||||
procedure SetAntialiasingMode(AValue: TChartAntialiasingMode);
|
||||
procedure SetBrushColor(AColor: TChartColor);
|
||||
|
@ -817,7 +817,6 @@ procedure TChart.Draw(ADrawer: IChartDrawer; const ARect: TRect);
|
||||
var
|
||||
ldd: TChartLegendDrawingData;
|
||||
s: TBasicChartSeries;
|
||||
fnt: TFont;
|
||||
begin
|
||||
Prepare;
|
||||
|
||||
@ -882,14 +881,8 @@ begin
|
||||
|
||||
// Undo changes made by the drawer (mainly for printing). The user may print
|
||||
// something else after the chart and, for example, would not expect the font
|
||||
// to be rotated.
|
||||
// (Workaround for issue #0027163)
|
||||
fnt := TFont.Create; // to effectively reset font orientation
|
||||
try
|
||||
ADrawer.Font := fnt;
|
||||
finally
|
||||
fnt.Free;
|
||||
end;
|
||||
// to be rotated (Fix for issue #0027163)
|
||||
ADrawer.ResetFont;
|
||||
ADrawer.SetPenParams(psSolid, clDefault);
|
||||
ADrawer.SetBrushParams(bsSolid, clWhite);
|
||||
ADrawer.SetAntialiasingMode(amDontCare);
|
||||
|
Loading…
Reference in New Issue
Block a user