Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to make HP-GL/2 shading finer 1

Status
Not open for further replies.

wilfranz

Technical User
Oct 4, 2003
122
US
Hello friends,

In programming charts and other graphics using the HP-GL/2 escape commands, I have often wished that the shading command (Esc + FT10,[shading level]) might have available a finer dot pattern that what is has available.

E.g. when a shaded pattern is printed by Windows, or Word, or WordPerfect, the dot-density of the printed image is much much higher than with HP-VGL2.

Is there any way I can achieve this (using VGL2)?

TIA

wilfranz
 
Use the RF command to define your own shading pattern.
Your can create shading much finer than the FT10,XX
patterns.

For example...

RF1,4,4,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1;
FT11,1;
RR700,700;


Make the dot pattern symmetrical.

See the technical reference for the why and wherefores.

Jim Asman
jlasman@telus.net
 
Thanks very much Jim. I've never used that command before, and it is just what I wanted. And a quick look at the RecRef Manual tells all. Much obliged. Deserves a star.

Best regards,
wilfranz
 
Follow-up question for Jim Asman (or anyone else):

Is there any source for raster codes for various (symmetrical) shading densities? It's sort of fun to work them out by hand, but it's also time consuming. It would be nice to have a pre-worked file of some examples.

Thanks
wilfranz
 
No, I have never seen anything. If you have a windows application that uses HP-GL/2 for shading, you can print to a file and look at the resulting code.

Generally, you will need a square matrix, probably with an even number of rows and columns. I usually print a bunch of "o"'s to represent the grid, and by hand fill in the centers to see it visually. Lighter shadings will normally require a bigger grid.

After you have worked at it for a while, you will devise a system. Send me your email address and I will send you a few more.



Jim Asman
jlasman@telus.net
 
Thanks much Jim. I have already worked out two patterns, and it's not that hard. But I would also appreciate standing on the shoulders of previous giants.

My e-mail is:

billvv@ameritech.net

Best regards,

Bill

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top