Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
44 user(s) are online (40 user(s) are browsing Forums)

Members: 2
Guests: 42

AmigaSociety, flash, more...

Support us!

Headlines

 
  Register To Post  

AmigaOS 4.0 datatypes, AISS and MUI
Just popping in
Just popping in


See User information
What is difference between programing AmigaOS 3.x and AmigaOS 4 datatypes? My friend use the same code in MUI aplication + AISS pictures (PNG+alpha). AmigaOS 3.x - everything work fine, AmigaOS 4 - I have black border around images. Hmm

Go to top
Re: AmigaOS 4.0 datatypes, AISS and MUI
Not too shy to talk
Not too shy to talk


See User information
@SZAMAN

That's strange. OS3 datatypes don't support alpha, OS4 datatypes do. So you should have a border around the images on OS3, but not on OS4.

Perhaps MUI does not support alpha blending and the images have a grey background. So you don't notice it on OS3, although it's there.

Bye,
Thomas

Go to top
Re: AmigaOS 4.0 datatypes, AISS and MUI
Just popping in
Just popping in


See User information
@thomas

MUI have "nothing to talk" in drawing topic. ;) MUI only calls a method MUIM_Draw, which is used for drawing procedures.

The code is simply as possible; this is the init part in
MUIM_Setup:

dto = NewDTObject(data->fileName,
DTA_GroupID, GID_PICTURE,
PDTA_DestMode, PMODE_V43,
OBP_Precision, PRECISION_EXACT,
PDTA_Remap, TRUE,
TAG_DONE);
if(dto)
{
struct image *gi = NULL;
struct BitMapHeader *bmh;

SetAttrs(dto,
PDTA_Screen, (ULONG)scr,
PDTA_UseFriendBitMap , TRUE,
TAG_DONE);

if (gi = (struct image *)MAllocVecPooled(sizeof(struct image)))
{
GetDTAttrs(dto, PDTA_BitMapHeader, (ULONG)&bmh, TAG_DONE);

gi->picObject = dto;
gi->imageFlags |= DFLG_Datatypes;
data->width = bmh->bmh_Width;
data->height = bmh->bmh_Height;


and draw procedure called in MUIM_Draw:

void drawDTPic(Object *dto, struct RastPort *rp, ULONG x, ULONG y, ULONG width, ULONG height)
{
struct BitMapHeader *bmh = NULL;
struct BitMap *bm = NULL;
BOOL success = FALSE;

if (DoMethod(dto, DTM_PROCLAYOUT, NULL, 1))
{
GetDTAttrs(dto, PDTA_BitMapHeader, (ULONG)&bmh, TAG_DONE);
if (bmh)
{
GetDTAttrs(dto, PDTA_DestBitMap, (ULONG)&bm, TAG_DONE);
}
}

if (DataTypesBase->lib_Version >= 44)
{
APTR handle = ObtainDTDrawInfoA(dto, TAG_DONE);
if (handle)
{
success = DrawDTObjectA(rp, dto,
x, y, width, height,
0, 0, TAG_DONE);
ReleaseDTDrawInfo(dto, handle);
}
}

if (!success)
{
APTR mask = NULL;
GetDTAttrs(dto, PDTA_MaskPlane, (ULONG)&mask, TAG_DONE);
if (mask)
{
BltMaskBitMapRastPort(bm, 0, 0, rp,
x, y, width, height,
ABC|ABNC|ANBC, mask);
}
else
{
BltBitMapRastPort(bm, 0, 0, rp, x, y,
width, height, ABC|ABNC|ANBC);
}
}
}

Go to top

  Register To Post

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project