2006/05/31
CHAPTER 9 HP-GL - 16
RA - Fill rectangle absolute
RA X, Y[;]
X ; X coordinate of opposite angle for the rectangle
Y ; Y coordinate of opposite angle for the rectangle
• X and Y coordinates are absolute coordinates in user units or graphics units.
• Fill in the rectangle formed by the current position and the opposite angle specified by X and Y.
• After plotting, the cursor returns to its point of origin.
• Plotting is performed whether the pen is up or down.
• When scaling has been performed, the rectangle is plotted in user units.
• Also, when scaling has been performed, the values for X and Y are real numbers.
• When there is no scaling, the rectangle is plotted in graphics units.
• When there is no scaling, the coordinate values for X and Y are integer numbers.
Current position
(X, Y)
Fill pattern specified by FT and PT
10 '*** RAEX ***
20 LPRINT "IN;SP1;PA5000,4000;"
30 LPRINT "PT.3;FT1;RA4250,3250;"
40 LPRINT "FT3,100;RA5750,3250;"
50 LPRINT "FT2;RA5750,4750;"
60 LPRINT "FT4,100,45;RA4250,4750;"
70 END
<Sample 71>
RR - Fill rectangle relative
RR X, Y[;]
X ; X coordinate of opposite angle for the rectangle
Y ; Y coordinate of opposite angle for the rectangle
• Coordinates are relative to the current position in user units or graphics units.
• Fill in the rectangle formed by the current position and the opposite angle specified by X and Y.
• After plotting the cursor returns to its point of origin.
• Plotting is performed whether the pen is up or down.
• When scaling has been performed, the rectangle is plotted in user units.
• Also, when scaling has been performed, the values for X and Y are real numbers.
• When there is no scaling, the rectangle is plotted in graphics units.
• When there is no scaling, the coordinate values for X and Y are integer numbers.
Current position
Fill pattern specified by FT and PT
Y increment
X increment
10 '*** PREX ***
20 LPRINT "IN;SP1;PA5000,5000;"
30 LPRINT "PT.3;FT1;RR500,500;"
35 LPRINT "PR500,0;"
40 LPRINT "FT3,70;RR500,500;"
45 LPRINT "PR0,500;"
50 LPRINT "FT2;RR500,500;"
60 LPRINT "FT4,70,45;RR-500,500;"
70 END
<Sample 73>