Steema Issues Database

Note: This database is for bugs and wishes only. For technical support help, if you are a customer please visit our online forums;
otherwise you can use StackOverflow.
Before using this bug-tracker we recommend a look at this document, Steema Bug Fixing Policy.



Bug 2213 - ClipEllipse doesn't work with Inverted mode in GDIPlus
Summary: ClipEllipse doesn't work with Inverted mode in GDIPlus
Status: RESOLVED FIXED
Alias: None
Product: VCL TeeChart
Classification: Unclassified
Component: Canvas (show other bugs)
Version: 26.181203
Hardware: PC Windows
: --- enhancement
Target Milestone: ---
Assignee: Steema Issue Manager
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-07-17 07:20 EDT by yeray alonso
Modified: 2019-07-17 07:26 EDT (History)
0 users

See Also:
Chart Series: ---
Delphi / C++ Builder RAD IDE Version:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description yeray alonso 2019-07-17 07:20:39 EDT
Example:

uses VCLTee.Series;

procedure TForm1.FormCreate(Sender: TObject);
begin
  Chart1.View3D:=False;
  Chart1.AddSeries(TPointSeries);

  Chart1.Axes.Bottom.SetMinMax(0,20);
  Chart1.Axes.Left.SetMinMax(0,10);
end;

procedure TForm1.Chart1AfterDraw(Sender: TObject);
var innerR, outerR: TRect;
begin
  with Chart1 do
  begin
    outerR:=Rect(Axes.Bottom.CalcXPosValue(1), Axes.Left.CalcYPosValue(1), Axes.Bottom.CalcXPosValue(9), Axes.Left.CalcYPosValue(9));
    innerR:=Rect(Axes.Bottom.CalcXPosValue(4), Axes.Left.CalcYPosValue(4), Axes.Bottom.CalcXPosValue(6), Axes.Left.CalcYPosValue(6));
  end;

  with Chart1.Canvas do
  begin
    Brush.Color:=clBlue;
    Ellipse(outerR);
    Brush.Color:=clRed;
    Ellipse(innerR);
  end;

  innerR.Offset(Chart1.Axes.Bottom.CalcSizeValue(10),0);
  outerR.Offset(Chart1.Axes.Bottom.CalcSizeValue(10),0);

  with Chart1.Canvas do
  begin
    Brush.Color:=clBlue;
    ClipEllipse(innerR, True);
    Ellipse(outerR);
    UnClipRectangle;
    Brush.Style:=bsClear;
    Ellipse(innerR);
  end;
end;