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