swarm-support
[Top][All Lists]
Advanced

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

Node Coloring and Borders


From: Darren Schreiber
Subject: Node Coloring and Borders
Date: Sat, 18 Sep 1999 15:15:47 -0700

Below is the code I am using to create the nodes for my agents.  The font
change works, but the setColor, setBorderColor, & setBorderWidth settings
have no effect.  I am using color names that I got from the rgb.txt file in
c:/emacs/etc.  I also have looked at the DynamicGraph and BankModel
examples and I don't see anything that I am ommitted.


-setNode: (id) aCanvas {
  char *aName;

  aName=xmalloc(10);
  sprintf(aName,"C%d", agentID);

  agentNode = [OvalNodeItem createBegin: [self getZone]];
  [agentNode setCanvas: aCanvas];
  [agentNode setX: (5*[self getIssuePosition: 0]) Y: (5*[self
getIssuePosition: 1])];
  [agentNode setString: aName];
  [agentNode setFont: "{Arial 6}"];
  [agentNode setColor: "red"];
  [agentNode setBorderColor: "blue"];
  [agentNode setBorderWidth: 6];
  [agentNode setTargetId: self];
  agentNode=[agentNode createEnd];
  return self;
}


Thanks,

        Darren

_____________________________________________

                 Darren Schreiber
                  Attorney at Law
                 Graduate Student
             Political Science, UCLA
                address@hidden

                  ==================================
   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]