User Tag List

Results 1 to 6 of 6

Thread: How to Blit cSurface with 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,236
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)

    How to Blit cSurface with alpha

    Hello,
    I try to blit cSurface but the alpha channel not works, I want to blit surface in another one and blit image:

    Code:
    if (!dest->HasAlpha() && source->HasAlpha())
                dest->CreateAlpha();
    Code:
    source->Blit(
    *dest,x,y,0,0,w,h,BMODE_TRANSP,BOP_COPY,0);
    Thanks for your help

  2. #2
    Clickteam Clickteam

    Join Date
    Jun 2006
    Location
    France
    Posts
    13,485
    Mentioned
    200 Post(s)
    Tagged
    2 Thread(s)
    If you want to copy the alpha channel to the destination surface, do this:

    source->Blit(*dest,x,y,0,0,w,h,BMODE_OPAQUE,BOP_COPY,0,BL TF_COPYALPHA);

  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,236
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    Merci Yves it's works fine but why there are a comment "Do not use in HWA mode) for this flag ?

  4. #4
    Clickteam Clickteam

    Join Date
    Jun 2006
    Location
    France
    Posts
    13,485
    Mentioned
    200 Post(s)
    Tagged
    2 Thread(s)
    Where is this comment? I don't see it.

  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,236
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    It's in the EDIF SDK: https://github.com/ClickteamLLC/wind...Surface.h#L166

    EDIT: I have a question: does I need compile in HWA mode and test it (rdPtr->isHwa) or it's not necessary with fusion 2.5 ?

    EDIT2: It work without BLTF_COPYALPHA flag on runtime

  6. #6
    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,236
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    I have an other question
    Is it possible to create a backdrop extension ? No visible in event editor and integrate collision type obstacle/plateform/ladder ?

Similar Threads

  1. Surface object blit area
    By iOSC in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 5th December 2013, 10:52 PM
  2. CSurface documentation
    By Phi in forum Extension Development
    Replies: 2
    Last Post: 11th December 2012, 02:31 PM
  3. How do I save a Blit image to an external file?
    By RGBreality in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 12th January 2011, 01:33 PM
  4. cSurface <-> Clipboard
    By Looki in forum Extension Developers Lobby
    Replies: 3
    Last Post: 13th March 2010, 07:18 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
  •