You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, @pkulchenko, I am trying to use wxGraphicsContext and having a problem. I want to use wxGraphicsContext.GetTextExtent(), but how? The following code does not work.
frame = wx.wxFrame(wx.NULL, wx.wxID_ANY, "", wx.wxDefaultPosition, wx.wxSize(800, 600))
local gc = wx.wxGraphicsContext.Create(frame)
font = gc:CreateFont(wx.wxFont(10, wx.wxFONTFAMILY_SWISS, wx.wxFONTSTYLE_NORMAL, wx.wxFONTWEIGHT_NORMAL), wx.wxBLACK)
gc:SetFont(font)
local tw, th = gc:GetTextExtent("TEXT") -- This does not work
wxcore_graphics.cpp shows that GetTextExtent() accepts wxDouble arguments, but is there a way to create a wxDouble object and pass it to GetTextExtent()?
The text was updated successfully, but these errors were encountered:
Hi, @pkulchenko, I am trying to use wxGraphicsContext and having a problem. I want to use wxGraphicsContext.GetTextExtent(), but how? The following code does not work.
wxcore_graphics.cpp shows that GetTextExtent() accepts wxDouble arguments, but is there a way to create a wxDouble object and pass it to GetTextExtent()?
The text was updated successfully, but these errors were encountered: