PSS ID Number: 110609
Article Last Modified on 10/23/1999
Pen pattern - The shade of a line or box outline.
Pen width - The width of a line or box outline.
Fill pattern - The shade used to fill box objects.
Radius - The amount of curvature in rounded rectangles.
Transfer mode - How the current object blends when placed on top of existing objects.
*Set up the environment. SCREEN 1 TOP SET TALK OFF filename = SYS(16) SET PROCEDURE to "&filename" CLEAR STORE 0 TO penpat, penwidth, fillpat, radius, xmode *Create a plain rectangle with a dark border. penpat = 15 && 1 is lightest, 15 is darkest penwidth = 1 && 1 is thinnest, 12 is thickest styleval = calcstyle(penpat, penwidth, fillpat, radius, xmode) @ 2,2 TO 4,8 STYLE styleval WAIT "Press any key for a thicker outline..." *Make the border thicker. CLEAR penwidth = 6 && make the outline 6 pixels wide styleval = calcstyle(penpat, penwidth, fillpat, radius, xmode) @ 2,2 TO 4,8 STYLE styleval WAIT "Press any key for a gray fill..." *Give the box a medium fill. CLEAR fillpat = 6 && 1 is white, 15 is black styleval = calcstyle(penpat, penwidth, fillpat, radius, xmode) @ 2,2 TO 4,8 STYLE styleval WAIT "Press any key for rounded corners..." *Round the corners. CLEAR radius = 12 && 0 is no rounding, 15 is an oval styleval = calcstyle(penpat, penwidth, fillpat, radius, xmode) @ 2,2 TO 4,8 STYLE styleval WAIT "Press any key for some color..." *Add a COLOR clause for a red foreground and a blue background. CLEAR styleval = calcstyle(penpat, penwidth, fillpat, radius, xmode) @ 2,2 TO 4,8 STYLE styleval COLOR "r/b" WAIT "Press any key to end this program..." *Clean up before closing CLEAR ALL CLOSE ALL CLEAR SET PROCEDURE TO *Here is the procedure that calculates the STYLE clause PROCEDURE calcstyle PARAMETERS penpat, penwidth, fillpat, radius, xmode newpwid = penwidth * 16 && multiply by 16 to the power of 1 newfpat = fillpat * 256 && multiply by 16 to the power of 2 newrad = radius * 4096 && multiply by 16 to the power of 3 newxmode = xmode * 65536 && multiply by 16 to the power of 4 *Sum all the values together newstyle = penpat + newpwid + newfpat + newrad + newxmode RETURN newstyle && return the new result
Additional query words: 2.10 hard code
Keywords: KB110609
Technology: kbAudDeveloper kbFoxBASE201Mac kbFoxBASESearch kbFoxproSearch kbHWMAC kbOSMAC