help please with a canvas problem

hi, i need to draw a series to rectangles and lines inside a canvas, now
that area is of certain width and height, how can i make sure that no
matter what size parameters i recive (from the user, WxH) i make sure
that the pic always appear within the frame?

the frame is something like 0,100

thanks!
please email answer

--
Uri Fridman

urif...@yahoo.com
u...@afek.co.il

******************************************
Ever tried.  Ever failed.
No matter.
Try again.  Fail again.  Fail better.

                           Samuel Beckett
******************************************

-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: PGPfreeware 6.0.2i

<encoded_portion_removed>
JHOCBRhTIQCeJJ4e5BaZNb9x3h7gCJ9mo3zmHuQ=
=T+ef
-----END PGP PUBLIC KEY BLOCK-----