PTCPas is a free, portable framebuffer library, written in Free Pascal. It allows low-level high-speed graphics access on multiple platforms.
Rate This ProjectLogin To Rate This Project
I cannot say enough good things about PTCPas! Extremely Fast, Very compatible, Great support! Details follow: I have a CNC custom motion control application that I have been actively developing for over 25 years. The intention is to run CNC machines in extreme environments. With this type of application, what you absolutely DO NOT need is a GUI interface, you cannot position a mouse and do intricate clicking on little boxes while the screen, your hands, and the mouse are all covered with coolant or sawdust. A lot of thought went into the user interface to make every machine function as user friendly as possible in that environment, with features such as enlarging input areas to the entire width of the screen during data entry with huge characters and a simple animation to show which field is being enlarged to eliminate input errors when the screen is in bad lighting or obscured with coolant mist or sawdust, no mouse at all to fumble around with, everything is done from keystrokes from an easily readable menu. Over time the old DOS computers it ran on became harder and harder to buy until finally, it was so hard to find motherboards that were reliable, even on eBay anymore that a solution that would run on modern PCs just could not be avoided anymore. Thanks to Free Pascal, the original Turbo Pascal code was fairly easily implemented and with the use of the FPC Graph and WinCrt units, The original user interface was able to be used directly, with very little modification. This was VERY important to customers. I noticed right away that the graphics were slower in windows with FPC and the graph unit than they were on a Pentium 233MHz, even when running on a 3.7GHz machine with extreme video card, but at that time, not much was using the graphics, so it was usable, the place it would be noticed the most is when loading a new program to run, I have a file list that opens with a simple animation, but over the years, customers relate the speed by which the file list is displayed to the speed of the entire system, If they had a 486x40 and upgraded it to a Pentium 100, this file list would open quite a bit faster, and the maximum processor supported, a Pentium 233, would open it very fast, however, the Graph unit in FPC was slower than even the Pentium 100, so it appeared at the time that the new system was slower than the old dos system on Pentium 233s that everyone was used to ... but it was so much more reliable, it was acceptable, but it was not fun to keep explaining that it was an issue with converting to windows and the actual program processing was not affected. With the program now running as a win32 console application, the memory boundaries that previously limited capability were lifted, and I could now DRASTICALLY expand the capability of the program, It went from a 475K program that BARELY ran on a DOS system with all the needed TSRs running to an over 5MB program, and I added many, many new features to it... it would even send you a text message when you need to do a tool change or when your part is finished! But I wanted to do more, including adding live graphics to it, showing all the parts to be cut along with a representation of the cutter diameter and any interference with other parts, and a representation of the current machine position shown live as the program was running... However, during initial graphics tests, it was discovered that the slow graphics was going to be a problem.... it was so slow that to add such graphics would slow down the entire system to a point where it was literally unusable. I posted a question about the graphics performance on the FPC mailing list and learned about PTCPas, so I changed Uses Graph, WinCrt; to Uses PTCGraph, PTCCRT; and POOF!!! Problem SOLVED!!! PTCPas is not just a little bit faster, it's AMAZINGLY faster, It is so fast I can even use Agg_Pas with it for the anti-aliasing capabilities and even with that, it's still incredibly fast... It makes it feel like it's running on a computer faster than the old Pentium 233s, in fact, the above-mentioned program files listing was SO much faster, that I had to put a delay in it otherwise it did not appear to animate, it appeared to just be there! I selected a delay that made it still noticeably animated, but 4 times faster than the old Dos Computers would display the file list. I know it's silly, but there a lot to be said of 'perceived value' by the customer. I also cannot say enough about the support for PTCPas. I was having an issue with some keys not being available from the graphics window, There are keys needed that my customers have become very used to, but were not being recognized by PTCCRT. I asked why the keys were working on the console, but not in PTCCRT, and Nikolay got right on it and not only explained the issue, he solved the problem quickly, and he also implemented a solution that would make the keyboard of PTCCRT compatible in different ways by adding a KeyMode variable allowing the programmer to set Keymode to kmTP7 for Turbo Pascal 7 compatibility, kmGO32 for GO32V2 Compatibility, or kmFPWINCRT for compatibility with the FP winCRT unit. This keyboard fix allowed my customers to operate as they have for decades without changing anything and was VERY MUCH Appreciated!! Also another issue I needed support for was that I was needing to get Getimage() and Putimage() to be faster because I would Getimage() a part of the screen, modify the bitmap with Agg_Pas then Putimage() it back to do animations and on large screens, Getimage() and Putimage() were too slow, They would cause a noticeable delay and I could actually see the screen repaint from top to bottom. but after asking the question of how this could be improved, Nikolay gave me some advice on how to optimize functions and procedures with PTCPas, so I did some testing and found that the changes he recommended ended up making GetImage() and Putimage() over 18 TIMES faster, Yes that 1800% faster! which is not a trivial change. With these modifications, Getimage and put image are so fast that I can now do animations and draw all the parts on a machine table, and use pan and zoom, and it's so fast I see no screen repaints as before, and no screen flicking, even on a 4K monitor Full screen at full resoltion! For me PTCPas makes the difference between my Motion Control Program being "an OK soltion that works on windows" and "an Awesome Major Upgrade that runs on Windows and offer major new features an capabilites never possible before" SO I give it 10 out of 5 Stars!!!! and to Nikolay, Thank You For your work on PTCPas, and for your support!
We were searching at french CNRS, an easy to use, interoperational (Windows+Linux), IDE based on PASCAL to write interactive, pixel visualization for the scientific field ( Monte-Carlo pixel simulations, E.D.O., P.D.E., Cristallography, Non-linear chemical reactions, Quantum Mechanics electronic density results). We found it : You let the computer team of your lab setup Free Pascal Compiler (FPC : fp-ide , not "Lazarus") +PTCPas (uses ptccrt+ptcgraph units) on both Linux+Windows systems, you write only 1 source in "pure" Borland PASCAL, and without changing anything it runs on the different systems (Win7, Ubuntu) of your PC... Merci, Merci beaucoup pour cette très belle et très utile réalisation.
great lib, thanks to developers, it's pretty fast!
It's quick, easy, relatively portable, and I like it a lot. Add to this the fact that you can take any archaic code you have that uses graph, change it to use ptcgraph and ptccrt, and POOF! It works again!