ADAPTING THE HP-GL/2 COORDINATE SYSTEM TO MATCH THE PCL SYSTEM IN PORTRAIT ORIENTATION This example will draw a few lines in both PCL and HP- GL/2 modes to demonstrate that the coordinate systems are lined up correctly (the end points of the lines intersect). LEGEND: Ec = [Ctrl] [P] Esc] in DOS EDIT EcE Resets the printer. Ec&l2A Sets the page size to letter. Ec&l0O Specifies portrait orientation. Ec&l0E Sets top margin to 0 Ec*p0x0Y Moves to position (0,0). Ec*c5760x7920Y Sets picture frame to 8" x 11" (size of the logical page). Ec*c0T Sets picture frame anchor point to current PCL cursor position (0,0). Ec%1B Enters HP-GL/2 mode with the HP-GL/2 pen at the PCL cursor position. IN;SP1; Initializes HP-GL/2 command values and selects pen number 1 (black). The IN command moves the pen position from the anchor point to the HP-GL/2 origin, the lower-left corner of the PCL picture frame. SC0,3.3867,0,-3.3867,2; Sets-up a user scale with a user-unit equal to 1/300 inch. Scale command type 2, the scale is the ratio of plotter units/user-units (1016 plotter units-per- inch/300 dots-per-inch = 3.3867). The minus 2 Y- value changes the HP-GL/2 Y direction to match that of the PCL coordinate system. IR0,100,0,100; Places P1 (point 0,0) at the top of the PCL picture frame. PU0,0; Lifts the pen and moves to (0,0) (Upper left corner since HP-GL/2 coordinate system now matches PCL coordinate system). Every subsequent pen move can be specified using the same coordinate numbers in either mode. The following commands demonstrate that the grids are synchronized. PU300,300;PD600,600; Lifts the pen and moves it to (300,300); then draws a line to (600,600). This draws a line at a 45 angle down from the starting point. Ec%1A Enters the PCL mode with HP-GL/2's pen position being inherited as PCL's current active position, (CAP=(600,600)). Ec*c300a4b0P Draws a horizontal line (rule) that is 30 PCL units wide by 4 PCL units. (Note that the cursor position after a rule is printed is at the beginning of the rule, in this case, (600,600)). Ec%1BPU;PR300,0;PD;PR0,500; Enters HP-GL/2 mode (inheriting PCL's CAP) and lift the pen; moves to a point 300 user-units (dots) to the right; places the pen down and prints a line 500 user- units down. Ec%1A Enters the PCL mode with the CAP at the current HP- GL/2 pen position. EcE Resets the printer to end the job and eject a page. Copyright Hewlett-Packard Co. 1993 The information contained herein is subject to change without notice. Hewlett-Packard shall not be liable for incidental or consequential damages in connection with the use of this material.
|file: /Techref/language/pcl/lj1833.asc, 5KB, , updated: 1993/11/15 17:10, local time: 2018/3/18 14:36,
|©2018 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?|
<A HREF="http://www.piclist.com/techref/language/pcl/lj1833.asc"> language pcl lj1833</A>
|Did you find what you needed?|
PICList 2018 contributors:
o List host: MIT, Site host massmind.org, Top posters @20180318 RussellMc, Isaac M. Bavaresco, Sean Breheny, Neil, Van Horn, David, David C Brown, alan.b.pearce, Bob Blick, John Gardner, Brent Brown,
* Page Editors: James Newton, David Cary, and YOU!
* Roman Black of Black Robotics donates from sales of Linistep stepper controller kits.
* Ashley Roll of Digital Nemesis donates from sales of RCL-1 RS232 to TTL converters.
* Monthly Subscribers: Gregg Rew. on-going support is MOST appreciated!
* Contributors: Richard Seriani, Sr.
Welcome to www.piclist.com!