0

Hello People that are willing to help me,

I've written a small program that draws Covers for music. The program works fine on windows but i now have to run it on Linux and one function seems to make some trouble.

Note: I've really few knowledge about wx and GTK.

Ok lets have a look.

This is what i do to initialize the graphic:

app         = wx.PySimpleApp()


bitmap      = wx.EmptyBitmap(width = width_bitmap, height = height_bitmap)
dc          = wx.MemoryDC(bitmap) # Dieser DC zeichnet nur im Speicher

dc.SetBackground(wx.Brush(backgroundcolor, wx.SOLID))
dc.Clear()


gc = wx.GraphicsContext_Create(dc)

I copied it from somewhere and i have not really an idea what it does. But it works fine.

Later I'm doing this:

gc.SetPen(wx.Pen(actual_color,3,wx.SOLID))
gc.DrawEllipse(x, y, width, height)

this causes that the output is only the background color i have set after the internalizing. If i Change DrawEllipse to DrawLines everything works fine and i can see all other figures and texts that should be there.

I'm Using Linux Ubuntu 12.10 and Windows 7 with the PythonXy kit.

Please help. I need it :)

Christian Kaiser
  • 160
  • 1
  • 1
  • 10
  • does it give an error? ... all that stuff is built on top of system libraries ... DrawEllipse may not be a method thats available to that flavor of linux (although that seems kind of strange) – Joran Beasley Mar 11 '13 at 16:45
  • It runs without any message. But i some time ago i had also a problem with wx don't showing me an internal Error. Maybe someone else could run my code? Could some lib that PythonXY contains, be missing in Linux? – Christian Kaiser Mar 11 '13 at 17:22

1 Answers1

0

Try forcing a paint event with Refresh().

Scruffy
  • 908
  • 1
  • 8
  • 21