Click to See Complete Forum and Search --> : Center image to point.


bleah
January 4th, 2006, 06:32 PM
Hello

I wonder if you guys could give me some hint... I'm using StretchBlt()-method and what I would like to do is draw image to center of given x,y values. So coordinate would be at center of Image and not at left,top of drawn image.

Marc G
January 5th, 2006, 03:11 AM
If you want to draw your image centered at coordinates x,y, you need to blit the image to coordinates x-w/2 ; y-h/2 where w and h are the width and height of the image.