Page 1 of 1

PrintPreview & Center Image

PostPosted: November 15th, 2006, 3:09 pm
by tomas
Is there any way, how to center (horizontal and vertical direction) loaded bmp picture?

PostPosted: November 15th, 2006, 4:34 pm
by Johnny_Bit
Man, you draw it there, it's your job. Simply calculate it and put in right place.

PostPosted: November 15th, 2006, 6:00 pm
by tomas
OK.

I am drawing some vector data to PrintPreview Canvas. Is there any reason, how to move this data to the center of Canvas. Recalculate my data, it is not a simple problem :-) ...

Thanks...

PostPosted: November 15th, 2006, 8:44 pm
by Johnny_Bit
Wait, first you want to center bitmap, now vector data? man, get real!

For every problem, there's solution (algorithmic, or not). In your case I'd consider drawing on scalable vector graphics and then drawing that image on Preview's canvas. This way you can scale stuff, rotate and such and there would be no problem. Another way is dynamic bitmap creation. That way you draw your stuff on bitmap and draw bitmap on preview's canvas just like I said.

PostPosted: November 15th, 2006, 10:07 pm
by tomas
There are 2 possibilities: move vector data (coordinates x and y) before drawing or move bitmap (after drawing). I would like to ask you, if there is a possibility of moving some part of bitmap (with printpreview->canvas?) or setting up some x/y offset before drawing. If not, I have to solve the second way, modify x, y coordiantes.

PostPosted: November 16th, 2006, 4:32 pm
by Johnny_Bit
There's now way of moving drawn bitmap.