编辑: QQ215851406 2019-07-16
Part II EN 17-1 17An Introduction to HP-GL/2 Vector Graphics The PCL

5 printer provides the ability to print vector graphics using the HP-GL/2 graphics language.

HP-GL/2 graphics may be created within application software, or imported from existing applications. For various types of images (many technical drawings and business graphics, for example), it is advanta- geous to use vector graphics instead of raster graphics. The advantages include faster I/O transfer of large images and smaller disk storage requirements. Note As a guideline, use raster graphics for small, complex images, or those images that cannot be accomplished with HP-GL/2 (such as scanned photographs). Use HP-GL/2 for images that would involve a large amount of I/O data transfer if printed using raster graphics, or for drawings that are already in HP-GL/2 format. If the image is easier to describe using vectors instead of raster lines, the image usually prints faster using HP-GL/2. Printing with HP-GL/2 requires leaving the PCL printer language mode and entering HP-GL/2 mode. Switching between modes involves only a few commands, and software applications easily switch between the two modes as needed. 17-2 An Introduction to HP-GL/2 Vector Graphics EN Learning HP-GL/2 Read through this chapter and Chapter

18 for a general overview of the HP-GL/2 language and its relationship to the PCL printer language. Then, flip through the other HP-GL/2 chapters until you see an example that interests you or fits your objective. Read through the examples and try printing them using your choice of programming languages. If you need help converting the generic commands shown in the examples to a programming language, see Using HP-GL/2 with Programming Languages later in this chapter. As you see unfamiliar commands, find the page number of the command description in the index and read about the command. Think of an application that you would like to program and then look for an example that uses some of the elements you desire. After trying some examples and seeing how the commands interact, you should be well on your way to learning the HP-GL/2 language. This chapter describes the interaction between the PCL printer language and HP-GL/2 modes and introduces the following topics: z HP-GL/2 Commands and Syntax z Using HP-GL/2 with Programming Languages z The HP-GL/2 Coordinate System z HP-GL/2 and PCL Orientation Interactions z The Vector Graphics Limits z Units of Measure z Pen Status and Location z Defining the Image Area (PCL Picture Frame) z Scaling z Automatically Adjusting Image Size z Absolute and Relative Pen Movement Chapter

18 covers more HP-GL/2 fundamentals, and Chapters

19 through

23 discuss HP-GL/2 commands and their syntax. EN HP-GL/2 Commands and Syntax 17-3 HP-GL/2 Commands and Syntax There are two classes of commands used to print vector graphics: PCL printer language commands and HP-GL/2 commands. As the name implies, the PCL printer language commands are used when in the PCL printer language mode. They define the area on the page where HP-GL/2 graphics are printed and provide a means to enter HP-GL/2 mode. The HP-GL/2 commands are used within HP-GL/2 mode. They define the image that is printed, and allow you to return to the PCL printer language mode. The HP-GL/2 language has its own syntax, and each command is listed in this section of the manual. The vector graphics commands have been grouped into functional categories. The categories are designated as shown in Table 17-1 through . Each of the command categories is discussed in its own chapter, beginning with Chapter 19, The Configuration and Status Group. Table 17-1 The HP-GL/2 Commands by Group (1 of 5) CONFIGURATION GROUP CO Comment DF Default Values IN Initialize IP Input P1 and P2 IR Input Relative P1 and P2 IW Input Window PG1 1. Ignored by HP LaserJet printers. Advance Page RO Rotate Coordinate System RP1 Replot SC Scale 17-4 An Introduction to HP-GL/2 Vector Graphics EN Table 17-2 The HP-GL/2 Commands by Group (2 of 5) VECTOR GROUP AA Arc Absolute AR Arc Relative AT Absolute Arc Three Point BR Bezier Relative BZ Bezier Absolute CI Circle PA Plot Absolute PD Pen Down PE Polyline Encoded PR Plot Relative PU Pen Up RT Relative Arc Three Point Table 17-3 The HP-GL/2 Commands by Group (3 of 5) POLYGON GROUP EA Edge Rectangle Absolute EP Edge Polygon ER Edge Rectangle Relative EW Edge Wedge FP Fill Polygon PM Polygon Mode RA Fill Rectangle Absolute RR Fill Rectangle Relative WG Fill Wedge EN HP-GL/2 Commands and Syntax 17-5 Table 17-4 The HP-GL/2 Commands by Group (4 of 5) CHARACTER GROUP AD Alternate Font Definition CF Character Fill Mode CP Character Plot DI Absolute Direction DR Relative Direction DT Define Label Terminator DV Define Variable Text Path ES Extra Space FI1 1. These commands are part of HP-GL/2'

下载(注:源文件不在本站服务器,都将跳转到源网站下载)
备用下载
发帖评论
相关话题
发布一个新话题