Re: drawing a generated bitmap
- From: David Nečas (Yeti) <yeti physics muni cz>
- To: gtk-list gnome org
- Subject: Re: drawing a generated bitmap
- Date: Sat, 17 Jun 2006 19:20:23 +0200
On Thu, Jun 15, 2006 at 10:59:50PM +0000, kamil stachowski wrote:
> i understand this is a basic question and am sorry for my ignorance. i really
> haven't managed to find an answer though i've searched quite a time.
>
> i've actually got two problems (using nemerle (mono, i.e. gtk#)):
>
> 1. i'd like to generate a terrain heightmap and draw it onto a widget. should
> i be using drawingarea.gdkwindow.drawpixel (how to handle colours, then?),
> try to convert it to an xpm (how?) or what other method would be most
> appropriate? (please, read the second question before answering this one)
Don't draw pixel by pixel, it would be awfully slow.
Use GdkPixbufs and gdk_draw_pixbuf().
> 2. i'd like to be able to fluently change the colours while the heightmap is
> already generated. in the old days (i haven't written much for quite a time)
> it was possible to just draw a bitmap onto the screen and keep redefining the
> colours, which was pretty fast and looked nice in its way. is it still
> doable?
Something along these lines should be doable *if* you can
get a indexed color visual, which you cannot count on. So
I would just redraw it (incidentally I develop a program
which uses false-color maps a lot and redrawing works good
enough).
Yeti
--
Anonyms eat their boogers.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]