User Tag List

Results 1 to 9 of 9

Thread: Canal Alpha

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export ModuleInstall CreatorInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Aug 2006
    Location
    France
    Posts
    1,263
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)

    Canal Alpha

    Bonjour, je voudrais gérer le canal alpha dans mon extension.
    J'ai donc une question pour Yves [img]<<GRAEMLIN_URL>>/smile.gif[/img]
    Je ne sais pas si tu te souviens de la technique que tu m'avais proposée pour l'objet 9-slice. (Copier toutes les images en opaque puis copier la surface finale en transparent.)
    Je voudrais savoir si cette technique n'empêche pas d'afficher les images en alpha car je n'y arrive pas.

    Merci.

  2. #2
    Clickteam Clickteam

    Join Date
    Jun 2006
    Location
    France
    Posts
    14,022
    Mentioned
    279 Post(s)
    Tagged
    3 Thread(s)

    Re: Canal Alpha

    Je ne me rappelle plus exactement mais pour ça doit être possible. Je pense que ceci devrait marcher :

    1. Quand tu copies une image en opaque dans la surface intermédiaire, vérifie si l'image a un canal alpha (fonction HasAlpha des surfaces). Si oui, et si le canal alpha de la surface intermédiaire n'a pas encore été créé, crée le avec la fonction CreateAlpha.

    2. La fonction Blit que tu utilises pour copier les images en mode opaque doit prendre en dernier paramètre des flags. Ajoute BLTF_COPYALPHA à ces flags.

    Ca pourrait marcher (presque sûr mais pas à 100%).

    Yves.

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export ModuleInstall CreatorInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Aug 2006
    Location
    France
    Posts
    1,263
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)

    Re: Canal Alpha

    J'ai mis ces lignes juste avant le Blit
    <div class="ubbcode-block"><div class="ubbcode-header">Code:</div><div class="ubbcode-body ubbcode-pre" ><pre>if(is.HasAlpha())
    is.CreateAlpha();</pre></div></div>
    Mais ça n'affiche plus l'image si elle contient de l'alpha.
    Il faut mettre la fonction CreateAlpha avant ou après le Blit ?

  4. #4
    Clickteam Clickteam

    Join Date
    Jun 2006
    Location
    France
    Posts
    14,022
    Mentioned
    279 Post(s)
    Tagged
    3 Thread(s)

    Re: Canal Alpha

    Ah... en fait ça ne marchera que si les images ont toutes un canal alpha...

    Si elles ne sont pas affichées même si elles ont un canal alpha alors c'est qu'il y a un souci avec le flag BLTF_COPYALPHA. Tu peux me montrer le code du Blit?

  5. #5
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export ModuleInstall CreatorInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Aug 2006
    Location
    France
    Posts
    1,263
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)

    Re: Canal Alpha

    Voici le Blit pour chacune des images:
    <div class="ubbcode-block"><div class="ubbcode-header">Code:</div><div class="ubbcode-body ubbcode-pre" ><pre>is.Blit(ps, x, y,0,0,iWidth, iHeight, BMODE_OPAQUE, BOP_COPY, 0,BLTF_COPYALPHA);</pre></div></div>

    Et voici celui pour tout l'objet :
    <div class="ubbcode-block"><div class="ubbcode-header">Code:</div><div class="ubbcode-body ubbcode-pre" ><pre>ps.Blit(*surf, xPos, yPos, bm, bo, effectParam,BLTF_COPYALPHA);</pre></div></div>

  6. #6
    Clickteam Clickteam

    Join Date
    Jun 2006
    Location
    France
    Posts
    14,022
    Mentioned
    279 Post(s)
    Tagged
    3 Thread(s)

    Re: Canal Alpha

    Le premier est bon, mais il ne faut pas utiliser BLTF_COPYALPHA pour le deuxième.

  7. #7
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export ModuleInstall CreatorInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Aug 2006
    Location
    France
    Posts
    1,263
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)

    Re: Canal Alpha

    Merci beaucoup Yves, ça fonctionne à présent [img]<<GRAEMLIN_URL>>/smile.gif[/img]
    Il faudra un jour que tu m'explique pour HWA [img]<<GRAEMLIN_URL>>/smile.gif[/img]

  8. #8
    Clickteam Clickteam

    Join Date
    Jun 2006
    Location
    France
    Posts
    14,022
    Mentioned
    279 Post(s)
    Tagged
    3 Thread(s)

    Re: Canal Alpha

    Ah oui, là il faudrait que je vois le code source, les optimisations HWA sont simples mais dépendent du contexte.

  9. #9
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export ModuleInstall CreatorInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Aug 2006
    Location
    France
    Posts
    1,263
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)

    Re: Canal Alpha

    Ok je te l'envoi cet après midi, et puis tu regardes quand tu veux [img]<<GRAEMLIN_URL>>/smile.gif[/img]

Similar Threads

  1. iOS and alpha channels
    By ratty in forum iOS Export Module Version 2.0
    Replies: 5
    Last Post: 12th February 2013, 04:25 PM
  2. TRANSPARENCE ET CANAL ALPHA
    By 150542 in forum File Archive
    Replies: 5
    Last Post: 26th February 2009, 07:41 PM
  3. Alpha Performance
    By artician in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 5th June 2008, 07:55 AM
  4. Alpha channel or an Active with Alpha?
    By Blizna in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 21st November 2006, 12:14 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •