[Lazarus] Help with algorithm

Mark Morgan Lloyd markMLl.lazarus at telemetry.co.uk
Fri Dec 20 17:49:06 CET 2013


Leonardo M. Ramé wrote:

> I'm thinking of copying the buffer into an two dimensional matrix, apply
> transformations, then extract the overlapping part and lastly paint.
> 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.

I'm not sure how far this helps, but my understanding is that if you 
implement each transformation as a matrix, you can multiply the 
transformations to get a final matrix which you only then apply to each 
point. That would reduce the problem to the (non-linear) operation of 
deciding whether each transformed pixel was in range of the canvas.

I did have a good reference for this sort of thing which I can't 
currently find, but 
http://msdn.microsoft.com/en-us/library/windows/desktop/ff684171(v=vs.85).aspx 
looks like a reasonable starting point.

-- 
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]




More information about the Lazarus mailing list