Re: Canvas shortcomings

Owen Taylor <otaylor redhat com> writes:

> The main difference from something like X is that to
> draw a hollow rectangle, you would:

It might be interesting to put GDK on top of something like this.  I
have heard something about a canvas based GTK.  Is it something like
that you have in mind?

It could be a performance advantage if some of X's real and perceived
slowness is because of context switching due to handling lots of
windows.  While buffering of X requests improves throughput, it
worsens responsiveness.  I haven't done any measurements, so I could
be (and probably am) wrong.

>  Create a box shape
>  Call the .stroke() method on the box shape to get another shape
>  Render this shape to destination drawable.

So the API would be something along the lines of (just to check if I
have the right idea):

class drawable {
        // to be able to scroll
        copy_rect (from_x1, from_y1, from_x2, from_y2, to_x1, to_y2)

class shape {
        shape stroke();
        void render (drawable d, x, y);


class box : shape {

class graphics_api {
        drawable create_drawable ();
        box create_box ();
        glyph create_glyph ();

class whatever_backend : graphics_api {




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