Author Topic: Is it possible to insert morethan 1 image on same canvas?  (Read 1841 times)

venkat0249

  • Newbie
  • *
  • Posts: 22
Is it possible to insert morethan 1 image on same canvas?
« on: September 08, 2011, 06:17:12 PM »
Is it possible to insert 2 or 3 images which can be of different sizes in one particular canvas?

Malkom

  • Administrator
  • Newbie
  • *****
  • Posts: 397
  • Here to help you
Re: Is it possible to insert morethan 1 image on same canvas?
« Reply #1 on: September 10, 2011, 10:23:32 AM »
Is it possible to insert 2 or 3 images which can be of different sizes in one particular canvas?

Yes, you could store the images in different image banks and use the ImageBankToCanvasArea command to place that image in the required part of the canvas.

Code: [Select]
Local w,h

ImageBankReserve(2)

@ place at coords 0,0 within canvas 1, keep original size
ImageBankLoad(1,'pic1.jpg')
Put ImageBankWidthFN(1) into w
Put ImageBankHeightFN(1) into h
ImageBankToCanvasArea(1,1,0,0,w,h,0,0,w,h)

@ place at coords 100,200 within canvas 1, resize to 50, 90
ImageBankLoad(2,'pic2.jpg')
Put ImageBankWidthFN(2) into w
Put ImageBankHeightFN(2) into h
ImageBankToCanvasArea(2,1,0,0,w,h,100,200,50,90)

There are details on this in the Language Reference PDF.
I am sorry but I do not have time to answer questions by PM or email.
If you post your questions in this forum then it might help others.

 

anything