plotting with Canvas - many issues lazarus / 11-Options ---------------------------------------------------------------------- endik · 2007-05-24 10:24 I started next plot in my application and will have several questions: 1/ I want to draw points at some coordinates, it can be done by means of: Canvas.Pixels[x,y]. Unfortunately points are very small almost unvisible. How to draw bigger points? ---------------------------------------------------------------------- antonio · 2007-05-24 16:17 You can draw little rectangles by Canvas.Rectangle(X1, Y1, X2, Y2). ---------------------------------------------------------------------- endik · 2007-05-28 19:42 that works, another solution is to use .Ellipse which can draw a circle also 2/ next issue touches displaying of any figure, when a figure is drawn and I click on TComboBox or switch between desktops or open terminal or do many other things (I guess), a figure disappears so I need to create it again. How can I freeze my figure? ---------------------------------------------------------------------- antonio · 2007-05-28 19:59 You must save your figure on a bitmap, make changes on it if necessary, and draw it again at each time you need it. ---------------------------------------------------------------------- endik · 2007-05-28 20:17 I draw my figure on a Tshape and could not find the option for Bitmap saving ---------------------------------------------------------------------- antonio · 2007-05-28 20:20 You must create and handle it by yourself by TBitmap.Create, etc. It's a back buffer. ---------------------------------------------------------------------- theo · 2007-05-28 21:26 Paint in the OnPaint EventHandler ---------------------------------------------------------------------- Zomis · 2007-05-29 07:48 Quote from: "endik"that works, another solution is to use .Ellipse which can draw a circle also 2/ next issue touches displaying of any figure, when a figure is drawn and I click on TComboBox or switch between desktops or open terminal or do many other things (I guess), a figure disappears so I need to create it again. How can I freeze my figure?Seems related to the problem I had just a few days ago, maybe it can help: http://www.lazarus.freepascal.org/ind ex.php?name=PNphpBB2&file=viewtopic&t=3831 Today I use a paintbox, a couple of shapes moving inside the paintbox (but with Form1 as Parent, since TPaintbox is not a descendant of TWinControl), and the Paintbox.OnPaint event draws circles and stuff in the paintbox sometimes. Works great. ---------------------------------------------------------------------- endik · 2007-05-30 08:00 4/ I had this problem with TChart and it was one of the reson I decided to make my figure on Canvas: How can I put some text vertically? I want to label my Y axis and now am doing with .Canvas.TextOut but I have not found option concerning angle or rotation or so. ---------------------------------------------------------------------- antonio · 2007-06-01 17:40 If you want text written vertically, you can Textout it for each character changing only "y" coordinate for each character. ---------------------------------------------------------------------- endik · 2007-06-01 18:01 I mean rotated, sorry if you got confused ---------------------------------------------------------------------- antonio · 2007-06-01 18:28 If it's for Windows only, I guess there's something on Windows API. Anyway, you can rotate by yourself by googleing some rotation algorithm.