| C T L _ A D D C O N L O G O ( )
| | | | | SOURCE: qdev_autodocs.txt 1.163 (12/09/2014) English
AMIGA - CTL_#?
----------------------------------------------------------------------------
NAME
ctl_addconlogo() - Adds logo to the fullscreen CLI.
SYNOPSIS
ptr = ctl_addconlogo(cc, bm, x, y);
void *ctl_addconlogo(struct ctl_csn_cwin *,
struct BitMap *, UWORD, UWORD);
FUNCTION
This function allows to add logo(BitMap) in the upper-
left corner of the fullscreen CLI.
INPUTS
cc - Pointer to desired window.
bm - Standard BitMap structure.
x - Position in X axis.
y - Position in Y axis.
RETURNS
Returns pointer to the logo data or NULL if something
went wrong.
BASES
SysBase, DOSBase, GfxBase, IntuitionBase
NOTES
You should call this function as soon as you open the
CLI cus it will use console stream('cd_con') to rescale
its UI area.
You will have to take care of the palette if your pict.
does not comply to ANSI colors. If you need full-auto
setup then use 'guigfx.library' it will do its best for
your picture too look best.
Maximum space used for the logo in Y axis is determined
with a fixed value! See source code for more details.
This function uses private task exception mechanism,
but addresses of the bitmaps with params and data can
be put on stack.
The easiest way to embed logo in your proggy is to use
so famous 'PersonalPaint'(ver. 7). You then setup colors
according to the fullscreen CLI palette, draw the logo,
cut it and save as a brush using 'C Source' plugin. Then
you include that file(its a header) in your program and
pass it to the 'mem_convimgtobmap()' and you are done.
Please note that 'gcc' does not understand 'chip' key.,
so you will have to '#define chip'. Plus if you do not
use patches like 'fblit' then you will have to
'mem_copyitnimage()' into chip mem before doing conv. or
else your picture will be trashy! This is not necessary
if you use gfx board tho, but your code may not run too
well anywhere else! See 'testsuite/conscreen-test.c' for
more details.
If you want to reserve the area only then make an empty
BitMap with 'mem_initemptybmap()'.
SEE ALSO
ctl_remconlogo(), ctl_swapconlogo()
EXAMPLE
...
void *logo;
struct ctl_csn_cwin *cc = <yourconsole>;
struct BitMap *bm = <yourbitmap>;
...
if ((logo = ctl_addconlogo(cc, bm, 0, 0)))
{
...
ctl_remconlogo(logo);
}
BUGS
None known.
----------------------------------------------------------------------------
| |
| |