I'm trying to move away from programming with Delphi under Windows to using Lazarus under Linux. I've started by trying some graphics I used on a 2D CAD program, and here's what I've found so far...
My CAD program uses TCanvas to display simple graphical objects - polygons, ellipses, text, etc. The program uses SetWorldTransform for scaling (zoom in/out on the canvas) and rotation of objects. When fully zoomed in, the size of the canvas is over 200000 (width & height).
a) I haven't been able to find an equivalent to 'SetWorldTransform' under Linux that can be used on a TCanvas. I've found some fast algorithms for lines, ellipse & floodfill, but scaling of text could be tricky (for me). Any suggestions, please?
b) The size of controls is limited to width & height of 100000 (in the file control.inc - TControl.DoSetBounds). I don't know why this figure has been used - seems arbitrary.
I've modified these to 400000 under WIndows and saved the changes - seem to work OK.
I tried to make the same changes under Linux, but the source files are read-only. Anybody know an easy way to save the changes?
c) Using a TCanvas (TPaintBox contained inside a TPanel) - set the width to 40000 and drew some circles, using the ScrollBy method of the Panel to scroll around the PaintBox. This works fine under Windows but, under Linux, stops working once the PaintBox is scrolled by more than 32767. This looks like a 'smallint' hasn't been changed to 'integer' somewhere (possibly in the CombineRgn routine), but I haven't found the cause of the problem yet. Anybody know a fix for this, please?
Thank you