mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-19 14:29:29 +02:00
TAChart: Implement AntialiasingMode in opengl drawing back-end
git-svn-id: trunk@30413 -
This commit is contained in:
parent
5ee5cbcdc7
commit
f27bef2075
@ -64,6 +64,7 @@ type
|
||||
AStartAngle16Deg, AAngleLength16Deg: Integer);
|
||||
procedure Rectangle(const ARect: TRect);
|
||||
procedure Rectangle(AX1, AY1, AX2, AY2: Integer);
|
||||
procedure SetAntialiasingMode(AValue: TChartAntialiasingMode);
|
||||
procedure SetBrushColor(AColor: TChartColor);
|
||||
procedure SetBrushParams(AStyle: TFPBrushStyle; AColor: TChartColor);
|
||||
procedure SetPenParams(AStyle: TFPPenStyle; AColor: TChartColor);
|
||||
@ -238,6 +239,20 @@ begin
|
||||
Rectangle(ARect.Left, ARect.Top, ARect.Right, ARect.Bottom);
|
||||
end;
|
||||
|
||||
procedure TOpenGLDrawer.SetAntialiasingMode(AValue: TChartAntialiasingMode);
|
||||
begin
|
||||
case AValue of
|
||||
amOn: begin
|
||||
glEnable(GL_LINE_SMOOTH);
|
||||
glEnable(GL_POLYGON_SMOOTH);
|
||||
end;
|
||||
amOff: begin
|
||||
glDisable(GL_LINE_SMOOTH);
|
||||
glDisable(GL_POLYGON_SMOOTH);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TOpenGLDrawer.SetBrush(ABrush: TFPCustomBrush);
|
||||
begin
|
||||
FBrushColor := ABrush.FPColor;
|
||||
|
Loading…
Reference in New Issue
Block a user