[fpc-pascal] Implementing AggPas with PtcGraph

James Richters james at productionautomation.net
Tue May 30 21:20:46 CEST 2017


>As I mentioned, AggPas can use allocated memory, array, a memory image etc as its rendering buffer. If you want a graphical console program
>(eg: using Linux Console Framebuffer) using AggPas, then render your application output via AggPas to a memory image, then bitblit that image
>to the console graphics output in whatever paint event you have available.

>Using AggPas with desktop GUI applications works pretty much identical as above, except it bitblit's the memory image to the Window Canvas.

What is the best method for getting the memory image to a ptcgraph window?  I have been trying to figure how to use something like putimage to do this but I'm not sure how to do it or if it's even the best way.    I think I probably need to convert the format of the memory buffer or something, but I can't figure out what to do.

I've re-attached Graeme's sample slightly modified to open the ptcgraph window, and attempt to use putimage on line 103 but when I run it I get 217- access violation

Any advice on how to get the image into the window is greatly appreciated.

James
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Agg2DConsole.dpr
Type: application/octet-stream
Size: 4403 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20170530/46450828/attachment.obj>


More information about the fpc-pascal mailing list