Home RAP
New Blog Posts: Merging Reports - Part 1 and Part 2

Canvas in RAP

edited October 2002 in RAP
Ok, I've learned that the TCanvas isn't supported or extended to RAP.
Since the TCanvas would be hard to make it available through Rap, I
would like to ask the following question.

Are Windows API available in rap?

So instead of using a TCanvas, I'd use the windows API functions.

Any idea?

Thanks

--
Daniel Lemire
Programmeur,
Conception Design Ware Inc.
Tél.: 819-868-8853
Fax : 819-868-8855

Comments

  • edited October 2002
    No, the WIN API is not available in RAP. You can create RAP pass through
    functions to make calls on it from Delphi.


    Cheers,

    Jim Bennett
    Digital Metaphors

  • edited October 2002
    It is probably going to be easiest to code utility routine sin RAP that can
    draw on the canvas TObject parameter of your event. Then you can generically
    draw from RAP onto the canvas by passing them through to the delphi pass
    though function code. For example, if aCanvas is pass as a TObject in the
    RAP event handler, then you could use some routines you create like:

    procedure PaintBox1Paint(Canvas: TObject)
    begin

    {Here, your new Drawbox routine would pass through and typecast the canvas
    parameter as TCanvas in delphi code to actually draw the rectangle using the
    TCanvas routines.}

    {Canvas, Top, Left, Width, Height}
    DrawBox(Canvas, 50, 50, 100, 200);

    end;


    Cheers,

    Jim Bennett
    Digital Metaphors

This discussion has been closed.