Re: [pygtk] Curves, splines and libart

2003-03-06 Thread cybolic
Thanks all three of you for your answers.

I've already implemented an algorithm using the method I described in my
mail, if anyone is interrested in it... I'ts a but funny though, but gives
interresting results, probably has best use in interactive demos :) .

Cheers...

Christian / Cybolic


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


Re: [pygtk] Curves, splines and libart

2003-03-05 Thread cybolic
   libart in python? no, sorry.

Okay, but does anyone know _how_ one can create a curve?

I've though about using four x,y coordinates, start_x, start_y,
modify_left_x, modify_left_y, modify_right_x, modify_right_y, and end_x,
end_y, and then calculating a straight line from start_x,start_y to
end_x,end_y, modifying the line afterwards, but I can't quite get my head
wrapped around how.

   Maybe you should try gnomeprint. If you want interactivity, you should
 use gnome.canvas. They are both in the gnome-python package.

I'll look, but does it handle curves? And also, I'd rather use something
in Gtk or program it myself to avoid to many dependencies.


Cheers...

Cybolic


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


[pygtk] Curves, splines and libart

2003-03-04 Thread cybolic
Does anyone know how to draw an spline-curve?
Or any other fancy type of curve that the user can drag and tweak?
Is using art (libart) an option?

Cheers...
Christian / Cybolic


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


[pygtk] TreeView heights + drawing text

2003-02-26 Thread cybolic
I'm trying to write a routine that will set the height of the cells/rows
in a TreeView, but have been unable to see any way of doing this.

Is there a way?

Also, completely unrelated, is there a way to draw text to a drawable? It
seems it's unimplemented since Pango doesn't really work yet?

Thanks in advance for any replys

Cheers...

Christian / Cybolic


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


[pygtk] Help with gdk.Pixbufs, styles and what not

2003-01-30 Thread cybolic
I'm trying to write a sequencer (matrix) -widget, but I seem to be hitting
a wall.

I have implemented a matrix editor using 1 large Pixmap displayed in a
gtk.DrawingArea as the grid, and then drawing notes on the
gtk.DrawingArea.window.
This approach, however, becomes so slow it actually crashes X when
handling Pixmaps of some size.

I wanted to try and reprogram it using a gtk.Layout, but the Gtk C
documentation tells me to draw to Layout.bin_window, but I have been
unable to decode what this is in PyGtk. Some help?

I've also considered the idea of not _drawing_ to the gdk.Window when
creating the grid, but creating a small rectangle of the grid, and setting
this as the bg_gc in the widgets style, however I get the message the
bg_gc is only readable? How do I set styles then?

Also, I have experimented with using gdk.Pixbufs instead of gdk.Pixmaps,
but they only seem to work with gtk.Image and nothing else, drawing them
to a gdk.Drawable just doesn't work, and only the
gdk.Pixbuf.render_to_drawable actually exists, but doesn't do anything
Is this just impossible with PyGtk?

Of course I know I can't draw directly to the gdk.Pixbufs, this is not the
problem, should anyone be confused.

I sincerely hopy someone can help me, or I will probably have to drop the
idea of implementing a sequencer in Gtk (hmmm... Qt, maybe (yes, this is a
threat :P (no, not really ;) )))

Cheers...
Cybolic / Christian


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