realbasic-nug
[Top] [All Lists]

Re: Picture mask changed in 2008r2?

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: Picture mask changed in 2008r2?
From: Joe Strout <joe at inspiringapps dot com>
Date: Fri, 30 May 2008 16:40:23 -0600
Authentication-results: mx.google.com; spf=pass (google.com: domain of realbasic-nug-bounces at lists dot realsoftware dot com designates 66.116.103.65 as permitted sender) smtp dot mail=realbasic-nug-bounces at lists dot realsoftware dot com
Delivered-to: listarchive at realsoftware dot com
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <77124270805301112ja025ec1i5295f790cf52d33b at mail dot gmail dot com> <BAY107-DAV13E1BCBA0B8DD7A3965E3D93BE0 at phx dot gbl> <77124270805301302v4b6f531by1501155ebce893f at mail dot gmail dot com> <298EE353-3AE8-4792-B9D1-2E199601FBFE at mac dot com> <A2A4DD56-8DD5-44AB-8051-4129D48690B0 at declareSub dot com> <0A813D77-FDDE-4FD7-A5C1-E18EE0C2202E at great-white-software dot com> <8B4BD697-63A2-4531-B0F2-0B5EFE5A7353 at workinsoft dot com>
On May 30, 2008, at 4:21 PM, Sean Arney wrote:

>   Oddly, this no longer seems to work:

What's odd is that this ever worked.

> Dim p As Picture
>   Dim m As Picture
>
>   p = UKIcon128
>   p.Mask = UKIcon128M

You should not have been able to assign to picture.Mask.  Picture.Mask  
is an accessor (like a computed property) that returns a new or  
existing picture.  Assigning to it has never been supported AFAIK.

>   p.Transparent = 1

And this is pointless if your picture has a mask.  Use Transparent  
mode, or use a Mask; you can't use both.

When you do try to use both, I don't think the behavior is defined.

> What the hey?  Anyone know whats up here?  It says at p.Mask =
> UKIcon128M that this method or property does not exist.

Good for it.  Sounds like they fixed the bug that let you believe you  
were assigning to the Mask property.  Instead, you should do:

  p.Mask.Graphics.DrawPicture UKIcon128M, 0, 0

And leave out the .Transparent line entirely.

Best,
- Joe

--
Joe Strout
Inspiring Applications, Inc.
http://www.InspiringApps.com



_______________________________________________
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>