+ Reply to Thread
Results 1 to 2 of 2

Thread: DrawImage equivalent in WPF ?

  1. #1
    mikkevin is offline VB.NET Forum Newbie mikkevin is on a distinguished programming path ahead
    .NET Framework
    .NET 3.5 (VS 2008)
    Join Date
    Nov 2009
    Posts
    10
    Reputation
    11

    Default DrawImage equivalent in WPF ?

    I'm trying to figure out a way to do things the way DrawImage could do in WinForms. I want to be able to draw several images on the form surface or on an image control, with the images overlapping each other and at the same time being able to draw only a part of the source image. How do I do it ? I could use one of the overrides of DrawImage and draw only a portion of the source image over another image without actually erasing the background of the control.

    To give an example, say you've two images Image1 and Image2. You draw Image1 on the screen and now, you draw only a part of the Image2 (say a small rectangular part from the centre of Image2) onto Image1 which, would cover only a part of Image1 i.e. wihtout actually erasing the already drawn Image1.

    How would you go about it -
    1. You want Image2 and Image1 both to be opaquely drawn.
    2. You want to draw Image1 opaque and draw Image2 with partial transparency to cover a part of Image1 so that, Image1 shows thru' Image2 ?

    Any help would be greatly appreciated.

    Thanks.

  2. #2
    mikkevin is offline VB.NET Forum Newbie mikkevin is on a distinguished programming path ahead
    .NET Framework
    .NET 3.5 (VS 2008)
    Join Date
    Nov 2009
    Posts
    10
    Reputation
    11

    Default

    Anyone care to shed some light on the above ?

    Thanks.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Bookmarks

Posting Permissions

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