Hi,
Kenneth Forsbäck yazmış:
> Hi,
>
> I've been all over the net, but have found no decent documentation on
> this matter, and I simply don't get it to work.
>
> I'm only trying to draw a bitmap onto a frame, simple as that.
>
> local bitmapFoo = wx.wxBitmap("foo.bmp", wx.wxBITMAP_TYPE_BMP, 300, 400)
> local dc = wx.wxClientDC(instanceFoo)
> dc:DrawBitmap(bitmapFoo, 0, 0, false)
> dc:Delete()
>
> What's wrong here...O_O...I don't get it
>
Did you investigate scribble.wx.lua sample?
ie.
function OnPaint(event)
-- ALWAYS create wxPaintDC in wxEVT_PAINT handler, even if unused
local dc = wx.wxPaintDC(panel)
if bitmap and bitmap:Ok() then
if redrawRequired then
DrawBitmap(bitmap)
redrawRequired = false
end
dc:DrawBitmap(bitmap, 0, 0, false)
end
dc:Delete() -- ALWAYS Delete() any wxDCs created when done
end
--
Regards,
Hakki Dogusan
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
wxlua-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wxlua-users