[Lazarus] Help with algorithm
Hans-Peter Diettrich
DrDiettrich1 at aol.com
Fri Dec 20 17:59:18 CET 2013
Leonardo M. Ramé schrieb:
> I'm thinking of copying the buffer into an two dimensional matrix, apply
> transformations, then extract the overlapping part and lastly paint.
Overlapping is typically handled in the graphics library (or card).
> Before doing so, I'm asking here, because I'm afraid it could take too
> long to apply "n" transformations before displaying the final result.
That's my suspicion as well :-(
I'd suggest that you use some existing library for image processing,
because these make use of hardware features built into graphics cards.
That's how 3D animations work, which require more transformations than
you intend to use. Details depend on your audience, i.e. a solution for
your personal machine only, or for use on any machine.
Otherwise I'd implement specialized functions as you mentioned (VFlip,
HFlip...), possibly with an wrapper that calls the appropriate
functions. Then you also can exchange the implementation of the wrapper,
with no impact on the rest of your program.
DoDi
More information about the Lazarus
mailing list