nanogui: Setting background as transparent


Previous by date: 28 Sep 2006 04:16:12 +0100 Re: Setting background as transparent, celeber2.gmail.com
Next by date: 28 Sep 2006 04:16:12 +0100 Finding out width of a text string in terms of pixels, pratish ganguly
Previous in thread: 28 Sep 2006 04:16:12 +0100 Re: Setting background as transparent, celeber2.gmail.com
Next in thread:

Subject: Re: [nanogui] Setting background as transparent
From: "pratish ganguly" ####@####.####
Date: 28 Sep 2006 04:16:12 +0100
Message-Id: <fa595afb0609272016w3210391cw44a600c905176b17@mail.gmail.com>

Thank you all for helping me out.
This really solved my problem.
I am now able to print text with transparent background in my application.

Thanks and regards.

Pratish Ganguly

On 9/28/06, ####@####.#### ####@####.#### wrote:
>
> On Wed, 2006-09-27 at 18:51 +0530, pratish ganguly wrote:
> > Dear all,
> >
> > I am trying to write a string on top of an image using the API GrText(),
> but
> > the text is printed on a black background.
> > I tried searching on the net for the flags that can be used in the
> > GrSetFontAttr() as well as GrText() APIs for transparent background, but
> > couldn't fix the problem.
> > Am I missing something here ?
> > Please suggest me some pointers so that I can set the background as
> > transparent.
> >
> > Thanks and regard.
> >
> > Pratish Ganguly


 Try
>

> GrSetGCUseBackground(gc, GR_FALSE);
>
> Before writing your text. This causes the text background to be
> "transparent" as it does it paint the background color.
>
> Remember to
>
> GrSetGCUseBackground(gc, GR_TRUE);
>
> Before writing text with the set background color.
>
>
> tj
>
>
That's easy, just try to set you GC like this,
>         GrSetGCUseBackground(gc, GR_FALSE);
>         GrText(w, gc, 10, 30, "hey, don't touch me!!", -1, GR_TFASCII);
>
> Alex
>

Previous by date: 28 Sep 2006 04:16:12 +0100 Re: Setting background as transparent, celeber2.gmail.com
Next by date: 28 Sep 2006 04:16:12 +0100 Finding out width of a text string in terms of pixels, pratish ganguly
Previous in thread: 28 Sep 2006 04:16:12 +0100 Re: Setting background as transparent, celeber2.gmail.com
Next in thread:


Powered by ezmlm-browse 0.20.