ObjectBrush Method

ObjectFont Method

Introduction

 

SetBrushPattern Method


 

This method sets a user-defined pattern for the brush. There can be up to 4 user-defined brushes. When you need to reference the defined brush, its number will be the one you specify plus 7. For brush below, with number 2 you will reference it with the number 9.
This method takes a variant array as a parameter, if you are unsure how to use safearrays in your programming environment, check the documentation. Examples on how to use variants in Visual Basic are provided below.

 

Syntax

FlpGrf.SetBrushPattern( nBrushNum As Integer, byteArray As Variant )

The SetBrushPattern method has these parts:

Part

Description

FlpGrf

An object expression that evaluates the Flipper Graph ASP object.

nBrushNum

Brush to affect.

byteArray

Array of 8 elements, that contains bit information of the pattern.

 

Example

In creating a brush pattern, you must generate and supply an 8x8 bit value matrix.

For example to generate the following pattern (the image has been enlarged) you would send the following bytes to this method:

'1st way:
FlpGrf.SetBrushPattern 2, Array(105, 57, 111, 48, 96, 63, 105, 57).

'2nd way:
Dim a(8) As Variant
a(0) = 105
a(1) = 57
a(2) = 111
a(3) = 48
a(4) = 96
a(5) = 63
a(6) = 105
a(7) = 57
FlpGrf.SetBrushPattern 1, a


images/brushpat.png 


 

See Also

SetLinePattern Method, Object Routines



ObjectBrush Method ObjectFont Method

 

 

Last modified on: Friday, August 16, 2002