1. create CText and pixmap

Hi everyone,

Retro: the bitmaps that were placed in a window disappeared when the window
was resized. I solved this problem by using a pixmap.
New problem: I can't use "create Ctext" to place text in a pixmap. When a
draw a pixmap over text the text is not visible anymore. My solution was
this:
divide the screen in different areas. Use "create Ctext" for the areas
where text is involved and bitBlt for the areas with bitmaps. For the "text
areas" is use setBitmap and then I put the text over the bitmap. This works
but has major drawback. It's slow. When I reopen a minimized window the
bitBlt part is done immediately. The setBitmap follows shortly and the text
a while after. I think because the last two are not imbedded in a
procedure.
Has anyone a better solution?

Bye,

Jasper.

new topic     » topic index » view message » categorize

2. Re: create CText and pixmap

> New problem: I can't use "create Ctext" to place text in a pixmap. When a
> draw a pixmap over text the text is not visible anymore.

... don't use ... create(CText......

Partial example: To write text in a pixmap:

setTextColor(your_pixmap_id,Black)
setFont(your_pixmap_id,"MS Sans Serif",18,or_all({Bold,Italic}))
setPosition(your_pixmap_id,10,10)
wPuts(your_pixmap_id,"Some Text in a PixMap")

... basically, you are writing text into your pixmap, after loading your BMP
into the pixmap, and *before* displaying it.

new topic     » goto parent     » topic index » view message » categorize

3. Re: create CText and pixmap

Hi Wolf,

I tried your suggestion but I couldn't get it working. No matter where I
put it in the code. Do you have / know a bigger example?

Thanks,

Jasper.





Wolf
<wolfritz@KING       To:     EUforum <EUforum at topica.com>
.IGS.NET>            cc:
Subject:     Re: create  CText and
                                         pixmap
05-11-2001
18:35
Please respond
to EUforum







> New problem: I can't use "create Ctext" to place text in a pixmap. When a
> draw a pixmap over text the text is not visible anymore.

... don't use ... create(CText......

Partial example: To write text in a pixmap:

setTextColor(your_pixmap_id,Black)
setFont(your_pixmap_id,"MS Sans Serif",18,or_all({Bold,Italic}))
setPosition(your_pixmap_id,10,10)
wPuts(your_pixmap_id,"Some Text in a PixMap")

... basically, you are writing text into your pixmap, after loading your
BMP
into the pixmap, and *before* displaying it.

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu