Sorry for the slow reply--- Treatment Services wrote: > Something that would allow a user to build an image from the > GUI side of things rather than programatically. Once the image had been > created all of the items that made up the image could be pickled for > later redisplay.
So far, I think we've all cobbled together just what we needed, rather than building a full, well designed system. I would really like to do that though. I've recently had an inspiration as to how to do it cleanly, I hope I'll get a couple hours to work on it tonight. > The items on the canvas will need to be able to be modified by code > also. Switches (rectangles) will need to be seen to be be switching > (changing colour) and tank fluid levels will need to change. As part of > the graphics mix I will be looking to display fluid in pipes and so the > pipe graphic will need to have two colour states (full / empty). That's all very doable with FloatCanvas -- it's been designed with that sort of thing in mind. > If Floatcanvas had a bitmap laid on it, is there any way that I would be > able to get at the bitmap pixels in code to do a colour replace? yup. With the example above, I wouldn't use a bitmap, but you might want to for other reasons. A FloatCanvas Bitmap and ScaledBitmap have either a wx.Bitmap or wx.Image as attributes -- those can be manipulated in various ways. One option I recently explored was creating a wx.Image that shared a data block with a numpy array -- that lets you use numpy to manipulate the image in place. You could probably do something similar with PIL, or with wx.Image or wx.Bitmap as well. You can also just replace the Image with a different one. > I am fairly new to wxPython, Floatcanvas and mailing lists so I > apologise in advance if the questions are trivial or have been answered > elswehere in a prior e-mail. They are not the least bit trial -- and this is a low traffic list -- don't worry about it. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception [EMAIL PROTECTED] _______________________________________________ FloatCanvas mailing list [email protected] http://mail.mithis.com/cgi-bin/mailman/listinfo/floatcanvas
