Click to See Complete Forum and Search --> : How can I tilt a image..


cuit
July 2nd, 2001, 08:43 AM
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...

Cakkie
July 2nd, 2001, 08:54 AM
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
slisse@planetinternet.be

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

shree
July 2nd, 2001, 11:16 AM
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