On certain win32 platforms, dashed lines with the dash list explicitly
set appears to be broken.  I have seen this on Windows 98 and Windows
ME (though my Windows XP box appears to be working fine).  I am not
sure this is OS specific, but these are the platforms I've tested on.

Here is the example script, which runs fine (draws a dashed line)
under linux

import pygtk
pygtk.require('2.0')
import gtk
from gtk import gdk

def draw(widget):
    gc = widget.window.new_gc()
    gc.line_style = gdk.LINE_ON_OFF_DASH
    gc.set_dashes(0, [6,6])
    x = range(0,100,2)
    y = [2*val for val in x]
    
    widget.window.draw_lines( gc, zip(x, y) )
    
def configure_event(widget, event):
    draw(widget)
    return gtk.TRUE

def expose_event(widget, event):
    draw(widget)
    return gtk.TRUE

win = gtk.Window()
win.set_size_request(100, 200)
win.show()


vbox = gtk.VBox()
vbox.show()
win.add(vbox)

da = gtk.DrawingArea()
da.connect('configure_event', configure_event)
da.connect('expose_event', configure_event)
da.show()
vbox.pack_start(da, gtk.TRUE, gtk.TRUE)

button = gtk.Button('Quit')
button.show()
vbox.pack_start(button, gtk.FALSE, gtk.FALSE)
button.connect('clicked', gtk.mainquit)
gtk.mainloop()


I tested on 3 win32 platforms with

  * Python-2.3.2-1.exe from python.org

  * http://www.pcpm.ucl.ac.be/~gustin/win32_ports/binaries/pygtk-2.0.0.win32-py2.3.exe
 
  * GTK-Runtime 2.2.4.1 from
    http://prdownloads.sourceforge.net/gtk-win

Can anyone else replicate this? My Win98 and WinME failed, and Windows
XP succeeded.  

I'm happy to do a bugzilla but would like to collect some more OS
specific info from others.

BTW - I have a lot of trouble searching bugzilla.  For example, if I
go to http://bugzilla.gnome.org/query.cgi and choose gnome-python as
the product with version unspecfied, and search for 'xid' in the
Summary or Description Text field (I know there was an earlier bug
report related to xid so I'm using it as a test case) I get "Zarro
Boogs found".  Is there a better way of searching bugzilla for known
bugs?

Thanks,
John Hunter
_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to