|
-
July 2nd, 2001, 08:43 AM
#1
How can I tilt a image..
I wan to tilt a image..
************
************
****image***
************
************
...tilt...
......../***********/
....../***********/
..../***image***/
../***********/
/***********/
tilting angle was given.
I can use APIs ( bitblt, stretchblt, etc...) but I dont know the mehtod...
pleas, someone help me...
-
July 2nd, 2001, 08:54 AM
#2
Re: How can I tilt a image..
There's and example at http://www.planetsourcecode.com, but it involves you having to paint every pixel at it's new location, which is very slow.
Tom Cannaerts
[email protected]
Programming today is a race between software engineers striving to build bigger and better idot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning -- Rich Cook
-
July 2nd, 2001, 11:16 AM
#3
Re: How can I tilt a image..
angle = 30 * 3.14 / 180
slope = Tan(angle)
for j = 0 to Picture1.ScaleHeight
i = (Picture1.ScaleHeight - j) * slope
BitBlt Picture2.hDC, i, j, Picture1.ScaleWidth, 1, Picture1.hDC, 0, j, vbSrcCopy
next
Picture2.Refresh
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|