first a short explanation. I plan to use an image that shows a simple
map, i.e. a google map, or a map from a dungeon or similar. The virtual
hero group (the players) can only see a limited area, either because the
map is so large, or because it is dark inside a cave etc…
I am not entirely sure, is there a way to select circular areas?
copy_area for example speaks only about "Copies a rectangular area from
source pixbuf(self) to dest_pixbuf. " but I would need a circular area.
If anyone has an idea , I would be glad to hear about it!
Am Sonntag, den 03.02.2008, 14:00 +0100 schrieb Marc H.:
I am not entirely sure, is there a way to select circular areas?
copy_area for example speaks only about "Copies a rectangular area from
source pixbuf(self) to dest_pixbuf. " but I would need a circular area.
no, Gdk::Pixbuf has nothing like this. A way to go is to use
Gdk::Drawable. There you can copy a rectangulare area into a drawable,
and render this under the use of a clipmask of an Gdk::GC onto an other
drawable. The clipmask you can easily be create with
Gdk::Drawable.draw_arc. This is a quite easy and very fast way, but has
no alpha blending for the edges of the cliping area.