April 26, 2024, 01:30:32 PM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


Font is not Drawn with background Transparent

Started by Zooker, April 02, 2008, 07:58:13 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Zooker

I need the Fonts Drawn In Magent and Placed on a Dark blue starlit sky(Bitmap). I thought the code below would do the trick!
It Displays the bitmap correctly but the Fon t is displayed in Magent on a cream colored background. Can you tell me what I did wrong?

Ionic Wind Support Team

What code?

In any event see the users guide DRAWMODE command:

DRAWMODE win, @TRANSPARENT

Ionic Wind Support Team

Zooker

Below is my Code.

def w1:window
def bitmap:int
def x,y,w,h,scale:int
def filename,filter:string
x=0
y=0
w=1024
h=768
Hue=Rgb(255,0,255)
WINDOW w1,x,y,w,h,@NOCAPTION|@BORDER,0,"",Mainwindow

bitmap = LoadImage("StarMap3.bmp",@IMGSCALABLE)
   ShowImage w1,bitmap,@IMGSCALABLE,x,y,w,h
    DrawMode w1,@TRANSPARENT
    FRONTPEN w1, Hue
   Had Drawmode in this place Originally but it didn't work either!!
    SETFONT w1, "Arial", 72, 700
     Move w1,110,130     
     Print w1,"Check Chum"
    SETFONT w1, "Arial", 24, 700
     Move w1,450,400     
     Print w1,"By"
    SETFONT w1, "Arial", 40, 700
     Move w1,310,582     
     Print w1,"STAR_soft International"
move w1,500,660

Above is code. I tried  placing Drawmode in 2 different places, but it still don't work. I can't find any examples using Drawmode.\I think my machine seems to be operating correctly. I have an ATI XT1900 video card and the drivers are correct. What have I  done wrong or haven't done?

GWS

Hi Zooker,
I've played about a bit with your code, and this seems to be OK ..  :)

You can put the 'Drawmode' statement anywhere in the code before you draw the first line of text ..

Don't forget to delete your bitmap before you close the window so that you free up Windows resources ..

all the best, :)

Graham
Tomorrow may be too late ..