Special

Introducing the “Welcome to Xojo” Bundle!

New to Xojo and looking for guidance? We've put together a terrific bundle to welcome you! Xojo Bundle

This bundle includes six back issues of the magazine -- all of year 21 in printed book and digital formats -- plus a one-year subscription (beginning with 22.1) so you'll be learning all about Xojo for the next year. It's the perfect way to get started programming with Xojo. And you save as much as $35 over the non-bundle price!

This offer is only available for a limited time as supplies are limited, so hurry today and order this special bundle before the offer goes away!

Article Preview


Buy Now

Issue 10.2 ('Assumption Approach')
Instant purchase and download via GumRoad!

COLUMN

Being Transparent

Trying the New Transparency Feature of RS2011r4

Issue: 10.2 (January/February 2012)
Author: Marc Zeedar
Author Bio: Marc taught himself programming in high school when he bought his first computer but had no money for software. He's had fun learning ever since.
Article Description: No description available.
Article Length (in bytes): 11,953
Starting Page Number: 52
Article Number: 10210
Resource File(s):

Download Icon 10210 project.zip Updated: 2012-01-04 13:55:09

Related Link(s): None

Excerpt of article text...

One of the exciting new features of Real Studio 2011 Release 4 is the addition of transparency support for graphics. I don't always stay on the cutting edge of Real Studio releases, but this feature intrigued me enough to install it right away.

Unfortunately, I have discovered some issues with transparency. It's not bug-free. But when it works, it's really, really cool.

Using Transparency

On the surface, using transparency is simple. Within a graphics context you simply specify the transparency amount you want and then draw. If you set it to 50%, for instance, all your graphics would draw at half their normal visibility. This is great for all sorts of awesome special effects.

In practice, however, there are several issues with this command. The first is that the online documentation is wrong. Hopefully this is fixed by the time you read this, but as of this writing the Language Reference refers to graphics.translucency instead of graphics.transparency which is the real command. This could confuse beginners.

Another confusing thing is that Real Software has chosen to invert the way you'd expect the command to work. In every graphics program I've worked with, you set transparency via a percentage, so that 80% means it's 80% visible and 20% hidden. But with Real Studio's graphics.transparency setting it's the reverse: a setting of 80 means it's 80% hidden and 20% visible. (In other words, 100% means completely transparent instead of completely visible.)

...End of Excerpt. Please purchase the magazine to read the full article.