Search found 5 matches

by tremoflo
Thu May 17, 2018 3:10 pm
Forum: VCL
Topic: Dashed line using ExtCreatePen not working
Replies: 8
Views: 15286

Re: Dashed line using ExtCreatePen not working

Thanks Yeray! in fact, it also works by just assigning ReferenceCanvas.Pen after the assigning the new Pen.Handle as below. Chart1.Canvas.Pen.Handle := ExtCreatePen(PS_GEOMETRIC or PS_USERSTYLE, 2, LLogBrush, 4, @LUserstyle); Chart1.Canvas.ReferenceCanvas.Pen.Assign(Chart1.Canvas.Pen); Chart1.Canvas...
by tremoflo
Wed May 16, 2018 3:55 pm
Forum: VCL
Topic: Dashed line using ExtCreatePen not working
Replies: 8
Views: 15286

Re: Dashed line using ExtCreatePen not working

Hi, I changed the canvas to GDI, but still printing a solid line without any color. With GDIPlus, it printed the blue colored line. See attached picture: the blue dashed line is from the paintbox which prints well. procedure TForm1.FormCreate(Sender: TObject); begin Chart1.Canvas := TTeeCanvas3D.Cre...
by tremoflo
Tue May 15, 2018 4:15 pm
Forum: VCL
Topic: Dashed line using ExtCreatePen not working
Replies: 8
Views: 15286

Re: Dashed line using ExtCreatePen not working

Hi Yeray, I tried the code again, changed the array of LUserStyle to DWORD. Now it's painting the dashedline on the PaintBox but NOT on the Teechart! Any idea? var LLogBrush : tLogBrush; LUserstyle : array[0..3] of DWORD; begin Chart1.Series[0].Visible := true; TLineSeries(Chart1.Series[0]).Pointer....
by tremoflo
Fri May 11, 2018 1:17 pm
Forum: VCL
Topic: Dashed line using ExtCreatePen not working
Replies: 8
Views: 15286

Re: Dashed line using ExtCreatePen not working

You are right. That might then be a question to Embarcadero. if you found a solution on your side, let me know.
by tremoflo
Thu May 10, 2018 7:06 pm
Forum: VCL
Topic: Dashed line using ExtCreatePen not working
Replies: 8
Views: 15286

Dashed line using ExtCreatePen not working

Hi, I am trying to draw a line using a user-defined pen Style but the line prints straight. procedure TForm1.Button1Click(Sender: TObject); var LLogBrush : tLogBrush; LUserstyle : array[0..3] of Double; begin Chart1.Series[0].Visible := true; TLineSeries(Chart1.Series[0]).Pointer.Visible := false; L...