Recent

Author Topic: Some questions Split from: Lazarus cannot handle simple calculations?  (Read 4461 times)

Waco

  • Jr. Member
  • **
  • Posts: 61
I won't start another topic because I don't think it's necessary, even though this is another topic.

1. Does Lazarus free all the space taken by local variables after ending a procedure?

2. This problem irritates me really much, it seems that Lazarus draws on canvas quite inaccurately. I made a procedure to draw an angle, but when I measure the angle (yes, holding a goniometer on the screen), the declension varies from 0 up to 3 degrees, which is just too much. Does anyone have an explanation for this? Of course, my procedure might be incorrect, which is quite probable I have to say, but if someone is able to justify this imprecision, I would be really thankful. Otherwise I will post an example.

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2674
Re: Some questions Split from: Lazarus cannot handle simple calculations?
« Reply #1 on: August 28, 2009, 11:26:58 am »
These are complete different questions. This is not just a personal messageboard where you can continuing writing questions.

@1: Yes. Except classes you have created (since they aren't allocated locally, only the reference to it is)

@2: Calibrate your monitor/screen. Make sure a square is displayed as square.
Lines are drawn with simple math, with begin and endpoint, so there shouldn't be a deviation
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

Waco

  • Jr. Member
  • **
  • Posts: 61
Re: Some questions Split from: Lazarus cannot handle simple calculations?
« Reply #2 on: August 28, 2009, 01:07:18 pm »
Regarding your remark, I did exactly the same in my previous topic and you always helped me without saying anything, so I thought it's alright :) But I understand and I won't mix problems anymore.

1. OK, I thought so, but I wasn't sure.

2. I'll try to test the screen and calibrate it somehow, but lines are fine, my only problem are angles, they just won't display correctly. Anyway, it probably still is a screen issue.

sasa

  • Guest
Re: Some questions Split from: Lazarus cannot handle simple calculations?
« Reply #3 on: August 28, 2009, 05:00:36 pm »
To draw on the screen canvas (for examply) you have to keep attention on horizontal/vertical ratio of the screen resolution (200 dots height are not the same as 200 dots width). The ratio you can calculate retrieving information from API functions - X/Y dots per inch for specific canvas (for screen/printer).

Also keep attention if monitor is 4:3, 16:9 or 16:10 and monitor driver can handle the resolution correctly. For example, 800x600 on 16:10 monitor is quite unnatural if driver (or there is no buttion or function on the monitor) cannot move the margin to emulate 800x600 screen width  correctly (4:3). That is actually about a user should keep attention.

Waco

  • Jr. Member
  • **
  • Posts: 61
Re: Some questions Split from: Lazarus cannot handle simple calculations?
« Reply #4 on: August 29, 2009, 01:31:06 pm »
Thanks for tips, I'll play with it some more.

 

TinyPortal © 2005-2018