swarm-support
[Top][All Lists]
Advanced

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

Re: drawing pixmaps on rasters


From: Aris Alissandrakis
Subject: Re: drawing pixmaps on rasters
Date: Mon, 13 Jan 2003 18:20:36 -0000

Steve and Paul thanks for your suggestions.

>From the documentation it wasn't clear to me that a pixmap without a widget
actually captures the whole screen (root window!). This is useful, although
in my case I want to generate for each movie 5,000 - 6,000 frames, and
therefore I would like to optimise the size of each frame as much as I
could...

Paul's method is also helpful, similar to what I want to do (although he
uses his "BatchRaster" code to deal directly with rasters instead of saving
the raster into a pixmap and then loading it back on another raster).

I think the root of my problem is that my agent rasters contain lines and
not just pixels/points... (see attached pic).

If instead of the captured pixmap I load another png file, then that pixmap
is displayed without any problems on my large movie raster. If I capture the
agent raster, save it to a png file, then load that png file in another
pixamp and then draw that pixap on the raster, it's again fine... The
problem seems to be trying to draw the just captured pixmap and it probably
has to do with the contents of the raster (lines instead of individual
points) and this is why I get just a white dot instead of the whole
figure... could this be a minor "bug"?

Like in ZoomRasters, the way individual pixels get lager when you zoom in,
is not the same as other objects/shapes like lines... the pixels get blocky,
while the lines are getting more detailed instead of just replacing their
pixels with bigger ones... to make the line thicker you have to change the
pen width...
It does makes sense, but its not really intuitive... you just have to think
the way the graphical data are stored/represented... although I would think
that the pixmap class stores its data as a bitmap (it saves them as such,
but internally ?) And when a pixmap is loaded from a file then it definitely
stores them as the loaded bitmap... But when it captures a raster is that
turned into a bitmap?
[my terminology might be slightly wrong but I hope you get the idea]


I will try if the agent rasters are simply rasters and not zoomRasters makes
any difference...

... but in any case I can either capture the whole screen, or create another
swarm program that just loads the png files and places them accordingly on a
raster and then save that raster... (capturing the raster, saving it and
then loading it again is too slow while the simulation is running)

Once again thanks for your quick and helpful suggestions,

Aris Alissandrakis
Adaptive Systems Research Group
Department of Computer Science
University of Hertfordshire






Attachment: 0000005.png
Description: PNG image


reply via email to

[Prev in Thread] Current Thread [Next in Thread]