Path: 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: 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 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