[SDL] Exposing clipping function

sondheim at knxmail.com sondheim at knxmail.com
Sun Apr 30 12:51:50 PDT 2000

I accidentally sent this just to Nick by mistake:

> >My concern here isn't so much in efficiency as it is with
> >obtaining the same result.  With most processes there is
> >more than one way to compute their result, and (in fact)
> >the result may vary slightly depending on the implemation,
> >and the goals that the implementor had in mind.  With a
> >clipping this is likely not to be an issue, but I wanted
> >to use SDL's clipping function to ensure that I get the
> >same result as SDL... not for purposes of being more
> >efficient.
> Key word here, "goals that the implementor had in mind" -- in some cases my
> goals may differ quite a lot. I would recommend that in the event you want
> your clipping routine to give the same results as SDL, you do that, and not
> pollute SDL's interface and add a routine which may well cause a good deal
> of confusion to some more newbie programmers in the future than you and
> me -- however, these are just my thoughts (opinionated deviant that I am)

As far as dealing with the status quo, agreeing with you vs.
not is sort of a wash. It would be trivial for me to just
lift Sam's code into my own application.  This would have
the desired effect.  Everything that I know about
programmming, however, tells me that this is a bad idea.
What if Sam's code changes.  I have no way of changing the
algorythm after it leaves my hands.  The best way to do
this is a minor API change.  I am recommending only adding
one new entry point.  No change in behavior for existing
programs.  I did change the internals of SDL_UpperBlit,
but only to call the new function for its clipping... This
should work %100 the same way.  How would this confuse

Anyone? Comments?



Great news! Get free KNXmail here!

More information about the SDL mailing list