[Y-devel] Cairo 2D drawing library.

Sebastian Faubel sfaubel at gmx.de
Wed Feb 25 19:11:37 GMT 2004


Hi!

> Let's not repeat the same mistakes the X did and implement real 
> bezier curves instead of only lines, rectangles and axis oriented 
> ellipse. A nice API would have only a line sequence method and a 
> polygon method and both take bezier curves as parameters. Something 
> like how OpenGL draws lines and polygons, but with bezier curves 
> instead of lines between vertexes. Perhaps an option to select 
> border style with a brush.

You're right. Me and a friend of mine are currently implementing a
"enhanced" version of the rgbabuffer, called pixelbuffer, which is abled
to store either RGB or RGBA (or other) images in a more memory efficient
way than the current version does and add support for modular image file
loading.

We originally intended to use librsvg, but due to a very good tipp,
thanks to Claude Mench, we now consider using Cairo as a 2D drawing
library, which is entirely vector based, for this buffer when it's ready
for daily use in about a week or so...

Cairo has really well founded 2D drawing support, along with opengl
acceleration,a working SVG library, PNG support altogether in a very
handy small package. Despite it was originally intended as a extension
to X, one of its major goals is to be device independend so we can use
it to manipulate our pixelbuffers without having to use anything X
related.

We intend to replace the whole current rgbabuffer, but keeping it's
general structure where it's possible.. so themeing & 2D drawing
abilities should greatly improve by this time.
( I hope this goes with you, mark!? )

I think we're up with a working version in about 2 or 3 week, depending
on how much time we can spend on it ;)

> Has there been some decisions about the cordinate system used? I 
> hope it isn't fixed to pixels so that the UI can easily scale when 
> we have 200dpi displays after a couple of years.

As i said above, cairo is written to be device independend... just have
a look at it:

www.cairographics.org

greetings,

sebastian

PS. I tried to send this message to the list about 3 times now, but it
still didn't get posted... so i excuse for possible duplicate postings.




More information about the Y-devel mailing list









2026 © www.Y-Windows.Org - All Rights Reserved