📄 mfbcap.5
字号:
DBS=\\E*m3b%X%d\\,%Y%d\\,%Z%d\\,%T%dE, DSL=\\E*m1B\\E*pa%X%d\\,%Y%d\\,%Z%d\\,%T%dZ, DLS=\\E*pa%X%d\\,%Y%d\\,%Z%d\\,%T%dZ, WPX=\\E*pa%X%d\\,%Y%d\\,%X%d\\,%Y%dZ, PLS=\\E*pa%X%d\\,%Y%d, PLV=\\,%X%d\\,%Y%d, PLE=\\,%X%d\\,%Y%dZ, LDL#1, LDF=\\E*m%Y%d 1C, GCS=\\E*d%X%+A%c$<#500>, GCH#11, GCW#7, GFS=\\EH\\EJ\\E*mR\\E*dlaeD$<#2500>, GIS=\\E*mR\\E*dlafC$<#3500>, GTE=\\E*dT, GTH#1, GTW#1, GTS=\\E*pa%X%d\\,%Y%dZ\\E*dS, KYBRD, KYB=^H, KYS=\\E*pa%X%d\\,%Y%dZ\\E*m4a\\E*dS, KYE=\\E*dT, KYX#1, KYY#1, SFP=\\E&f%X%+1%cE\\21, SCS=\\E*m%X%+1%cA, SLS=\\E*m2B, FDH#8, FDW#8, FDR, FDF= %Y%3, FDS=\\E&f1a%X%+1%ck36L\\E*m, FDE=D$<#90>, POD, PDR=\\E*s4\\^\\021, PDS=\\E*dK, PRBON=\\E*dM, PRBOFF=\\E*dN, PDF=\\+%d\\,%X\\+%d\\,%Y%3%Z%c, PDE=\\021\\E*dL, .fi.ne 4.PPCapabilities in.I MFBCAPare of three types:Boolean capabilities which indicate that the terminal hassome particular feature, numeric capabilities giving the size of theterminal, and stringcapabilities which give a sequence that can be used to perform particularterminal operations..PP.ne 5.B Types of Capabilities.PPAll capabilities have an identifying code. For instance, becausethe HP2648 has \*(lqaccurately positionable text\*(rq (.I i.e.,graphics text may be positioned with lower left corner at any pixel onthe screen ) is indicated by the boolean \fBAPT\fR.Hence the description of the HP2648 includes \fBAPT\fR.Numeric capabilities are followed by the character `#' and then the value.Thus \fBMXC\fR which specifies the maximum value of the X coordinateon the terminal viewport gives the value `719' for the HP2648..PP.ne 5.B Formatting String Capabilities.PPString variables have a formatting capabilityto be used for encoding numbers into ASCII strings and decodingASCII strings into numbers. An example of the former is the capability\fBDBS\fR ( for \fBD\fRraw \fBB\fRox \fBS\fRequence ), which takesfour numbers (X, Y, Z, and T) and generates the proper sequence todraw a box from the lower left corner (X,Y) to the upper right corner (Z,T).An example of a string decode is the capability \fBPDF\fR ( for\fBP\fRointing \fBD\fRevice \fBF\fRormat ), which takes an ASCIIstring from the input stream and extracts from it an x and y coordinate,a key (if one was pushed) and a buttonmask (if a cursor button was pushed)..PP.ne 5.B String Formatting.PPThe string variables have a formatting capabilitywhich uses four variables (X, Y, Z, and T) to generate a formatedstring (with.I MFBGenCode),or generates four variables (X, Y, Z, and T) from a formated string(with.I MFBDecode).Two temporary registers represented by the letters \fBR\fR and \fBr\fRare available.All operations begin with a percent sign `\fB%\fR', and they are listedbelow:.sp.ne 10.nf.ta \w'%XXX 'u\fBCom Command Description encode/(decode)\fR%X set value/(X variable) to the X variable/(value).%Y set value/(Y variable) to the Y variable/(value).%Z set value/(Z variable) to the Z variable/(value).%T set value/(T variable) to the T variable/(value).%C set value to the current foreground color ID.%F set value to the current fill pattern ID.%L set value to the current line style ID.%d output/(input) value in variable length decimal format%2 output/(input) value converting to/(from) two decimal digits.%3 output/(input) value converting to/(from) three decimal digits.%c output/(input) least significant byte of value without conversions.%h1 output/(input) least significant four bits converting to/(from) one ASCII hex character.%h2 output/(input) least significant byte converting to/(from) two ASCII hex characters.%h3 output/(input) least significant twelve bits converting to/(from) three ASCII hex characters.%h4 output/(input) least significant sixteen bits converting to/(from) four ASCII hex characters.%o1 output/(input) least significant three bits converting to/(from) one ASCII octal character.%o2 output/(input) least significant six bits converting to/(from) two ASCII octal characters.%o3 output/(input) least significant nine bits converting to/(from) three ASCII octal characters.%o4 output/(input) least significant twelve bits converting to/(from) four ASCII octal characters.%o5 output/(input) least significant fifteen bits converting to/(from) five ASCII octal characters.%o6 output/(input) least significant sixteen bits converting to/(from) six ASCII octal characters.%t1 output/(input) X and Y in Tektronix format.%t2 output/(input) Z and T in Tektronix format.%t3 output X and R in Tektronix format (MFBGenCode only).%t4 output R and Y in Tektronix format (MFBGenCode only).%t5 output R and r in Tektronix format (MFBGenCode only).%ti output/(input) value in Tektronix integer format.%tr output value in Tektronix real format.%R store/(retrieve) value in temporary register 1.%r store/(retrieve) value in temporary register 2.%+x add x to value.%-x subtract x from value.%*x multiply value by x.%/x divide value by x.%>>x shift value right by x bits.%<<x shift value left by x bits.%|x OR x with value.%&x AND x with value.%^x EOR x with value.%=x set value equal to x.%ax set value equal to the absolute value of x.%~ Complement value ( 1's complement ).%@ output a single null character (MFBGenCode only).%% gives `%`.%B BCD (2 decimal digits encoded in one byte).%D Delta Data (backwards bcd). Where x can be:(1) One byte - the numeric value of this byte is used as x.(2) The character "#" followed by a decimal integer value for x.(3) The character "%" followed by C, F, L, X, Y, Z, T, r, or R - the value of C, F, L, X, Y, Z, T, r or R is used..fi.spThe command formats are similar to those found in.I termcap(5)or.I terminfo(5),but are more complicated due to the more rigorous requirements ofgraphics terminals..PP.ne 5.B Preparing Descriptions.PPWe now outline how to prepare .I MFBCAPdescriptions of graphics terminals.The most effective way to prepare a terminal description is to build up a description gradually, using partial descriptionswith simple .I mfb(3)test routines to check that they are correct.Be aware that a very unusual terminal may expose deficiencies inthe ability of the.I MFBCAPfile to describe it.To easily test a new terminal description you can set the environment variable\fBMFBCAP\fR to a pathname of a file containing the descriptionyou are working on.After setting the environment variable, any program that uses .I mfb(3),.I e.g., kic,will look at the pathname defined by the environment variable instead of.I ~cad/lib/mfbcap..PP.ne 5.B Delays.PPDelays may be embedded anywhere in a string capability and is distinguishedby the \fB$<\fR and \fB>\fR brackets. The number contained within thesebrackets describes the delay in milliseconds to be generated and mustconform to the above description for the variable 'x' (.I e.g.,an integerconstant must be preceded by the character "#").Before each delay, the output buffer is flushed..PP.ne 5.B Basic Capabilities.PPThe number of pixels on a horizontal row of the display is given by the\fBMXC\fR numeric capability, and the number of pixels in a verticalcolumn is given by the \fBMXY\fR capability. The number of colorsavailable on the display is specified by the \fBMCL\fR capability. Forblack and white terminals, such as the HP2648, the \fBMCL\fR capabilityis defined as two. The maximum number of stipple fill patterns and linestyles is given by the \fBMFP\fR and \fBMLS\fR numeric capabilitiesrespectively..PPOff screen memory refers to an area of the viewport in pixelcoordinates which is not displayed.The lower, left corner of the off screen memory is specified by the\fBOFFMX\fR and \fBOFFMY\fR numeric capabilities.The horizontal length of the off screen memory is specified by the \fBOFFDX\fRnumeric capability, and the vertical width of the off screen memory isspecified by the \fBOFFDY\fR numeric capability..PP.I MFBCAPallows two sequences for initializing and uninitializingthe terminal. The first initialization string sent to the terminalis given by the \fBGIS\fR format string. This will be the firstsequence sent to the graphics device.The graphics finish/termination string is given by the \fBGFS\fRformat string. This will be the last sequence sent to the graphics device..PPThe initialization character sequences for color styles, fill styles, and linestyles are defined respectively by the \fBICS\fR, \fBIFP\fR, and \fBILS\fRformat strings..PPThe sequence to ring the terminals bell or alarm is defined by the\fBBELL\fR string and defaults to control-G..PP.ne 5.B Setting Colors and Styles.PPThe character sequence for setting the current foreground coloris defined by the \fBSCS\fR format string. All subsequentgeometries will be drawn in this color. The format forsetting the current line style is given by the \fBSLS\fR format string,and the format for setting the current fill style is given by the\fBSFP\fR format string. All subsequent lines, boxes, and polygonswill be drawn with these styles..I MFBCAPassumes that style zero defines a solid line and fill pattern. If thisis not the case for a particular frame buffer, or the format for settinga solid line or fill style is inconsistent with that for other line styles,such as is the case for the HP9872, a character sequence forsetting the solid line or fill style is defined by the \fBSSLS\fRand \fBSSFP\fR format strings respectively.If it is necessary for the current line style to be reissued beforea line is drawn (as is the case for the HP 2648), then the \fBRLS\fRboolean must be present in the.I MFBCAPentry..PP.ne 5.B Basic Geometries.PPThe character sequence for moving the current graphics position toa x,y pixel coordinate is defined by the \fBMPS\fR format string.The format for drawing a line in the current line style from thecurrent graphics position to a x,y pixel coordinate is definedby the \fBDLT\fR format string. The character sequence todraw a line in the current line style from a x,y pixel coordinateto a z,t pixel coordinate is defined by the \fBDLS\fR format string.If the command for drawing a solid line is different from that fora non-solid line, the character sequence todraw a solid line from a x,y pixel coordinate to a z,t pixel coordinate may be defined by the \fBDSL\fR string capability.The format for drawing a solid line from thecurrent graphics position to a x,y pixel coordinate is definedby the \fBDSLT\fR format string..PPThe sequence for drawing a box in the current foreground colorfrom the lower left x,y pixel coordinate to the upper rightz,t pixel coordinate is specified by the \fBDBS\fR format string.Because some terminals, such as the Tektronix 4113, have specialraster commands for drawing solid boxes, a format for drawingsolid boxes may be specified by the \fBDSB\fR format string..PP
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -