> (over about five years) by other students.  There is a problem with
> the way the program redraws lines on the form and it does not
> take very long to have a noticeable, i.e. up to many seconds, redraw.
> What my group are trying to do is rewrite all the code and do it better.
> We know that we have a need to draw many lines so I want a better way
> to do it before we come to actually having to do it.  I want our
> overall program design to make this process easier (therefore faster).
>
> Your idea may work but we do have to move these lines.  I have
> considered making a component in another package (like Adobe
> Illustrator) that gives me more "line" type things and using that
> - will this work? - I have not written a component before.


"Making a component" is a pretty general description
so it's hard to evaluate how well it will work.

I think if you have an instance of a component for each line
the overhead will slow you down.    Each line will get drawn
separately in it's own paint event.

This is Probably not a good idea *UNLESS* you know that most
lines don't usually need to be redrawn and you have some efficient
way of "notifying" the lines that do need to be redrawn.

There is nothing in the "bitmap" solution I proposed earlier
that says you can't move the lines.    Just redaw them
on the bitmap whenever you determine you need to.

I think to solve this problem you need to determine what is
slowing you down most and focus on that.

If the bulk of the time is being spent actually "drawing" all
the lines on the display then using the bitblt solution I
mentioned  earlier will probably give you a dramatic improvement.

But - if the time is being spent "generating" the lines
(figuring out where they go) then you need to look at your
algorithm for doing that and see if there's some way
to speed that up.

-ns

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"

Reply via email to