HyperNext Studio

HyperNext Studio => General => Topic started by: venkat0249 on September 08, 2011, 06:17:12 PM

Title: Is it possible to insert morethan 1 image on same canvas?
Post by: venkat0249 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?
Title: Re: Is it possible to insert morethan 1 image on same canvas?
Post by: Malkom 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.