Re: Drawing antialiased shapes with alpha transparency



On Tue, 2005-01-04 at 16:56 -0500, Paul Davis wrote:
> >The reason for this is that I am creating a Canvas drawing all kinds of
> >shapes and I want to cache some shapes in a Pixmap, which is a member of
> >the Component (Composite Pattern).
> 
> if you use an AA canvas, you can forget all this stuff.

I have used the Gnomemm-Canvas before (~max 1 year ago), but even in
simple test cases it had display error back then. Also, from what I have
read on a gnome mailing last month (unfortunately I was not able to find
the mail again) the gnome canvas is now basically unmaintained.

Also, the Canvas I am writing (it already works for non-antialiased
polygons) supports rotation of any shape, client defined or other.

> just render
> whatever you need to draw to an RGB buffer, add the "A" (for alpha)
> and render it into the canvas as a canvas image item.

I have found Gdk::RGB mentioned all over the API docs, but I didn't find
it documented anywhere. I only found
http://www.gtkmm.org/docs/gtkmm-2.4/docs/reference/html/classGdk_1_1RgbCmap.html
in the Gdk namespace. Is this what you mean with the RGB buffer? How
would I draw that to a drawable?

I just saw Drawable::draw_rgb_image(), I suppose this is basically what
you mean.

> GTK has no AA support natively except for fonts.

Ugh. Are there any libraries you recommend for using with Gtk? Anything
that may draw to an RGB buffer, maybe? (I can recall hearing something
about an Gtk SDL widget, but that sounds like a large dependency to me,
so I would like to avoid it (and I am not even sure whether the SDL
supports AA.)).

Thanks,
-Samuel
-- 
 ------------------------------------------------------
|      Samuel Abels       |   http://www.debain.org    |
| spam ad debain dod org  | knipknap ad jabber dod org |
 ------------------------------------------------------



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]