eps(n)
Bestie, this is eps(n) from the BLT Built-In Commands page, and it's literally the manual for the Encapsulated PostScript canvas item. Canvas page-layout energy, preview images, titles, shadows β she does it all. Vibe check: passed. π
β¨ NAME β¨
eps β Encapsulated PostScript canvas item.
πΈ SYNOPSIS πΈ
canvas create eps x y ?option value?...
π¦ DESCRIPTION π¦
The eps canvas item lets you place encapsulated PostScript (EPS) on a canvas, controlling its size and placement. The EPS item is displayed either as a solid rectangle or a preview image. The preview image is designated in one of two ways: 1) the EPS file contains an ASCII hexidecimal preview, or 2) a Tk photo image. When the canvas generates PostScript output, the EPS will be inserted with the proper translation and scaling to match that of the EPS item. So you can use the canvas widget as a page layout tool. Slay. π
π EXAMPLE π
Let's say you have four PostScript files of four graphs which you want to tile two-by-two on a single page. Maybe you'd like to annotate the graphs by putting a caption at the bottom of each graph.
Normally, you would have to resort to an external tool or write your own PostScript program. The eps canvas item lets you do this through Tk's canvas widget. An eps item displays an image (or rectangle) representing the encapsulated PostScript file. It also scales and translates the EPS file when the canvas is printed. Honestly? Ate. β¨
π SYNTAX π
canvas create eps x y ?option value?...
The eps item creates a new canvas item. Canvas is the name of a canvas widget. You must supply the X-Y coordinate of the new eps item. How the coordinate is exactly interpreted is controlled by the -anchor option (see below).
Additional options may be specified on the command line to configure aspects of the eps item such as its color, stipple, and font. The following option and value pairs are valid.
β¨ the valid option and value pairs β¨
-anchoranchor β Tells how to position the EPS item relative to its X-Y coordinate. The default iscenter.-backgroundcolor β Sets the background color of the EPS rectangle.-borderwidthpixels β Sets the width of the 3-D border around the outside edge of the item. The-reliefoption determines if the border is to be drawn. The default is0.-filefileName β Specifies the name of the EPS file. The first line of an EPS file must start with%!PSand contain aEPSversion specification. The other requirement is that there be a%%BoundingBox:entry which contains four integers representing the lower-left and upper-right coordinates of the area bounding the EPS. The default is"".-fontfontName β Specifies the font of the title. The default is*-Helvetica-Bold-R-Normal-*-18-180-*.-foregroundcolor β Specifies the foreground color of the EPS rectangle. The option matters only when the-stippleoption is set. The default iswhite.-heightpixels β Specifies the height of the EPS item. Ifpixelsis0, then the height is determined from the PostScript"BoundingBox:"entry in the EPS file. The default is0.-imagephoto β Specifies the name of a Tk photo image to be displayed in the item as a preview image. This option overrides any preview specification found in the EPS file. The default is"".-justifyjustify β Specifies how the title should be justified. This matters only when the title contains more than one line of text.justifymust beleft,right, orcenter. The default iscenter.-reliefrelief β Specifies the 3-D effect for the EPS item.reliefspecifies how the item should appear relative to canvas; for example,raisedmeans the item should appear to protrude. The default isflat.-shadowcolorcolor β Specifies the color of the drop shadow used for the title. This option with the-shadowoffsetoption control how the title's drop shadow appears. The default isgrey.-shadowoffsetpixels β Specifies the offset of the drop shadow from the title's text. Ifpixelsis0, no shadow will be seen. The default is0.-showimageboolean β Indicates whether to display the image preview (if one exists), or a simple rectangle. The default isyes.-stipplebitmap β Specifies a bitmap used to stipple the rectangle representing the EPS item. The default is"".-titlestring β Sets the title of the EPS item. Ifstringis"", then the title specified by the PostScript"Title:"entry is used. You can set thestringto a single space to display no title. The default is"".-titleanchoranchor β Tells how to position the title within the EPS item. The default isn.-titlecolorcolor β Specifies the color of the title. The default iswhite.-titlerotatedegrees β Sets the rotation of the title.degreesis a real number representing the angle of rotation. The title is first rotated in space and then placed according to the-titleanchorposition. The default rotation is0.0.-widthpixels β Specifies the width of the EPS item. Ifpixelsis0, then the width is determined from the PostScript"BoundingBox:"entry in the EPS file. The default is0. Also, the source page has a stray5i.sitting right here, so it stays:5i.π
Sign-off time: this page is from BLT, version 2.5, and it's the eps(n) manual. The footer doesn't list a date, so we're not inventing one β no cap, periodt. π
β¨π«Ά
π¦ where this page comes from
- nixpkgs unstable: blt 2.5.3
- Copyright 1991-1997 by Bell Labs Innovations for Lucent Technologies
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms