idraw(1)

πŸ’– idraw β€” the drawing editor, bestie edition πŸ’–

idraw(1) Β· General Commands Manual Β· idraw(1)


✨ NAME ✨

idraw β€” it's a drawing editor, and it's literally the moment 🎨


🌸 SYNOPSIS 🌸

idraw [options] [file]

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so. Idraw is a drawing editor that lets you create and edit drawings made up of graphics like text, lines, splines, rectangles, polygons, and ellipses. Iconic behavior, no notes. πŸ’…

Your drawings get stored in files, and those files can be printed on a PostScript printer. πŸ–¨οΈ And get this β€” you can open an existing drawing when you're starting up idraw by just typing a file name on the command line. So easy, so slay.

Idraw displays a portrait or landscape view of an 8.5 by 11 inch page in its drawing area. In a column along the drawing area's left side is a set of drawing tool icons, and above the drawing area is a set of pull-down menus containing commands. A panner in the lower left corner lets you pan and zoom the drawing area. And along the top is a set of indicators that display editing information. Basically the whole layout is giving "I have my life together" ✨


πŸŽ€ DRAWING TOOLS πŸŽ€

Bestie, listen. You must engage a tool before you can use it. No engaging, no drawing, periodt.

You engage a tool by clicking on its icon, or by typing the character below and to the right of its icon. The icon of the drawing tool that's engaged appears in inverted colors β€” that's your visual vibe check that says "yes queen, this one's live." Once engaged, you use the tool by clicking the left mouse button in the drawing area. πŸ–±οΈ

So here's the group chat:

  • Select, Move, Scale, Stretch, Rotate, and Alter β€” these manipulate existing graphics (glow-ups for stuff that's already there πŸ’…).
  • Magnify β€” makes a part of the view expand to fill the entire view. Zoom zoom. πŸ”
  • Text, Line, Multiline, Open Spline, Ellipse, Rectangle, Polygon, and Closed Spline β€” these create new graphics (main character energy, making things from scratch ✨).

Each tool works as follows:

  • Select β€” Selects a graphic, unselecting all others. A graphic is selected if its handles are visible. Handles are small inverse-video squares that either surround the graphic or demarcate its important points (such as the endpoints of a line). If you hold down the shift key, Select extends the selection: it selects the unselected graphic (or unselects the selected graphic) you clicked on but does not unselect other selections. Clicking anywhere other than on a graphic unselects everything; you may also drag a rubberband rectangle around a group of graphics to select all of them at once. Shortcut: the right mouse button invokes Select while the mouse is in the drawing area. 🫢
  • Move β€” Moves graphics from one spot to another. Shortcut: the middle mouse button invokes Move while the mouse is in the drawing area. 🚚
  • Scale β€” Scales graphics about their centers. πŸ“
  • Stretch β€” Stretches graphics vertically or horizontally while tying down the opposite edge. 😀
  • Rotate β€” Rotates graphics about their centers according to the angle between two radii: the one defined by the original clicking point and the one defined by the current dragging point. πŸŒ€
  • Alter β€” Modifies a graphic's structure. This tool's effect is described below for each graphic. πŸ”§
  • Magnify β€” Magnifies a portion of the drawing specified by sweeping out a rectangular area. Idraw will magnify the area to occupy the entire screen, if possible. πŸ”Ž
  • Text β€” Creates some text. Left-click to position the first line of text, and then type as much text as you want. You may use emacs-style keystrokes to edit the text as well as enter it. You can leave text editing mode by typing ESC or by simply clicking somewhere else. The Alter tool lets you edit the text in an existing text graphic. ✍️
  • Line β€” Creates a line. The shift key constrains the line to lie on either the vertical or the horizontal axis. You may left-click with the Alter tool on either endpoint of a line to move the endpoint to a new location. πŸ“
  • Multiline β€” Creates a set of connected lines. The shift key constrains each segment to lie on either the vertical or the horizontal axis. Each left-click starts a new segment (i.e., adds a vertex); each right-click removes the last vertex added. The middle button finalizes the multiline. The Alter tool lets you move, add, and remove vertices from an existing multiline. 🌈
  • Open Spline β€” Creates an open B-spline. The shift key constrains each control point to lie on either the vertical or the horizontal axis with the preceding point. Each left-click adds a control point; each right-click removes the last control point added. The middle button finalizes the spline. The Alter tool lets you move, add, and remove control points from an existing open spline. 🧚
  • Ellipse β€” Creates an ellipse. The shift key constrains the ellipse to the shape of a circle. The Alter tool does not affect ellipses. (Not me being excluded from the Alter party 😭) β­•
  • Rectangle β€” Creates a rectangle. The shift key constrains the rectangle to the shape of a square. The Alter tool lets you move the rectangle's corners independently to form a four-sided polygon. 🟦
  • Polygon β€” Creates a polygon. The shift key constrains each side to lie on either the vertical or the horizontal axis. Each left-click starts a new segment (i.e., adds a vertex); each right-click removes the last vertex added. The middle button finalizes the polygon. The Alter tool lets you move, add, and remove vertices from an existing polygon. πŸ”Ί
  • Closed Spline β€” Creates a closed B-spline. The shift key constrains each control point to lie on either the vertical or the horizontal axis with the preceding point. Each left-click adds a control point; each right-click removes the last control point added. The middle button finalizes the spline. The Alter tool lets you move, add, and remove control points from an existing closed spline. πŸŽ€

πŸŽ€ PULL-DOWN MENUS πŸŽ€

okay bestie so up above the drawing area there's a whole lil row of pull-down menus: File, Edit, Structure, Font, Brush, Pattern, FgColor, BgColor, Align, and View. They're stacked with commands for editing your drawing and for controlling how idraw itself runs. Let's go menu by menu because there is so much here ✨


πŸ“ File

The File menu is your whole file-management moment, and it holds these:

  • New β€” destroys the drawing you're on rn and swaps in a fresh blank drawing that has no name. poof πŸ’€
  • Revert β€” rereads the current drawing, which nukes any unsaved changes you made. no takebacks.
  • Open... β€” pick an existing drawing to edit, through a FileChooser(3I) that makes browsing the file system actually easy πŸ¦‹
  • Save As... β€” save the current drawing into a file under a specific name.
  • Save β€” save the current drawing back into the file it originally came from.
  • Print... β€” sends a PostScript version of your drawing to a printer or to a file. That bold rectangular outline you see in the drawing area β€” it's called the page boundary β€” shows exactly which part of the drawing will land on the printed page.
  • Import Graphic... β€” builds a graphic out of the info in a file and drops it into the current drawing. idraw can import images from files in these formats: TIFF; PostScript generated by pgmtops, ppmtops, and idraw; X bitmap format; and Unidraw format.
  • Quit β€” quits idraw. bye bestie πŸ‘‹

βœ‚οΈ Edit

The Edit menu is the one for editing graphics, and it's stacked:

  • Undo β€” undoes the last editing operation. Keep hitting Undo and it'll walk you further and further back through earlier and earlier operations.
  • Redo β€” redoes the last editing operation. Successive Redos redo later and later operations, all the way up to the first one that Undo undid. ⚠️ Heads up: once an undone operation hasn't been redone yet, it is lost the moment you do any new operation. gone-gone.
  • Cut β€” removes the selected graphics from the drawing and stashes them in a temporary storage area called the clipboard.
  • Copy β€” copies the selected graphics into the clipboard.
  • Paste β€” pastes copies of whatever's in the clipboard into the drawing. Together, Cut, Copy, and Paste let you shuttle graphics between drawings β€” just cut out of one view and paste into another. it's giving teleportation ✨
  • Duplicate β€” duplicates the selected graphics and adds those copies to the drawing.
  • Delete β€” destroys the selected graphics. rip 😭
  • Select All β€” selects every single graphic in the drawing.
  • Flip Horizontal, Flip Vertical β€” flip the selected graphics into their mirror images along the horizontal or vertical axes.
  • 90 Clockwise, 90 CounterCW β€” rotate the selected graphics 90 degrees clockwise or counterclockwise.
  • Precise Move..., Precise Scale..., Precise Rotate... β€” move, scale, or rotate graphics by exact amounts you type into a dialog box. You can specify movements in pixels, points, centimeters, or inches. Scalings are given as magnification factors in the horizontal and vertical dimensions. Rotations are in degrees.

🧱 Structure

The Structure menu changes the structure of your drawing β€” that's the order the graphics get drawn in:

  • Group β€” nests the selected graphics inside a newly created picture. A picture is just a graphic that contains other graphics, so Group is how you build hierarchies of graphics. main character nesting energy πŸ‘‘
  • Ungroup β€” dissolves any selected pictures.
  • Bring To Front β€” brings the selected graphics to the front of the drawing, so they're drawn on top of (after) the other graphics.
  • Send To Back β€” sends the selected graphics to the back of the drawing, so they're drawn behind (before) the other graphics.

πŸ”€ Font

The Font menu is a whole set of fonts you can display text in. When you set the current font from the menu, you also set every selected graphic's font to that font. And there's a font indicator chilling in the upper right corner showing you the current font.


πŸ–ŒοΈ Brush

The Brush menu is a set of brushes for drawing lines. Set the current brush from the menu and you'll also set all the selected graphics' brushes to that brush. The nonexistent brush draws invisible lines and non-outlined graphics. The arrowhead brushes add arrowheads to either or both ends of lines, multilines, and open splines. And there's a brush indicator in the upper left corner showing the current brush.


🌸 Pattern

The Pattern menu gives you a set of patterns to fill graphics with β€” but not text. Text always shows up solid, though you can use a color other than black to get a halftoned shade. Set the current pattern from the menu and you'll also set all the selected graphics' patterns to that pattern. The nonexistent pattern draws unfilled graphics, while all the other patterns fill graphics with a bitmap or a halftoned shade.


🌈 FgColor and BgColor

The FgColor and BgColor menus contain a set of colors to draw graphics and text with. When you set the current foreground or background color from the FgColor or BgColor menu, you'll also set all the selected graphics' foreground or background colors. Here's the tea: the on'' bits</hotpink> in the bitmaps for dashed lines and fill patterns show up in the foreground color, while the <lavender>off'' bits show up in the background color. A black and white printer will print a halftoned shade of gray for any color that isn't black or white. And the brush, pattern, and font indicators all reflect the current colors. πŸ’…


πŸ“ Align

The Align menu has commands to align graphics with other graphics. The first graphic selected stays put while the other graphics move β€” in the order they were selected β€” according to whichever type of alignment you chose. And the very last Align command, Align to Grid, aligns a key point on each selected graphic to the nearest point on idraw's grid (see below πŸ‘€).


πŸ‘€ View

The View menu is stacked with these:

  • New View β€” creates a duplicate idraw window holding a second view of the current drawing. That second view can be panned, zoomed, and edited totally independently of the first. You can make any number of extra views this way. Changes you make to a drawing through one view show up synchronously in all the other views of that same drawing. You can also view a different drawing in any idraw window via the Open command.
  • Close View β€” closes the current idraw window. Closing the last idraw window is the same thing as issuing a Quit command.
  • Normal Size β€” sets the magnification to unity, so the drawing appears at actual size.
  • Reduce to Fit β€” reduces the magnification until the drawing fits entirely inside the view.
  • Center Page β€” centers the view over the center of the 8.5 by 11 inch page.
  • Orientation β€” toggles the drawing's orientation. If the editor was showing a portrait view of the drawing before, it'll now show a landscape view, and vice versa.
  • Grid on/off β€” toggles idraw's grid on or off. When the grid is on, idraw draws a grid of equally spaced points behind the drawing.
  • Grid Spacing... β€” changes the grid spacing by giving one or two values in whatever units you want (pixels, points, centimeters, or inches). Give two values separated by a space and the first sets the horizontal spacing while the second sets the vertical spacing. Give just one value and you get equal horizontal and vertical spacing. slay πŸŽ€
  • Gravity on/off β€” toggles gravity on or off. Gravity constrains tool operation to the grid, whether or not the grid is even visible.

✨ X DEFAULTS ✨

Okay bestie, this is the part where you get to customize everything πŸ’… β€” the number of undoable changes, plus the font, brush, pattern, and color menus. All of it lives in your X defaults database. No cap.

Every string that looks like `idraw.resource:definition` sets a resource. So like, if you wanna customize one of the paint menus, you set a resource made by smooshing together the menu's name and the entry's number β€” e.g. `idraw.pattern8` β€” for each entry you wanna override. And heads up: all the menus use the number 1 for the first entry. First entry = 1. Not 0. We don't do zero-indexing here 🫢

You only set resources for the entries you actually wanna override, not all of them, okay? That's the vibe.

Wanna add entries to a menu? Just set resources for them, easy. But do NOT skip any numbers after the end of the menu, because the menu ends at the first undefined resource. That's the trap πŸ™ˆ And if you wanna shorten a menu instead of extending it, specify a blank string as the resource for the entry following the last one. Periodt.


idraw understands the following resources:

  • history β€” sets the max number of undoable changes (20 by default). That's your undo budget, bestie, spend it wisely.
  • initialfont β€” the font that'll be active on startup. Give it a number that identifies the font by its position in the Font menu, counting from 1 for the first entry.
  • fonti β€” defines a custom font for the *i*th entry in the Font menu. Give three strings separated by whitespace: the first is the font's name, the second is the corresponding print font, and the third is the print size. For example, `idraw.font3:8x13bold Courier-Bold 13` defines the third font entry. Slay.
  • initialbrush β€” the brush that'll be active on startup. Give a number identifying the brush by its position in the Brush menu, starting from 1 for the first entry.
  • brushi β€” defines a custom brush for the *i*th entry in the Brush menu. The definition needs two numbers: a 16-bit hexadecimal number that defines the brush's line style (each 1 bit draws a dash and each 0 bit produces a gap), and a decimal integer that defines the brush's width in pixels. For example, `idraw.brush2:ffff 1` defines a single pixel wide solid line. And if the definition specifies only the string `none`, then it defines the nonexistent brush. Iconic.
  • initialpattern β€” the pattern that'll be active on startup. Give a number identifying the pattern by its position in the Pattern menu, starting from 1 for the first entry.
  • patterni β€” defines a custom pattern for the *i*th entry in the Pattern menu. You can specify the pattern from a 16x16 bitmap, an 8x8 bitmap, a 4x4 bitmap, a grayscale number, or the string `none`. Here's the tea on how each one works:
    • the 16x16 bitmap β†’ sixteen 16-bit hexadecimal numbers
    • the 8x8 bitmap β†’ eight 8-bit hexadecimal numbers
    • the 4x4 bitmap β†’ a single 16-bit hexadecimal number
    • the grayscale number β†’ a single floating point number

The floating point number must contain a period to distinguish itself from the single hexadecimal number, and it must lie between 0.0 and 1.0, where 0.0 corresponds to a solid pattern and 1.0 to a clear pattern.

On the printer: the bitmap patterns appear as bitmaps, the grayscale patterns appear as halftoned shades, and the `none` patterns never obscure any underlying graphics. ✨

For example, `idraw.pattern8:8421` defines a diagonally hatched pattern. Cute!

  • initialfgcolor β€” the foreground color that'll be active on startup. Give a number identifying the color by its position in the FgColor menu, starting from 1 for the first entry.
  • fgcolori β€” defines a custom color for the ith entry in the FgColor menu. Give a string defining the name of the color, and optionally three decimal numbers between 0 and 65535 after the name to define the red, green, and blue components of the color's intensity. The intensities override the name β€” meaning idraw will only look the name up in a window system database of common colors if you omit the intensities. You can define shades of gray by using equal proportions of each primary color. For example, `idraw.fgcolor8:Indigo 48896 0 65280` defines a color that's a mixture of red and blue. πŸ¦‹
  • initialbgcolor β€” the background color that'll be active on startup. Give a number identifying the color by its position in the BgColor menu, starting from 1 for the first entry.
  • bgcolori β€” defines a custom color for the *i*th entry in the BgColor menu. Same rules apply to background colors as to foreground colors, fr fr. 🌈

🌸 SEE ALSO 🌸


and that's the whole page, bestie πŸŽ€ this was pulled straight from the idraw(1) manual page β€” go forth and customize your menus, you absolute main character πŸ‘‘πŸ’–