 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Nils Haeck Guest
|
Posted: Thu Sep 09, 2004 7:44 pm Post subject: Re: Drawing on a image |
|
|
Put in a "Application.ProcessMessages" right after your drawing command to
the Image1..
That should make sure that the changes update first thing.
Kind regards,
Nils
"Mikael" <0586.30451 (AT) telia (DOT) com> wrote
| Quote: | Im a newbie in programming delphi and only has a little old basic
knowledge from 15 years ago. And my english isn't that good either since
it's not my main language because im from Sweden. It's quite hard to
find any good litterature on the subject here in Sweden and if i drive
300miles i could find some in english wich isn't not my strong side.
I have a project on the go were i'm going to sample 4 values in real
time from 4 AD convertes on the LPT port and then use those values to
calculate and draw a position on a image. The speed is 100 or maybe 1000
positions a sec. I also stores the calculated values in a 3d array for
later use if wanted.
Since i havent found any litterature that helps me on the way i have
gone my own way.
When i try to draw a line or pixel on the image with
Image1.Canvas.Pixels[X, Y] := clRed; nothing draws until the period of
sampling values are over. But if i simply draw direct on the application
canvas like this Canvas.Pixels[X,Y] := clRed; but as you figure it would
draw all over the application so i had to put upp some "if" statements
to stop that.
I think it's because i use a delay function from a custom .dll and a
loop to do the sampling and set the speed. It's locking up the computer
pretty good while sampling.
But what is the way to go if i wanna do this the right way? And pleas
be gentle with me since i'm a total newbie and has a full time job just
understanding what i just wrote. :-)
Mikael
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|