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 808 - SmallDots makes the pen to be used when it shouldn't
Summary: SmallDots makes the pen to be used when it shouldn't
Status: RESOLVED FIXED
Alias: None
Product: VCL TeeChart
Classification: Unclassified
Component: Canvas (show other bugs)
Version: 131119
Hardware: PC Windows
: High major
Target Milestone: ---
Assignee: Steema Issue Manager
URL: http://www.teechart.net/support/viewt...
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-20 06:16 EDT by yeray alonso
Modified: 2014-06-20 13:52 EDT (History)
2 users (show)

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 2014-06-20 06:16:39 EDT
In v2013.09 Canvas.Pen changed from TPen to TTeePen.
TTeePen has SmallDots and it seems when it's "true" the pen is drawn even having  psClear Style!
Look at the AfterDraw event in the example below.

Then, having Zoom.Pen.SmallDots to true and BevelOuter to bvNone, if you unzoom the chart, a border is drawn on the chart using the zoom pen.

var Chart1: TChart;

procedure TForm1.FormCreate(Sender: TObject);
begin
  Caption:=TeeMsg_Version;

  Chart1:=TChart.Create(Self);

  with Chart1 do
  begin
    Parent:=Self;
    Align:=alClient;

    Color:=clWhite;

    AddSeries(TLineSeries).FillSampleValues;
    Canvas:=TTeeCanvas3D.Create;

    Zoom.Pen.SmallDots:=true;
    Zoom.Pen.Color:=clRed;
    BevelOuter:=bvNone;

    OnAfterDraw:=Chart1AfterDraw;
  end;
end;

procedure TForm1.Chart1AfterDraw(Sender: TObject);
begin
  with Chart1.Canvas do
  begin
    Pen.Color:=clRed;
    Pen.Style:=psClear;
    Pen.SmallDots:=true;

    Line(0, 0, Chart1.Width, Chart1.Height);
  end;
end;
Comment 1 david berneda 2014-06-20 13:52:05 EDT
Fixed. 
SmallDots=True was always being considered as "non clear" pen style.

The fix also works fine with GDI+ canvas.

Fixed at TeCanvas.pas unit, TeeSetTeePen method:

begin
  if APen.SmallDots and (APen.Style<>psClear) then 
  ...