home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!metrix!ama
- From: ama@metrix.UUCP (Alan Amaral)
- Newsgroups: comp.windows.x
- Subject: Re: XCopyArea with dashed lines
- Message-ID: <891@metrix.UUCP>
- Date: 19 Nov 92 21:01:15 GMT
- References: <9211181437.AA03154@mct-1.com>
- Reply-To: ama@metrix.UUCP (Alan Amaral)
- Organization: Metrix Network Systems Inc.
- Lines: 52
-
- In article <9211181437.AA03154@mct-1.com> thurk@mct-1.UUCP (Dan Thurk) writes:
- >
- > Using X11R4, I draw a dashed line into a window and a pixmap. The dashed line
- >appears correctly in the window. When I use XCopyArea to copy the pixmap to
- >a window, the line is copied as a solid line. All other drawing into the
- >pixmap ( Rectangles, Points etc ) is copied OK. Can anybody tell me why
- >my dashed lines are always copied as solid???
- >
- > Dan Thurk
-
-
- The only thing that I can think of here is that the line isn't getting
- drawn into the pixmap as a dashed line. There is no conceivable way that
- the XCopyArea could be filling in the holes in the lines whilst doing the
- copy (if it is it's a really neat trick!).
-
- It could be that you are using two different GC's to draw the line into
- the different drawables, and the one for the pixmap isn't setup correctly.
-
- Could also be that for some strange reason the ValidateGC code (or
- equivalent) in the server, which is supposed to select an appropriate
- ddx module to render what you've requested, isn't doing so. In the
- standard R5 cfb code, for example, if your GC selects a dashed line
- and anything other than zero width AND FillSolid, the routines which
- are selected are miPolySegment (which would layer on top of the Polylines
- routine), and miWideDash (for Polylines). miWideDash is supposed to
- render any dashed wide line correctly.
-
- Assuming that you've chosen zero width, and FillSolid (the most likely case)
- the mit CFB code would select cfbLineSD for Polylines, and cfbSegmentSD for
- polySegments. These are compiled from common code in cfbline.c and are
- supposed to "Draw dashed 1-pixel lines lines."
-
- The mfb code would chose Polylines = mfbLineSD, and PolySegment = mfbSegmentSD
- (again, compiled from common code) in the same circumstances.
-
- This brings to mind several questions:
-
- What server (hw/sw) and version are you using?
- Are you using the same GC to draw into the window and the pixmap?
- What is the depth of the pixmap and window?
- What line width are you using?
- What line style are you using?
- What fill style are you using?
-
- If you could send some of these answers, and a snippet of your code I might
- be able to help out more. If it's not something obvious in your code, and
- you are not using the mit server then all bets are off...
-
- --
- Alan Amaral | Email: ama@metrix.COM
- Metrix Network Systems | Voice: (603) 888-7000
-