Article View: comp.windows.interviews
Article #441Re: drawing on an Image
From: Keith Bettinger
Date: Mon, 14 Sep 1992 22:26
Date: Mon, 14 Sep 1992 22:26
22 lines
1959 bytes
1959 bytes
In article <23269@hacgate.SCG.HAC.COM>, howard@aic.hrl.hac.com (Mike Howard) writes:
|> How do I make it possible to draw lines on an image?
|> I am creating a Raster, in an Image, and I notice that
|> Image has some members that take Canvas as an arg.
|> Do I instantiate a Canvas and pass it to the image.draw()
|> member? I tried creating a deck with an image on the bottom
|> and a canvas on top, but I need to make the canvas' background
|> invisible, and I haven't figured out how to do that.
I solved this problem by defining a Glyph that drew a line on its canvas, and using layout->overlay() to put it over the Image.
I could offer code, if anyone is interested. CAVEATS: I only draw vertical lines, and the Glyph is given the width and height of the Raster it will eventually be overlaid upon.
-------------------------------------------------------------------------
Keith E. Bettinger "All of us get lost in the darkness
CEDAR - Center for Excellence in Dreamers learn to steer by the stars
Document Analysis and Recogntion All of us do time in the gutter
Dreamers turn to look at the cars."
INTERNET: bettingr@cs.buffalo.edu - Neil Peart
UUCP: ..{bbncca,decvax,rocksvax,watmath}!sunybcs!bettingr
-------------------------------------------------------------------------
Technical Details
Message-ID:
<BuLABK.1oM@acsu.buffalo.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!dtix!darwin.sura.net!gatech!rutgers!ub!acsu.buffalo.edu!bettingrReferences:
<23269@hacgate.SCG.HAC.COM>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!dtix!darwin.sura.net!gatech!rutgers!ub!acsu.buffalo.edu!bettingr From: bettingr@cs.Buffalo.EDU (Keith Bettinger) Newsgroups: comp.windows.interviews Subject: Re: drawing on an Image Keywords: Image, Canvas, IV3.1b Message-ID: <BuLABK.1oM@acsu.buffalo.edu> Date: 14 Sep 92 22:26:07 GMT References: <23269@hacgate.SCG.HAC.COM> Sender: nntp@acsu.buffalo.edu Organization: State University of New York at Buffalo / CEDAR Research Group Lines: 22 Originator: bettingr@spica.cs.buffalo.edu Nntp-Posting-Host: spica.cs.buffalo.edu