• Acolyte of the Butterfly
    Acolyte of the Butterfly
    Gelb
    Posts: 148 from 2003/3/4
    From: #amigazeux
    @rusback

    > In ANR, GUI is composed de "main.iff" (format .png 24 bits) with a pink
    > background, but on Ambient, ANR don't display the pink color but rather
    > the background of screen's Ambient instead ...

    > Is there one method to do this ???

    Yes, there is !!! :roll: :hammer:

    What you need to do is:

    a) Build a region (using region functions) out of the bits and pieces of your image that you want to have fully transparent.

    b) Use TransparencyControl(window, TRANSPCONTROLMETHOD_INSTALLREGION, [TRANSPCONTROL_REGION, mytransparencyregion, TAG_DONE]) (intuition.library) to set this region as the transparency region of your _window(obj) in any MUIM_Show of your choice and match it with TransparencyControl(window, TRANSPCONTROLMETHOD_INSTALLREGION, [TRANSPCONTROL_REGION, NIL, TAG_DONE]) in MUIM_Hide.

    So, in ANR's case, it collects all the pink pixels of the image into a region (NewRegion()/OrRectRegion()) in MUIM_Setup, installs this region in MUIM_Show, removes it again in MUIM_Hide and finally frees it via DisposeRegion() in MUIM_Cleanup. This all is done in its root group class.
  • »17.10.06 - 18:57
    Profile Visit Website