Results 1 to 3 of 3

Thread: Masks?

  1. #1

    Thread Starter
    Lively Member Spie's Avatar
    Join Date
    Jul 2000
    Location
    On a very small coconut somewhere near Mars
    Posts
    126

    Unhappy Masks?

    I need some help with masks. I want to make a sprite with transperent areas around it. I know how to make the mask, but I don't know how to make the picture transperent when the prgram is running. Please help
    . <--My coconut

    (o) <--My L33t Coconut

    http://www.megatokyo.com/

  2. #2
    Fanatic Member
    Join Date
    Feb 2000
    Location
    Israel
    Posts
    636
    It's like this (simple):

    - Draw one picture (BMP) with a black (rgb(0,0,0)) background.
    - With the same pic you color all the not(BLACK) pixels
    in BLACK, and the original Background black, turn it to
    WHITE (rgb(255,255,255)).
    - When you have those two pics draw them with BitBlt like this:
    BitBlt TheOneWithBlackBack.hdc,...,vbSrcAnd
    BitBlt TheOneWithWhiteBack.hdc,...,vbSrcInvert


    When the black & the white backgrounds gets into a transparent back.
    That's all.

    Arie. (mag.up.co.il)

  3. #3
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134
    There's a full bitblt tutorial here:
    http://vbden.tripod.com/articles/invmask.htm
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

Posting Permissions

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



Click Here to Expand Forum to Full Width