StringShape Problem (Real Studio network user group Mailinglist archive)

Back to the thread list
Previous thread: Associating a RealDB with an App
Next thread: Editing source code as outlines


StringShape Problem   -   Luke Jackson
  Re: StringShape Problem   -   Joseph J. Strout
  Re: StringShape Problem   -   Thomas Reed
  Re: Re: StringShape Problem   -   Luke Jackson

StringShape Problem
Date: 13.12.02 05:57 (Thu, 12 Dec 2002 22:57:19 -0600)
From: Luke Jackson
I am working on watermarking images and am using the StringShape to write to
the graphics of images. It is working well, but I have run into a bug (or it
could be me). I have a sliderbar for the transparency. The value of the
slider is put in an editfield (transfield). In the paint for the canvas I
have the below code (well more, but I cut it down)

dim i,i2 as integer
dim s,s2 as stringShape

////////line 1 /////////////
s = new stringShape
s.text = waterfield.text

s.fill = val(transField.text)

g.drawobject s, picX, PicY

The problem is that the slider goes from 0 to 100. If the slider.value is
less that 50 the text is 100% transparent and above 50 it is 100% opaque. I
was hoping to move the transparency of the text by the fill. Any ideas?

Thanks

Luke

---
A searchable archive of this list is available at:
<http://dbserver.realsoftware.com/KBDB/search.php>

Unsubscribe:
<mailto:<email address removed>>

Subscribe to the digest:
<mailto:<email address removed>>

Re: StringShape Problem
Date: 13.12.02 06:05 (Thu, 12 Dec 2002 21:05:42 -0800)
From: Joseph J. Strout
At 10:57 PM -0600 12/12/02, Luke Jackson wrote:

>The problem is that the slider goes from 0 to 100. If the slider.value is
>less that 50 the text is 100% transparent and above 50 it is 100% opaque.

Yes, those are the two levels of transparency supported by the
QuickDraw and Win32 renderers.

Cheers,
- Joe

Re: StringShape Problem
Date: 13.12.02 17:04 (Fri, 13 Dec 2002 10:04:27 -0600)
From: Thomas Reed
>The problem is that the slider goes from 0 to 100. If the slider.value is
>less that 50 the text is 100% transparent and above 50 it is 100% opaque. I
>was hoping to move the transparency of the text by the fill. Any ideas?

I don't think this will be supported until RB 5.0. Even then, maybe
only on OS X using Quartz, if I'm interpreting Joe's post correctly.

Re: Re: StringShape Problem
Date: 13.12.02 13:55 (Fri, 13 Dec 2002 06:55:46 -0600)
From: Luke Jackson
So what I should really be doing is playing with the fillcolor not the fill.
I guess that I will make it really a brighten routine and call it
transparency.

Thanks for the quick response Joe.

Luke



on 12/12/02 11:31 PM, REALbasic Network Users Group at
<email address removed> wrote:

> Subject: Re: StringShape Problem
> From: "Joseph J. Strout" <<email address removed>>
> Date: Thu, 12 Dec 2002 21:05:42 -0800
>
> At 10:57 PM -0600 12/12/02, Luke Jackson wrote:
>
>> The problem is that the slider goes from 0 to 100. If the slider.value is
>> less that 50 the text is 100% transparent and above 50 it is 100% opaque.
>
> Yes, those are the two levels of transparency supported by the
> QuickDraw and Win32 renderers.
>
> Cheers,
> - Joe

---
A searchable archive of this list is available at:
<http://dbserver.realsoftware.com/KBDB/search.php>

Unsubscribe:
<mailto:<email address removed>>

Subscribe to the digest:
<mailto:<email address removed>>