Re: [Java-gnome-developer] Question concerning pixel graphics
Brought to you by:
afcowie
From: Markus F. <mar...@t-...> - 2001-11-05 08:48:28
|
> For learning about java-gnome and java, I'm programming a mandelbrot > generator. So, I'd like to know how I could access single pixels in a > pixmap or a widget. So far, so good. I've made it by changing the gdk.defs-file. The next thing is, that I don't know how to draw things in a different color than black. I thought it should be something like this: \.\... GdkGC gc = new GdkGC(mainwindow.getWindow()); GdkColor red = new GdkColor(); red.parse("red"); gc.setForeground(red); gwin = drawingarea.getWindow(); gwin.drawRectangle(gc, false, 10, 10, 10, 10); \.\... should, afaic, draw a red rectangle into the drawingarea. But a black rectangle is drawn. Btw. shouldn't GdkPixmap and GdkBitmap be subclasses of GdkWindow, as in gdk? Where am I wrong? |