realbasic-nug
[Top] [All Lists]

Re: Getting section of picture

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: Getting section of picture
From: Massimo Valle <maxduepuntozero at yahoo dot it>
Date: Sun, 30 Dec 2007 20:37:06 +0100
Delivered-to: listarchive at realsoftware dot com
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <283C6F6A-4B61-4992-B6C4-E38690FAB9FF at thezaz dot com>
On 30/dic/07, at 19:44, Thom McGrath wrote:

> I'm having some trouble grabbing a section of a picture object into a
> new picture. I need it to properly support the alpha channel as well.
> I also need to do so cross-platform and without plugins.
>
> The problem is that I cannot access the non-masked image data,
> otherwise I'd have a solution. I also don't appear to see a built-in
> function to do this.
>
> I could create a new picture, and simply use drawpicture, but this
> draws the source into the target with it's mask. If I then drawpicture
> the mask of the source into the mask of the target, I've got a double-
> mask situation. If there was (or is) a way I can draw the source into
> the target, ignoring the mask, then I'd have this taken care of.
>
> Is there something I'm missing?


You can draw the source mask into the target mask, then fillrect the  
source mask with &c000000 to strip the mask and then drawpicture the  
source into the target.

Massimo Valle



_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>


<Prev in Thread] Current Thread [Next in Thread>