CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2004
    Location
    Bangalore, INDIA
    Posts
    20

    how to stretch a masked image?

    hai all,

    I am developing an application in VC++ 6.0, which is then migrated to WinCE using eVC++ 4.0.

    In my appln., i have to place a masked bitmap ( masking the original bitmap with a mask bitmap) on a dialog.
    Also, i have to stretch the masked bitmap and the dialog to fit to the target device screen.

    I don't know how to stretch the masked bitmap.

    Please help me.

    With thanks and Regards,
    T.Arun Chakaravarthy

  2. #2
    Join Date
    Nov 2003
    Location
    Belgium
    Posts
    8,150
    That depends on what kind of masked image it is...
    Is it a black/white mask: then you can try to stretch the image with some filtering and stretch the mask with the same amount but without any filtering.
    If the mask is a grayscale mask, you can try to stretch both the image and the mask with filtering and see what that gives.

    In any case, I think it's much better to recreate the bitmap to the correct dimensions instead of scaling it at runtime, certainly if it is for some GUI element.
    Marc Gregoire - NuonSoft (http://www.nuonsoft.com)
    My Blog
    Wallpaper Cycler 3.5.0.97

    Author of Professional C++, 4th Edition by Wiley/Wrox (includes C++17 features)
    ISBN: 978-1-119-42130-6
    [ http://www.facebook.com/professionalcpp ]

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

Featured