Re: GdkDrawable from GtkDrawingArea and it's cairo surface



ah!  i knew it.

thanks paul,

richard

On Mon, Jul 25, 2011 at 2:41 PM, Paul Davis <paul linuxaudiosystems com> wrote:
2011/7/25 richard boaz <ivor boaz gmail com>:

> but i deliver this with a huge caveat: i do not like the solution, something
> about the design is wrong (i can "feel" it).  so, this reference is intended
> for demonstration purposes only!  i will eventually come back to this and
> find the proper architecture, but don't have time at the moment.
> it does, however, "work", so it's not completely worthless; the best answer
> is in there somewhere.
> and just for the record, there really is many, many ways to solve this
> problem; you must strive to find the most appropriate solution that
> satisfies all the specific requirements of your particular problem, and
> sometimes this simply comes down to solving it over and over until the best
> solution becomes obvious.

you should/could use cairo_pattern_t's as a replacement for the pixmap.

create a new cairo image surface. draw into it using normal methods
(possibly even creating it directly from an image). then create a
pattern for the surface and keep it around. later, in the expose/draw
method, set the source to be the pattern, and paint. done.



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