How to place an image (JPG,, GIF, etc.) with YAB?

Forum thread started by Miroslav on Sun, 2007-04-15 12:53

Hi,

I am trying to learn YAB and to programm a small tool.
But I did not find any information how to place an image in a window.
I just want to place a simple image (JPG, GIF, etc.) within in window.
How can I do this?

I just saw a documentation how to place an image within a button... so it must be possible to place it as an independet element in the window, too.

Thanks for any information!

Miroslav

Comments

Re: How to place an image (JPG,, GIF, etc.) with YAB?

You can just create a vanilla BView and call DrawBitmap() on that.
I assume you use Translator Kit's GetBitmap() or GetBitmapFile() to fetch the BBitmap.

Re: How to place an image (JPG,, GIF, etc.) with YAB?

@ Miroslav
Hi, you are develop with yab :-) nice.
I am from www.team-maui.org, we make yab.
Do you need support, please visit the yab forum,
www.yab.beosmax.org.
For info, yab is not 100% run in haiku, in time runs yab 100% in BeOS r5. Haiku is not finish, so can't yab perfectly works in time.

Quick support:
you can load any image format what the OS you give per Translator, yab used the Translator from the OS
(nice OS Desing). In yab script can you load the image so:
err = DRAW IMAGE x1,y1 TO x2,y2, Image$, View$

see the line 153 and upper = http://yab-interpreter.cvs.sourceforge.net/yab-interpreter/yab-interpret...

yab have more intresting stuff with Bitmap and Canvas support in yab, thats cool and works good, this is a big think for making small 2D games ;-)

I hope i can help you.

MFG Ralf Schülke aka stargater

Re: How to place an image (JPG,, GIF, etc.) with YAB?

Hello,

take a look at my first yab beginners tutorial on BeSly:

http://www.besly.de/menu/search/archiv/dev/yab_tutorial_eng.html

there you can find an example, how to place a picture.

Greetings Lelldorin