Re: [pygtk] Anti-aliasing ?

2000-03-15 Thread Torsten Landschoff

Hi Hrvoje, 

On Tue, Mar 14, 2000 at 09:11:08AM +0100, Hrvoje Niksic wrote:
 
> > In that case please file an important bug against python-gnome. I am
> > working on new packages but they will not get into potato unless
> > they fix a release critical bug.
> 
> How typical.  :-(

Probably I see this in a different light than you. Over time I learned it
is better to live with a package that mostly works and has only small bugs
then to upload a new package with just a minor bug fixed.

When I started working for Debian I was sure that I can check each package
I upload and be sure everything is right. But I learned that this is wrong.
Sometimes I only installed a new package to test something out and the
result was a broken package...

If you think that this bug is grave enough to risk breaking the package
it is okay. But if this only happens to a very small fraction of the 
users I think it is better to leave things as they are.

Thanks

Torsten

-- 
Torsten Landschoff   Bluehorn@IRC   <[EMAIL PROTECTED]>
   Debian Developer and Quality Assurance Committee Member
To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]



Re: [pygtk] Anti-aliasing ?

2000-03-14 Thread Hrvoje Niksic

Torsten Landschoff <[EMAIL PROTECTED]> writes:

> On Mon, Mar 13, 2000 at 02:05:39PM +0100, Hrvoje Niksic wrote:
> 
> > > What version of gnome-python do you have installed on your system?
> > 
> > 1.0.50-3 (Debian).
> 
> Hmm, does anybody know if this feature is needed by a lot of
> programs?

I have no idea what feature is in fact brkoen; I've only tried to run
the program, and it doesn't work.

> In that case please file an important bug against python-gnome. I am
> working on new packages but they will not get into potato unless
> they fix a release critical bug.

How typical.  :-(
To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]



Re: [pygtk] Anti-aliasing ?

2000-03-13 Thread Torsten Landschoff

Hi! 

On Mon, Mar 13, 2000 at 02:05:39PM +0100, Hrvoje Niksic wrote:

> > What version of gnome-python do you have installed on your system?
> 
> 1.0.50-3 (Debian).

Hmm, does anybody know if this feature is needed by a lot of programs?
In that case please file an important bug against python-gnome. I am 
working on new packages but they will not get into potato unless they
fix a release critical bug. And filing such a bug myself would look 
ugly at least ;)

cu
Torsten

-- 
Torsten Landschoff   Bluehorn@IRC   <[EMAIL PROTECTED]>
   Debian Developer and Quality Assurance Committee Member
To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]



Re: [pygtk] Anti-aliasing ?

2000-03-13 Thread François Pinard

Bernhard Herzog <[EMAIL PROTECTED]> écrit:
> François Pinard <[EMAIL PROTECTED]> writes:
> > Matt Wilson <[EMAIL PROTECTED]> écrit:

> > > The easiest way to do this by far is to use the canvas.  [...]
> > > The canvas does all this for you.

> > Thanks for the example, Matt, but this is not pure `pygtk' (or GDK)
> > anymore, if it needs `gnome.ui' and GnomeCanvas.

> I don't think there's a way to do what you want in pure pygtk.

I guess you are right.  I just played with GIMP a bit, and indeed, I did
not see anti-aliased lines in it.  The GIMP goal is images, and lines are
only used in interaction tools.  While I hope that `pygtk' gives access
to the whole GTK/GDK, it does not have to provide what these do not have!

By the way, I may sometimes look like moaning, but do not read me that way.
I'm quite satisfied with `pygtk' so far.  I observed a few glitches (memory
leaks, slight problems in some interfaces), but nothing serious that would
prevent immediate usage.  Problems were surely reported and are likely solved
in later versions.  I may not be running the latest/greatest one, but as it
stands, `pygtk' looks quite solid to me already, and I enjoy it a great deal.
This is a blessing for me, and I'm grateful to James and his collaborators.

> FWIW, the development versions of Sketch [...]

I saved a few messages about Sketch already, and maybe the time would be
right for me to give it a good look.  It sounds interesting and appealing.

> > So, I would like to know if/how I can, using GTK and GDK, and the `pygtk'
> > interface to both, create and handle an alpha channel [...]

With some luck, I'll stumble on solutions while pursuing my study.
Of course, early hints are welcome.  I'll do my homework, anyway :-).

 Keep happy, all.  It's fun being here!

-- 
François Pinard   http://www.iro.umontreal.ca/~pinard


To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]



Re: [pygtk] Anti-aliasing ?

2000-03-13 Thread Bernhard Herzog

François Pinard <[EMAIL PROTECTED]> writes:

> Matt Wilson <[EMAIL PROTECTED]> écrit:
> 
> > The easiest way to do this by far is to use the canvas.  [...]  The canvas
> > does all this for you.
> 
> Thanks for the example, Matt, but this is not pure `pygtk' (or GDK) anymore,
> if it needs `gnome.ui' and GnomeCanvas.

I don't think there's a way to do what you want in pure pygtk.

[...]
> So, I would like to know if/how I can, using GTK and GDK, and the `pygtk'
> interface to both, create and handle an alpha channel, and feel able do
> anti-alias myself if I want to (that is, if GTK has no provision for it).

Well, since doing it yourself probably requires a C-module, you might as
well sue libart for anti-aliased rendering. libart is the rendering
library for the anti-aliased gnome canvas and quite independent from
gnome.

FWIW, the development versions of Sketch contain some python-bindings
for libart that can render into libart rgb buffers and even into PIL
images (including alpha channels, but I haven't really tested that).
These bindings are somewhat sketch specific, though, so it might not be
all that easy to adapt them to a different application.

-- 
Bernhard Herzog   | Sketch, a drawing program for Unix
[EMAIL PROTECTED]  | http://sketch.sourceforge.net/
To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]



Re: [pygtk] Anti-aliasing ?

2000-03-13 Thread François Pinard

Matt Wilson <[EMAIL PROTECTED]> écrit:

> > The code below shows the case of a line needing anti-aliasing.
> > Would someone knowledgeable tell me if/how I can, within `pygtk',
> > produce an anti-aliased line, or else (:-), how I could handle an
> > alpha channel for later display?

> The easiest way to do this by far is to use the canvas.  [...]  The canvas
> does all this for you.

Thanks for the example, Matt, but this is not pure `pygtk' (or GDK) anymore,
if it needs `gnome.ui' and GnomeCanvas.

When things like Gnome get in the picture, the mix of versions to use is
never new and fine tuned enough.  As I wrote a few days ago, I would like to
stay oriented towards applications, without being drawn into UI development.
This would be much prematurate for me, as I still have a lot to learn first.
Moreover, as a proof by example, GIMP surely does a great deal successfully
while relying on GTK, without resorting to Gnome libraries.

So, I would like to know if/how I can, using GTK and GDK, and the `pygtk'
interface to both, create and handle an alpha channel, and feel able do
anti-alias myself if I want to (that is, if GTK has no provision for it).

> canvas = GnomeCanvas(aa=TRUE)

I tried your example here (using the software as found within SuSE 6.2), and
even if the line displayed is undoubtly different from what I got so far, it
seems to try to provide anti-alias by some strange use of dark points here
and there, all along.  Or maybe, presumably, it is a side effect of poor
colour map allocation (here, this is a 8-bit depth display).  I'm seeking
for more traditional anti-aliasing, where line pixel colours should be
picked from a ramp between the background and the foreground colour.

-- 
François Pinard   http://www.iro.umontreal.ca/~pinard


To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]



Re: [pygtk] Anti-aliasing ?

2000-03-13 Thread Hrvoje Niksic

James Henstridge <[EMAIL PROTECTED]> writes:

> What version of gnome-python do you have installed on your system?

1.0.50-3 (Debian).
To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]



Re: [pygtk] Anti-aliasing ?

2000-03-13 Thread James Henstridge

What version of gnome-python do you have installed on your system?  Also,
make sure you have a relatively new gnome-libs (ie. 1.0.5x) installed.  I
didn't have any trouble with Matt's example.

James.

--
Email: [EMAIL PROTECTED]
WWW:   http://www.daa.com.au/~james/


On 13 Mar 2000, Hrvoje Niksic wrote:

> Matt Wilson <[EMAIL PROTECTED]> writes:
> 
> > On Mon, Mar 13, 2000 at 09:10:06AM +0100, Hrvoje Niksic wrote:
> > > % python a.py
> > > GnomeUI-Message: The antialiased canvas is buggy.  Please do not use it unless 
>you know what you are doing.
> > 
> > I know what I'm doing. ;)
> > 
> > It's not bad in simple cases.  You have to get very complex before
> > you see major problems, and they're usually minor.
> 
> Hmm.
> 
> > You saw the anti-alised line though, right?
> 
> I didn't.  I even said so, but it got joined with the "To unsubscribe"
> line.
> 
> To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]
> 

To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]



Re: [pygtk] Anti-aliasing ?

2000-03-13 Thread Hrvoje Niksic

Matt Wilson <[EMAIL PROTECTED]> writes:

> On Mon, Mar 13, 2000 at 09:10:06AM +0100, Hrvoje Niksic wrote:
> > % python a.py
> > GnomeUI-Message: The antialiased canvas is buggy.  Please do not use it unless you 
>know what you are doing.
> 
> I know what I'm doing. ;)
> 
> It's not bad in simple cases.  You have to get very complex before
> you see major problems, and they're usually minor.

Hmm.

> You saw the anti-alised line though, right?

I didn't.  I even said so, but it got joined with the "To unsubscribe"
line.

To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]



Re: [pygtk] Anti-aliasing ?

2000-03-13 Thread Matt Wilson

On Mon, Mar 13, 2000 at 09:10:06AM +0100, Hrvoje Niksic wrote:
> % python a.py
> GnomeUI-Message: The antialiased canvas is buggy.  Please do not use it unless you 
>know what you are doing.

I know what I'm doing. ;)

It's not bad in simple cases.  You have to get very complex before you
see major problems, and they're usually minor.

You saw the anti-alised line though, right?

Matt

To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]



Re: [pygtk] Anti-aliasing ?

2000-03-13 Thread Hrvoje Niksic

Matt Wilson <[EMAIL PROTECTED]> writes:

> On Sun, Mar 12, 2000 at 11:36:22PM -0500, François Pinard wrote:
> > The code below shows the case of a line needing anti-aliasing.
> > Would someone knowledgeable tell me if/how I can, within `pygtk',
> > produce an anti-aliased line, or else (:-), how I could handle an
> > alpha channel for later display?  And if you see anything else
> > stylistically or logically wrong with this tiny program, also tell
> > me, as I'm still learning how to do my first steps!
> 
> The easiest way to do this by far is to use the canvas.  The
> "aa=TRUE" argument turns on anti-aliasing.  It also does alpha
> chanel for you.  With your program, you would also have to handle
> expose events and repaint the exposed area.  The canvas does all
> this for you.
...

When I run your program, I get:

% python a.py
GnomeUI-Message: The antialiased canvas is buggy.  Please do not use it unless you 
know what you are doing.

A window opens, but no contents in it.
To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]



Re: [pygtk] Anti-aliasing ?

2000-03-12 Thread Matt Wilson

On Sun, Mar 12, 2000 at 11:36:22PM -0500, François Pinard wrote:
> Hi, people.
> 
> The code below shows the case of a line needing anti-aliasing.  Would someone
> knowledgeable tell me if/how I can, within `pygtk', produce an anti-aliased
> line, or else (:-), how I could handle an alpha channel for later display?
> And if you see anything else stylistically or logically wrong with this
> tiny program, also tell me, as I'm still learning how to do my first steps!

The easiest way to do this by far is to use the canvas.  The "aa=TRUE"
argument turns on anti-aliasing.  It also does alpha chanel for you.
With your program, you would also have to handle expose events and
repaint the exposed area.  The canvas does all this for you.

from gtk import *
from gnome.ui import *

win = GtkWindow()

canvas = GnomeCanvas(aa=TRUE)
canvas.set_usize(200, 20)
canvas.set_scroll_region(0, 0, 200, 20)
canvas.root().add('line', points=(200, 0, 0, 20),
  width_pixels=1, fill_color='black')

win.add(canvas)
win.show_all()

mainloop()
To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]