Re: [gtkmm] draw a fractal



On Fri, Aug 20, 2004 at 09:16:43PM +0200, Thomas Fischer wrote:
> Hi * ;-)
> 
> I want to draw a fractal (in german Apfelmaennchen). For that purpose i
> computed size_t values for every pixel and stored this values in a matrix.
> Now i want to draw the pixels in a specific color subject to the matrix
> values. Should i use a pixmap? How to create a pixmap from my matrix? ...
> 
> I need "only" a viewer class for my data. It would be nice if anybody could
> give me an example-code or hints how to that.

Perhaps a Gdk::Pixbuf is what you're after? You can create it from RGB
values using Gdk::Pixbuf::create_from_data - see:
http://www.gtkmm.org/docs/gtkmm-2.4/docs/reference/html/classGdk_1_1Pixbuf.html#e5

Hope that helps - I'm afraid I don't have any sample code for that.
~Ainsley



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