![]() | Steema Issues DatabaseNote: 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. |
| Summary: | SmallDots makes the pen to be used when it shouldn't | ||
|---|---|---|---|
| Product: | VCL TeeChart | Reporter: | yeray alonso <yeray> |
| Component: | Canvas | Assignee: | Steema Issue Manager <issuemanager> |
| Status: | RESOLVED FIXED | ||
| Severity: | major | CC: | david, johnnious |
| Priority: | High | ||
| Version: | 131119 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows | ||
| URL: | http://www.teechart.net/support/viewtopic.php?p=66497#p66497 | ||
| Chart Series: | --- | Delphi / C++ Builder RAD IDE Version: | |
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 ... |
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;