Drawing on TfrxPictureview Canvas

Tom Dalton (OSDB Worx)Tom Dalton (OSDB Worx) South Africa
edited 7:33PM in FastReport 4.0
Hi All,

I am new to Fast Reports and although very happy with the environment I am not getting a polygon to appear on a picture object in a report.

Typically we would call the the object:

Var Pict : TfrxPictureView;

Begin

Pict := Report1.FindComponent('Picture1') as TFrxPictureView;
Pict.Picture.Bitmap.Canvas.Polygon([Point(30,200),Point(230,200),Point(100,100)]);
Report1.showReport;
End;

I get a blank page with no triangle on the page. I have tried to add pen, brush, and other odd stuff with no joy.

Regards Tom

Comments

  • gpigpi
    edited 7:33PM
    Try
    var Pict : TfrxPictureView;
        Image: TImage;
    begin
       Pict := frxreport1.FindComponent('Picture1') as TfrxPictureView;
       Image := TImage.Create(nil);
       Image.Canvas.Pen.Color := clBlack;
       Image.Canvas.Brush.Color := clRed;
       Image.Canvas.Polygon([Point(30,200),Point(130,200),Point(80,89)]);
       Pict.Picture := Image.Picture;
       Image.Free;
       frxReport1.ShowReport(True);
    end;
    

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.