Article View: rec.games.programmer
Article #313Re: Bitmap Rotation/Scale
From: Warwick Allison
Date: Wed, 08 Apr 1992 00:55
Date: Wed, 08 Apr 1992 00:55
34 lines
1566 bytes
1566 bytes
rjwalsh@maths.tcd.ie (Robert Walsh) writes:
>Does anyone know how to map a bitmap of arbitary size into an polygon
>of arbitary size (the simplest example is mapping a bitmap into a
>square)?
Yes. Clip it.
Seriously, it all depends HOW you want it mapped. I could map a large
image to a small square by clipping it. You have to make some constraints
before you can start devising an algorithm.
One possibility would be to have the following restriction:
If pixels A and B and on the same horizontal line in the original
and they both appear in the final, then they must be on the
same horizontal in the final.
Now the problem is simply one of mapping a line of pixels:
************************************************
to a sequence of lines of pixels:
************* **************************** *******
Easy.
Warwick
--
_-_|\ warwick@cs.uq.oz.au / eastings genistas /
/ * <-- Computer Science Department, / giantess seatings /
\_.-._/ University of Queensland, / teasings tsiganes /
v Brisbane, Australia. / -------- -------- /
Technical Details
Message-ID:
<7464@uqcspe.cs.uq.oz.au>Path:
arc1-ca.pugleaf.net!sparky!uunet!munnari.oz.au!bunyip.cc.uq.oz.au!uqcspe!cs.uq.oz.au!warwickReferences:
<1992Apr06.041125.25057@rose.uucp> <1992Apr6.052644.22008@maths.tcd.ie>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!munnari.oz.au!bunyip.cc.uq.oz.au!uqcspe!cs.uq.oz.au!warwick From: warwick@cs.uq.oz.au (Warwick Allison) Newsgroups: rec.games.programmer Subject: Re: Bitmap Rotation/Scale Message-ID: <7464@uqcspe.cs.uq.oz.au> Date: 8 Apr 92 00:55:05 GMT References: <1992Apr06.041125.25057@rose.uucp> <1992Apr6.052644.22008@maths.tcd.ie> Sender: news@cs.uq.oz.au Reply-To: warwick@cs.uq.oz.au Lines: 34