Re: wxEuphoria - text on a dc?

new topic     » goto parent     » topic index » view thread      » older message » newer message

Jerry Story wrote:
> 
> Jerry Story wrote:
>  
> > proc wx_printf( object win, sequence text, object format )   
> > proc wx_puts( object win, sequence text )  
> 
> I read the documentation a little better.
> 
> I have this.
> }}}
<eucode>
>    bmpSplash = create(wxBitmap,{BM_IN_MEMORY,300,500})
>    dc = create(wxMemoryDC,{bmpSplash})
> </eucode>
{{{

> 
> This tries to work and doesn't crash.
>    wx_puts({bmpSplash,3,3,dc},"hello")
> But it produces garbage.

Here's a quick modification to the splash_demo.exu that comes with the
wxEuphoria demos.  I get a white "Hello, World!" at the top of the 
splash screen.
without warning
include wxeud.e
	
constant 
	Win = create( wxFrame,{0, -1, "Save the Moon! (F1 for Help)", -1, -1} )	,
backgroundBMP = create( wxBitmap, {BM_FROM_FILE, "space.jpg",
wxBITMAP_TYPE_JPEG}) -- the background image

constant
	backDC = create( wxMemoryDC, {backgroundBMP})
set_text_color( backDC, create( wxColour, {255, 255, 255}))
wx_puts({backgroundBMP, 3, 3, backDC}, "Hello, World!")

constant
	splash = create( wxSplashScreen, {backgroundBMP, wxSPLASH_CENTRE_ON_SCREEN ,
		0,  Win,-1})

sleep(2)

destroy(splash)
wxMain( Win )


new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu