Article View: comp.windows.interviews
Article #1014getting a lines endpoints with -lgraphics
From: Tom Tkacik CS/50
Date: Mon, 29 Apr 1991 20:32
Date: Mon, 29 Apr 1991 20:32
28 lines
1583 bytes
1583 bytes
I am trying to use -lgraphics for a simple drawing editor. I am using minidraw (from the interviews tutorial) as a base. I want to modify it so that when I move or rotate a line, a rubberband line is used, instead of a rubberband rectangle. I finally settled on using IsA() to determine when I have grabbed a line instead of a rectangle, but cannot get the current end points for the line. Line::GetOriginal() always gives me the starting line, which is fine the first time I move it. But after that, it is not right. Graphic::GetBox() gets the current bounding box for a graphic, which is how the rubberband rectangle is drawn. But I need to know which corners of the box corresponds to the end points of the line. Is there a way to get the current endpoints of a line that may have had one or more transformations applied to it? Idraw does this, but it uses UniGraphics, so I do not know if that will help me. -- Tom Tkacik GM Research Labs tkacik@hobbes.cs.gmr.com tkacik@kyzyl.mi.org
Technical Details
Message-ID:
<51999@rphroy.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!rphroy!hobbes.cs.gmr.com!tkacikReferences:
<INTERRAN.91Apr29004415@lurch.Stanford.EDU>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!rphroy!hobbes.cs.gmr.com!tkacik From: tkacik@hobbes.cs.gmr.com (Tom Tkacik CS/50) Newsgroups: comp.windows.interviews Subject: getting a lines endpoints with -lgraphics Message-ID: <51999@rphroy.UUCP> Date: 29 Apr 91 20:32:26 GMT References: <INTERRAN.91Apr29004415@lurch.Stanford.EDU> Sender: news@rphroy.UUCP Reply-To: tkacik@hobbes.cs.gmr.com (Tom Tkacik CS/50) Organization: GM Research Laboratories, Warren, MI Lines: 28 Nntp-Posting-Host: hobbes.cs.gmr.com