home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / windows / x / 19362 < prev    next >
Encoding:
Internet Message Format  |  1992-11-19  |  2.7 KB

  1. Path: sparky!uunet!metrix!ama
  2. From: ama@metrix.UUCP (Alan Amaral)
  3. Newsgroups: comp.windows.x
  4. Subject: Re: XCopyArea with dashed lines
  5. Message-ID: <891@metrix.UUCP>
  6. Date: 19 Nov 92 21:01:15 GMT
  7. References: <9211181437.AA03154@mct-1.com>
  8. Reply-To: ama@metrix.UUCP (Alan Amaral)
  9. Organization: Metrix Network Systems Inc.
  10. Lines: 52
  11.  
  12. In article <9211181437.AA03154@mct-1.com> thurk@mct-1.UUCP (Dan Thurk) writes:
  13. >
  14. > Using X11R4, I draw a dashed line into a window and a pixmap.  The dashed line
  15. >appears correctly in the window.  When I use XCopyArea to copy the pixmap to
  16. >a window, the line is copied as a solid line.  All other drawing into the
  17. >pixmap ( Rectangles, Points etc ) is copied OK.  Can anybody tell me why
  18. >my dashed lines are always copied as solid???
  19. >
  20. >                                    Dan Thurk
  21.  
  22.  
  23. The only thing that I can think of here is that the line isn't getting
  24. drawn into the pixmap as a dashed line.  There is no conceivable way that
  25. the XCopyArea could be filling in the holes in the lines whilst doing the
  26. copy (if it is it's a really neat trick!).  
  27.  
  28. It could be that you are using two different GC's to draw the line into
  29. the different drawables, and the one for the pixmap isn't setup correctly.
  30.  
  31. Could also be that for some strange reason the ValidateGC code (or
  32. equivalent) in the server, which is supposed to select an appropriate
  33. ddx module to render what you've requested, isn't doing so.  In the
  34. standard R5 cfb code, for example, if your GC selects a dashed line
  35. and anything other than zero width AND FillSolid, the routines which
  36. are selected are miPolySegment (which would layer on top of the Polylines
  37. routine), and miWideDash (for Polylines).  miWideDash is supposed to
  38. render any dashed wide line correctly.
  39.  
  40. Assuming that you've chosen zero width, and FillSolid (the most likely case)
  41. the mit CFB code would select cfbLineSD for Polylines, and cfbSegmentSD for
  42. polySegments.  These are compiled from common code in cfbline.c and are
  43. supposed to "Draw dashed 1-pixel lines lines."
  44.  
  45. The mfb code would chose Polylines = mfbLineSD, and PolySegment = mfbSegmentSD
  46. (again, compiled from common code) in the same circumstances.
  47.  
  48. This brings to mind several questions:
  49.  
  50.     What server (hw/sw) and version are you using?
  51.     Are you using the same GC to draw into the window and the pixmap?
  52.     What is the depth of the pixmap and window?
  53.     What line width are you using?
  54.     What line style are you using?
  55.     What fill style are you using?
  56.  
  57. If you could send some of these answers, and a snippet of your code I might
  58. be able to help out more.  If it's not something obvious in your code, and
  59. you are not using the mit server then all bets are off...
  60.  
  61. -- 
  62. Alan Amaral             |  Email: ama@metrix.COM
  63. Metrix Network Systems  |  Voice: (603) 888-7000
  64.