swarm-support
[Top][All Lists]
Advanced

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

Help with Raster, please?


From: Doug Donalson
Subject: Help with Raster, please?
Date: Wed, 1 Dec 1999 12:02:02 -0800

I want a simple 2D display that I can draw on.  It looked like Raster might work so I decided to play around with it.  (You never can tell when you might need to draw an elipse.) 
 
I defined it as:

id <Raster> scamDisplay;

Then I created it, with the colormap as so:

colormap = [Colormap create: [self getZone]];

for (i = 0; i < 16; i++)

[colormap setColor: i ToRed: (double)i / 15.0 Green: 0 Blue: 0];

[colormap setColor: 16 ToRed: 0 Green: 1 Blue: 0];

[colormap setColor: 17 ToRed: 0 Green: 0 Blue: 1];

[colormap setColor: 18 ToGrey: 10];

scamDisplay=[Raster createBegin: self];

As soon as I try to set anything I get the following error (with trace attached):

Program received signal SIGSEGV, Segmentation fault.
0x69cb379b in tkobjc_raster_savePixmap (raster=0x26961f0)
    at /src/Swarm/swarm/src/tkobjc/internal.m:894
894 /src/Swarm/swarm/src/tkobjc/internal.m: No such file or directory.
(gdb) where
#0  0x69cb379b in tkobjc_raster_savePixmap (raster=0x26961f0)
    at /src/Swarm/swarm/src/tkobjc/internal.m:894
#1  0x69ca7ca5 in _i_Raster__setWidth_Height_ (self=0x26961f0, _cmd=0x40baa4,
    newWidth=400, newHeight=400) at /src/Swarm/swarm/src/tkobjc/Raster.m:117
#2  0x403c13 in _i_MusselModelSwarm__buildObjects (self=0x2663480,
    _cmd=0x40bf14) at MusselModelSwarm.m:532
#3  0x405346 in _i_MusselObserverSwarm__buildObjects (self=0x266b690,
    _cmd=0x40b02c) at MusselObserverSwarm.m:52
#4  0x4010e6 in main (argc=1, argv=0x25c1018) at main.m:28
#5  0x61004402 in _size_of_stack_reserve__ ()
#6  0x61004420 in _size_of_stack_reserve__ ()
#7  0x40a836 in cygwin_crt0 (f=0x401060 <main>)
    at /home/noer/src/b20/comp-tools/devo/winsup/libccrt0.cc:81

It does not seem to matter whether I do a "createEnd" first nor whether I set X and Y or try to set the color map.

Any ideas,

Cheers,

     D3

*********************************************************************
* Doug Donalson                 Office: (805) 893-2962
* Ecology, Evolution,           Home:   (805) 961-4447
* and Marine Biology            email address@hidden 
* UC Santa Barbara
* Santa Barbara Ca. 93106
*********************************************************************
*                                                                        
*   The most exciting phrase to hear in science, the one that            
*   heralds new discoveries, is not "EUREKA" (I have found it) but       
*   "That's funny ...?"                                                  
*                                                                        
*       Isaac Asimov                                                     
*                                                                        
*********************************************************************
 
 

reply via email to

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