swarm-support
[Top][All Lists]
Advanced

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

Re: Background color


From: Paul E Johnson
Subject: Re: Background color
Date: Mon, 26 Mar 2001 08:24:36 -0600

Rob Leclerc wrote:
> 
> I am currently using the fillRectangle method for the raster to recompute a
> background color, but I imagine this isn't the most effective method.
> 
> Do I have any other options?
> 
> Rob Leclerc
I need a white background, and in the past I've been using a subclass of
Swarm's raster that sets the default background to white.  Its pretty
obvious what is needed once you look at the ZoomRaster code. I created a
new method "eraseNew".

Here's a header:

#import <tkobjc/ZoomRaster.h>

@interface WhiteRaster: ZoomRaster {
      int XDimNumber, YDimNumber, spaceNumber;
  }
-eraseNew;
@end



And here's the method

-eraseNew
{
       [self  fillRectangleX0: 0
                            Y0: 0
                            X1: 100
                            Y1: 100
                         Color: 0];
        return self;
}

When I get some free time, I think I will just add a method
"setBackgroundColor" to the ZoomRaster class and see if it works....


--
Paul E. Johnson                       email: address@hidden
Dept. of Political Science            http://lark.cc.ukans.edu/~pauljohn
University of Kansas                  Office: (785) 864-9086
Lawrence, Kansas 66045                FAX: (785) 864-5700

                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.



reply via email to

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