COMDRAW(1)
π comdraw β NAME π
comdraw β bestie it's a drawtool with a distributed command interpreter β¨
π¦ SYNOPSIS
comdraw [-port n] [-import n] ['X-params'] [file]
π DESCRIPTION
okay so listen. comdraw is a drawing editor with a whole command interpreter built right into it, and you get to talk to it through stdin and stdout β or over telnet if ACE is built in. it's giving "I contain a whole language and also I draw" πΈ
The command syntax is a semi-colon separated list of commands, each with an arbitrary number of parameters wrapped in parentheses, and yes it supports optional parameters and keyword arguments, like literally:
command1(arg1 arg2 arg3 :key1 val1 :key2 val2);
command2(arg1 arg2 arg3 :key1 val1 :key2 val2)
All the literals and operators of C are supported π― β except for the syntax of the conditional operator "?:". no ?: for you, bestie, sorry π. peep the comterp documentation for more details.
fr fr: every argument to the commands below is an integer unless it's got a suffix. str means strings embedded in quotes, flt means conventional floating point numbers. and "compview" is a graphical object assigned to an interpreter variable π«Ά.
β¨ DRAWING COMMANDS β¨
create-the-things hours π
compview=rect(x0,y0,x1,y1)β create a rectanglecompview=rectangle(x0,y0,x1,y1)β same asrect(twin behavior, different name, iconic)compview=line(x0,y0,x1,y1)β create a linecompview=arrowline(x0,y0,x1,y1)β create a line with arrowscompview=ellipse(x0,y0,r1,r2)β create an ellipsecompview=text(x0,y0 textstr)β create a text stringcompview=multiline(x0,y0[,x1,y1,...])β create a multilinecompview=arrowmultiline(x0,y0[,x1,y1,...])β create a multiline with arrowscompview=openspline(x0,y0[,x1,y1,...])β create an open splinecompview=arrowspline(x0,y0[,x1,y1,...])β create an open spline with arrowscompview=polygon(x0,y0[,x1,y1,...])β create a polygoncompview=closedspline(x0,y0[,x1,y1,...])β create a closed splinecompview=raster(x0,y0,x1,y1)β create an empty raster
π GRAPHIC STATS COMMANDS π
math but make it glam π
xylist=center(compview :xy :yx :x :y :scrn)β the center ofcompview(dflt:xy)rectlist=mbr(compview :lbrt :lrbt :scrn)β the minimum bounding rectangle ofcompview(dflt:lbrt)ptlist=points(compview :raw)β hand over the point list from acompviewgraphic
πΈ GRAPHIC STATE COMMANDS πΈ
setting the current vibe of your drawing tools π
font(fontnum)β set the current font from the menubrush(brushnum)β set the current brush from the menupattern(patternnum)β set the current pattern from the menupatternmask(int|list)β set the current pattern from a 16 bit int (4x4) or a list of 16 ints (16x16)colors(fgcolornum bgcolornum)β set the current colors from the menucolorsrgb(fgcolornum bgcolornum)β set the current colors by RGB name. the colorname format is"#RGB"for 4 bits,"#RRGGBB"for 8 bits,#RRRGGGBBBfor 12 bits, and#RRRRGGGGBBBBfor 16 bits β¨nfonts()β return the size of the font menunbrushes()β return the size of the brush menunpatterns()β return the size of the pattern menuncolors()β return the size of the color menus
π₯ DIRECT MANIPULATION COMMANDS π₯
moving your stuff around, main character energy only
select([compview ...] :all :clear)β make these graphics the current selectiondelete(compview [compview ...])β delete graphic(s)move(dx dy)β move the current selectionscale(xflt yflt)β scale the current selectionrotate(degflt)β rotate the current selectionfliph()β horizontally flip the current selectionflipv()β vertically flip the current selection
π§ GROUP/UNGROUP COMMANDS π§
newgroup=growgroup(groupview compview)β add a graphic to an existing group graphicnewgroup=trimgroup(groupview compview)β remove a graphic from an existing group graphic
π COMPONENT AND ATTRIBUTE COMMANDS π
compview=setattr(compview [:keyword value [:keyword value [...]]])β set attributes of a graphic componentattrlist(compview)β return the attribute list of a componentcompview=frame([index])β return the composite component for a frame, defaults to the current oneval=at(list|attrlist|compview n :set val :ins val)β return (or set, or insert after) the nth item in a listnum=size(list|attrlist|compview)β return the size of a listcompview=parent(compview)β get the parent of a graphiccomp=depth(comps)β depth-first walk of a comp tree π³
π VIEWER COMMANDS π
this section is LONG bestie, hydrate π§
update([usec])β update the viewer, with an optional delayerror=save([pathstr])β the command to save the document (to a pathname)compview=import(pathstr :popen :next)β import a graphic file from a pathname or URL, or from a command if:popen. (:nextimports the next one in the numeric series)export(compview[,compview[,...compview]] [path] :host str :port int :socket :string|:str :eps :idraw)β export remotely in drawtool (or other) formatcompview=paste(compview [xscl yscl xoff yoff | a00,a01,a10,a11,a20,a21])β paste a graphic into the viewerval=pastemode([val] :get)β toggle or set paste mode. default is0, which always pastes new graphicscompview=readonly(compview :clear)β set or clear the read-only attribute of a graphic componentncols()β onscreen horizontal extent in pixelsnrows()β onscreen vertical extent in pixelsdx,dy=stod(sx,sy)β convert from screen to drawing coordinatessx,sy=dtos(dx,dy)β convert from drawing to screen coordinatesdx,dy=gtod(compview gx,gy)β convert from graphic to drawing coordinatesgx,gy=dtog(compview dx,dy)β convert from drawing to graphic coordinatessx,sy=ssize()β size of the screendx,dy=dsize()β size of the drawinghandles([flag])β disable/enable the current selection tic marks and/or highlightinghighlight(compview compviewgs)β set the highlight graphic state for a graphiczoom(zoomflt)β zoom by a factorzoomin()β zoom in by 2zoomout()β zoom out by 2pan(px py)β pan the viewersmallpanup()β small pan upsmallpandown()β small pan downsmallpanleft()β small pan leftsmallpanright()β small pan rightlargepanup()β large pan uplargepandown()β large pan downlargepanleft()β large pan leftlargepanright()β large pan rightgravity([flag])β set/get the drawing editor gravitygridspacing([xsize ysize])β set/get the drawing editor grid spacinghide(compview)β hide a graphic componentshow(compview)β show a graphic componentdesensitize(compview)β desensitize a graphic componentsensitize(compview)β desensitize a graphic component
ngl, that last one really does say "desensitize" in the original too π not me editorializing, I'm just the messenger bestie. sensitize is listed with the same description. periodt.
π IMAGING COMMANDS π
pixels, pixels, pixels π₯
tilefile(inpath outpath [xsize] [ysiz])β tile a pgm or ppm image fileval=peek(compview x y)β peek a pixel value into a rasterpoke(compview x y val)β poke a pixel value into a rasterpokeline(compview x y vallist)β poke a list of values into a raster linepcols(compview)β number of columns in a rasterpcols(compview)β number of rows in a rasterpflush(compview)β flush pixels poked into a rasterpclip(compview x1,y1,x2,y2,x3,y3[,...,xn,yn]|compview)β clip a raster with a polygonalpha(compview [alphaval])β set/get alpha transparency
okay yes, pcols appears twice up there and the second one says "rows" π that is genuinely what the page says. I am NOT fixing it. keeping every detail, no cap.
π PLOTTING COMMANDS π
requires plotmtv and pstoedit β οΈ (heads up, this whole section needs those)
barplot([var_str value_float] [...] :title str :xtitle str :ytitle str :valtitle str :newview)β display a barplot
β OTHER COMMANDS β
the lil grab-bag section
acknowledgebox(msgstr)β popup an acknowledge dialog boxconfirmbox(msgstr)β popup a confirmation dialog box, and return1,0, or-1if cancelledrun(filename)β run commands from a filequit()β quit this interpreterexit()β exit the entire applicationpause([msgstr] :usec num)β pause script execution until C/R
π OPTIONS π
-port nβ specifies the port number to accept command interpreter connections on-import nβ specifies the port number to run the import service on. the import service accepts connections over the net and reads drawtool format data-stripped nβ brings up acomdrawwithout any menubar, toolbar, panner, slider, or zoomer. it can be controlled via stdin or telnet if built with ACE-rampsize nβ selects the rampsize used for gray-level image processing-theight n(or"-th n") β selects the automatic raster tiling height-twidth n(or"-tw n") β selects the automatic raster tiling width-tileβ enables the automatic raster tiling
also peep the-helpmessage and thedrawtoolandidrawman pages for further options π
π SEE ALSO π
comterp, drawtool, idraw
π WEB PAGES π
http://www.ivtools.org/ivtools/comdraw.html
aaaand that's the whole thing bestie π
β¨ this whole page lives in the General Commands Manual and it signs off as COMDRAW(1) β that's the footer, that's the header, that's just the vibe. so go forth, draw stuff, speak fluent command-interpreter, and slay ππ¦π
π¦ where this page comes from
- ubuntu stonking: ivtools-bin 2.1.1+git.2025.07.26.a1-1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms