The only difference between the RA command and the EA (Edge Rectangle Absolute) command is that the RA command produces a filled rectangle, and EA, an outlined one.

The RA command clears the polygon buffer and then uses it to define the rectangle before drawing. Refer to “Using the Polygon Buffer” earlier in this chapter.

The following example uses RA with three different fill types to create rectangles such as those you might use in a bar chart. The rectangles in the right bar are edged using the EA command. (For more information about fill types, refer to the FT command description in Chapter 22.)

Table 21-22 Example: Using the RA Command with Different

Fill Types

 

 

?E

Reset the printer.

 

 

?%0B

Enter HP-GL/2 mode.

 

 

IN;

Initialize HP-GL/2 mode.

 

 

SP1;

Select pen number 1. Even though there is no

 

physical pen, the SP command must be used

 

to enable printing.

 

 

PA400,400;

Enter absolute plotting mode and move to

RA800,1200;

(400,400). Draw a rectangle with (400,400) as

 

the lower left corner and (800,1200) as the

 

upper right corner.

 

 

PA400,1200;FT3,

Move the pen to (400,1200), select fill type 3

50;RA800,1600;

(parallel lines) with a 50 plu space between

 

lines, and draw a rectangle with (400,1200)

 

as the lower left corner and (800,1600) as

 

the upper right corner.

 

 

PA400,1600;FT4;

Move to (400,1600) and specify fill type 4

RA800,2000;

(cross-hatching). Draw a rectangle with a

 

lower left corner of (400,1600) and an upper

 

right corner of (800,2000).

 

 

PA1200,400;FT;

Move to location (1200,400) and select the

RA1600,1200;

default fill type (solid black). Fill and edge a

EA1600,1200;

rectangle using (1200,400) as the lower left

 

corner and (1600,1200) as the upper right

 

corner.

 

 

21-40The Polygon Group

EN

Page 552
Image 552
HP 5961-0509 manual Example Using the RA Command with Different Fill Types, Lower left corner and 800,1200 as