[Lazarus] Help with algorithm
Leonardo M. Ramé
l.rame at griensu.com
Fri Dec 20 19:09:04 CET 2013
On 2013-12-20 17:59:18 +0100, Hans-Peter Diettrich wrote:
> 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.
>
Yes, but I'm trying to avoid if possible using 3rd party libraries,
because I want to be able to easily port my program to HTML5 Canvas.
I'll try to create a transformation matrix, then fill it with the
pointers from the buffer to see what I get, I'm pretty sure this is the
way to go.
Regards,
--
Leonardo M. Ramé
http://leonardorame.blogspot.com
More information about the Lazarus
mailing list