swarm-support
[Top][All Lists]
Advanced

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

How to draw a line in a Raster object?


From: Jim Westervelt
Subject: How to draw a line in a Raster object?
Date: Wed, 30 Apr 1997 12:35:23 -0600

Hi folks.  I'm hoping to draw interesting things on a Raster object.  Have
discovered the "draw" method supported by Raster, but don't understand how
to use it.  For example, I'd like to call the "draw" method and tell it to
use the Xlib XDrawLine routine to draw a line.  Clues are below, but how to
put it all together?  That is, how do I complete this code fragment:

raster = [Raster create: [self getZone]] ;
...
[raster draw: ??? X: x Y: y] ;

Thanks in advance!!

Clues:

The Raster.m draw method:
-draw: (id <XDrawer>) xd X: (int) x Y: (int) y {
  [xd drawOn: pm X: x Y: y GC: gc Caller: self];

XDrawer.h definition of "drawOn":
@protocol XDrawer
-drawOn: (Drawable) w X: (int) x Y: (int) y GC: (GC) gc Caller: Caller;
@end

The Xlib XDrawLine routine:
XDrawline(display, d, gc, x1, y1, x2, y2) ;

Jim Westervelt; Spatial System Simulation R&D  email:address@hidden
URL:  http://blizzard.gis.uiuc.edu/people/westervelt
                   Phone              FAX
          CERLt: 217-398-5391      217-373-4520
U of Ill GMSlab: 217-333-8296      217-244-1785



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