BACKPAT Sets Pattern Used by Subsequent CLS, or ToolBox Erase (42983)



The information in this article applies to:

  • Microsoft QuickBASIC Compiler for the Apple Macintosh 1.0

This article was previously published under Q42983

SUMMARY

The CALL BACKPAT statement sets the background pattern that will be used by a subsequent CLS statement, or a subsequent Macintosh Quickdraw ROM routine that performs an erase operation (such as ScrollRect, a Toolbox ROM routine that is documented in the book "Inside Macintosh, Volume I" described below).

This information applies to Microsoft QuickBASIC Version 1.00 for the Apple Macintosh.

MORE INFORMATION

There are two equivalent ways to invoke BACKPAT; we recommend the first method for better program readability:

Method 1

   CALL BACKPAT (VARPTR(pattern%(0)))
				
The BACKPAT routine that is built into QuickBASIC is explained in "Microsoft QuickBASIC for Apple Macintosh: Language Reference" on Page 393. The CALL BACKPAT statement actually invokes the BACKPAT ROM toolbox trap described below in Method 2.

Method 2

   TOOLBOX "I"
   TrapNo% = &HA87C
   TOOLBOX "P", TrapNo%, VARPTR(pattern%(0))
				
Page 505 describes how to directly invoke the BACKPAT ROM toolbox trap with the ToolBox statement in QuickBASIC (however, this page fails to mention that VARPTR must operate on the passed pattern array or else you receive a "Type Mismatch" error).

Programming Notes

The pattern% array must be initialized with a pattern before you can use either method. For articles about using the Pattern Editor program or predefined System patterns, please query in this Knowledge Base on the following keywords:

PATTERN and MACINTOSH and QUICKBASIC

More information about BACKPAT can be found in "Inside Macintosh, Volume 1" by Apple Computer (published by Addison-Wesley).

Modification Type:MinorLast Reviewed:1/9/2003
Keywords:KB42983