PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Scaling/Clipping issue

BurningScrappy · 13 Mar 2003, 09:49 UTC
Working on the particle engine for next Monoso release. Ran into a bit of a problem, so lets see if anyone has a solution.

My emitters can have a given expansion rate E that can be used to scale the image, the problem I'm running into is that once the image is scaled the destination rectangle doesn't neccessarily contain the fully scaled image. There a quick fix to that.

Also this brings up another point, will GD implement screen clipping at the render level, so lazy programmers like me don't have to?

^_^ CHeers from scraps

Monoso Software
monoso@cox.net
no clipping is provided by GD. If you bli outside the target surface, nothing will appear. don't know what you mean with the scaling.

peace
You'll need to scale the rects on your own. If you are doing rotations of the source image, you'll need to do a little trig to scale the destination rect as well. I've got a simple tutorial on the GapiDraw BLT method doing scaling/rotation that might point you in the right direction. You can find it in the developer section at http://www.ppcstudios.com
I personally think the more you rely on the library for things such as scaling, the less you will understand, and the less you will be able to do.
i ment clipping, not scaling :).