home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / sys / amiga / programm / 17894 < prev    next >
Encoding:
Internet Message Format  |  1992-12-29  |  1.6 KB

  1. Path: sparky!uunet!news.tek.com!tekig7!tekig1!brianr
  2. From: brianr@tekig1.PEN.TEK.COM (Brian E Rhodefer)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Help sought for use of RectFill()
  5. Message-ID: <8101@tekig7.PEN.TEK.COM>
  6. Date: 29 Dec 92 06:39:13 GMT
  7. Sender: news@tekig7.PEN.TEK.COM
  8. Distribution: na
  9. Lines: 35
  10.  
  11. I'm trying to concoct a simple program for a fellow member of my
  12. user's group, involving annunciating selected screen areas by
  13. drawing simple rectangular boxes around them.  I'd have used
  14. Move() and Draw() operations (or possibly even  DrawBorder()),
  15. except that I wanted a two-pixel-wide border, and I thought it'd
  16. be more expedient to render the boxes as four rectangles.
  17.  
  18. My problem is that the resulting "line segments" are coming out
  19. FOUR pixels wide, not two, and I can't figure out why.  The call
  20. to RectFill() for the top line segment is of the form:
  21.  
  22. #define BOXLINEWIDTH 2
  23.  
  24. UpperLHCornerX = mumble1 + mumble2 * mumble3;
  25. UpperLHCornerY = mumble4 + mumble5 * mumble6;
  26.  
  27. RectFill (myWindow->RPort,
  28.       UpperLHCornerX,
  29.           UpperLHCornerY,
  30.       UpperLHCornerX + BOXWIDTH + 2 * BOXLINEWIDTH
  31.       UpperLHCornerY + BOXLINEWIDTH);
  32.  
  33. I can't see why the above call would produce a four-pixel-wide "line",
  34. but it does.  Can someone point out the obvious thing I'm overlooking?
  35.  
  36. The Window whose RastPort I'm rendering into has been opened on a
  37. custom screen opened using the OpenScreenTagList() call.  The
  38. screen tag arguments list included an SA_DisplayID/HIRESLACE_KEY pair.
  39. Thinking that the system might be throwing in a gratuitious 1-pixel
  40. border around my box, I tried throwing in a BNDRYOFF(myWindow->RPort)
  41. operation, to no avail.
  42.  
  43. Thanks in advance,
  44.  
  45. Brian Rhodefer
  46.