02-09-2016 02:29 PM
hey,
i'm trying to create a billiard game.
to create the ball, i deafined int vals with GetBitmapFromFile,
my problem is that the images are rectangle and I need them to be rectangle,
but that every time i see only a squre part from the image, that way when the ball is rolling
we see differents parts from the image.
you can think about it like a cover image that is bare only in a squre part
that this is ball.
thanks and I hope someone can help with it/
02-10-2016 05:55 PM
Hi Stud24,
Just to get a better understanding of your application, I'd like to ask a few questions.
1.) Is the whole billiard table represented as a bitmap image, with a certain color representing the ball?
2.) After you create the bitmap using GetBitmapFromFile, what do you do with it? In other words, which functions are you calling and passing the bitmap ID to?
3.) Are you able to pad the image with extra blank space to make the full image a square, such that the whole table is shown onscreen?
02-22-2016 10:49 AM
Your bitmap can contain transparent pixels This way, you can "hide" the corners of your square bitmap.
If you're creating the image in some image editor, you should create a .png or an .ico image, which are image types that support some form of transparency.
If you're creating the bitmap programmatically in CVI, using NewBitmapEx or SetBitmapDataEx, read carefully the help for the Mark and/or Alpha parameters.
Luis