xenocara/app/xgc/Written/Jim
2006-11-25 20:07:29 +00:00

256 lines
10 KiB
Plaintext

The Commands menu should contain the following items:
Run [the selected benchmark]
Benchmark Options.../Hide Benchmark Options [toggle]
Graphics Options.../Hide Graphics Options [toggle]
Describe Test.../Hide Test Description [toggle]
Start Recording/Stop Recording [toggle]
Playback [pop up a dialogue box asking for filename]
--------
Quit [pop up a dialogue box asking if we are really done]
The Benchmark Options sheet should contain the information shown below. The
list of graphics primitives was derived from the "Definition of the Porting
Layer for the X v11 Sample Server" by Angebranndt et al. and from the Protocol
document.
Benchmark Options
+-----------------------+-----------------------+
Test | Copy Area | Copy Plane |
+-----------------------+-----------------------+
| Points | Lines |
+-----------------------+-----------------------+
| Segments | Rectangles |
+-----------------------+-----------------------+
| Arcs | Filled Polygons |
+-----------------------+-----------------------+
| Filled Rectangles | Filled Arcs |
+-----------------------+-----------------------+
| Put Image | Get Image |
+-----------------------+-----------------------+
| Text 8 | Image Text 8 |
+-----------------------+-----------------------+
| Text 16 | Image Text 16 |
+-----------------------+-----------------------+
+---------+
Iterations | 10000 |
+---------+
+----+-----+ +----+-----+
Record | on | off | Describe Test | on | off |
+----+-----+ +----+-----+
+-----------------------------------------------+
Filename | ./xbench.log |
+-----------------------------------------------+
*******************************************************************************
The Graphics Options area would contain the following entries:
Function - one-of { clear, and, andReverse, copy, andInverted, noop, xor,
or, nor, equiv, invert, orReverse, copyInverted,
orInverted, nand, set }
PlaneMask - unsigned value or many-of-n representing bits
Foreground - unsigned value in range 0..2^nplanes
Background - unsigned value in range 0..2^nplanes
ForegroundColor - set rgb value of Foreground
BackgroundColor - set rgb value of background
LineWidth - unsigned number in range 0..65535
LineStyle - oneof { Solid, OnOffDash, DoubleDash }
CapStyle - one-of { NotLast, Butt, Round, Projecting }
JoinStyle - one-of { Miter, Round, Bevel }
FillStyle - one-of { Solid, Tiled, OpaqueStippled, Stippled }
FillRule - one-of { EvenOdd, Winding }
ArcMode - one-of { Chord, PieSlice }
# Tile - pixmap [probably not edittable in first version]
# Stipple - pixmap [probably not edittable in first version]
TileStipXOrigin - signed number in range -32768..32767
TileStipYOrigin - signed number in range -32768..32767
Font - name of font
ClipXOrigin - signed number in range -32768..32767
ClipYOrigin - signed number in range -32768..32767
ClipMask - one-of { None, select } [user selects by clicking in work area]
DashOffset - unsigned number in range -32768..32767
DashList - many-of-n of 8 boxes for defining dashes
Graphics Options
+--------------+--------------+--------------+--------------+
Function | clear | and | andReverse | copy |
+--------------+--------------+--------------+--------------+
| andInverted | noop | xor | or |
+--------------+--------------+--------------+--------------+
| nor | equiv | invert | orReverse |
+--------------+--------------+--------------+--------------+
| copyInverted | orInverted | nand | set |
+--------------+--------------+--------------+--------------+
+-----+---------+
Colormap | new | default |
+-----+---------+
+----------+ +--------+--------+--------+
Foreground | 1 | ForegroundColor | ffff | ffff | ffff |
+----------+ +--------+--------+--------+
+----------+ +--------+--------+--------+
Background | 0 | BackgroundColor | 0000 | 0000 | 0000 |
+----------+ +--------+--------+--------+
+------+ +-------+-----------+------------+
LineWidth | 3 | LineStyle | Solid | OnOffDash | DoubleDash |
+------+ +-------+-----------+------------+
+---------+------+-------+------------+
CapStyle | NotLast | Butt | Round | Projecting |
+---------+------+-------+------------+
+-------+-------+-------+
JoinStyle | Miter | Round | Bevel |
+-------+-------+-------+
+-------+-------+----------+----------------+
FillStyle | Solid | Tiled | Stippled | OpaqueStippled |
+-------+-------+----------+----------------+
+---------+---------+
FillRule | EvenOdd | Winding |
+---------+---------+
+-------+----------+
ArcMode | Chord | PieSlice |
+-------+----------+
+--------------+
TStipOrigin | +####, +#### |
+--------------+
+-+-+-+-+-+-+-+-+ +-------+
DashList | | |X|X| | |X|X| DashOffset | +#### |
+-+-+-+-+-+-+-+-+ +-------+
+----+-----+-----+-------+ +--------+
ClipMask | on | off | set | clear | PlaneMask | ffff |
+----+-----+-----+-------+ +--------+
*******************************************************************************
Grammar
Both to support Record/Playback (used for debugging, demonstrations, and for
creating benchmark scripts), there needs to be a command line language that
can be used to set all options. Although we won't be doing anything as
sophisticated as what is provided in many UIMS's, it would be nice to keep
the application section of the benchmark as separate as possible from the
user interface.
test { CopyArea, CopyPlane, PolyPoint, PolyLine, PolySegment,
PolyRectangle, PolyArc, FillPolygon, PolyFillRect, PolyFillArc,
PutImage, GetImage, ImageText8, PolyText8, ImageText16,
PolyText16 }
- selects the test to be performed.
colormap { new, default }
- selects which colormap should be used for test
iterations UNSIGNEDNUMBER
- specifies the number of times that the test should be run.
record BOOLEAN
- indicates whether or not to record commands into the record-file.
record-file FILENAME
- specifies the name of the file into which commands are recorded.
describe BOOLEAN
- indicates whether or not a description of the test should be
displayed whenever a test is selected (or when this option is
specified).
function { clear, and, andReverse, copy, andInverted, noop, xor, or, nor,
equiv, invert, orReverse, copyInverted, orInverted, nand, set }
- selects the alu function to use in the GC.
foreground UNSIGNEDNUMBER
- selects the foreground pixel value to use in the GC; if a new
colormap is being used, the RGB value for this slot may be changed.
background UNSIGNEDNUMBER
- selects the background pixel value to use in the GC; if a new
colormap is being used, the RGB value for this slot may be changed.
forecolor COLORNAME
- specifies the RGB value or name of the color to be used for the
foreground pixel, if settable.
backcolor COLORNAME
- specifies the RGB value or name of the color to be used for the
background pixel, if settable.
linewidth NUMBER
- specifies width of lines to use in the GC.
linestyle { Solid, OnOffDash, DoubleDash }
- selects the type of lines to use in the GC.
capstyle { NotLast, Butt, Round, Projecting }
- selects the type of caps to use in the GC.
joinstyle { Miter, Round, Bevel }
- selects the type of joins to use in the GC.
fillstyle { Solid, Tiled, Stippled, OpaqueStippled }
- selects the type of fills to use in the GC.
fillrule { EvenOdd, Winding }
- selects the fill rule to be used in the GC.
arcmode { Chord, PieSlice }
- selects the type of arcs to be drawn in the GC.
tsorigin NUMBER NUMBER
- specifies the X and Y values of the TileStippleOrigin in the GC.
dashlist DASHPATTERN
- specifies a pattern of 8 binary digits to use in the dashlist
in the GC; the characters are given in big-endian order such that
they may be read in binary to form a number between 0 and 255.
dashoffset NUMBER
- specifies the dashoffset to use in the GC.
cliporigin NUMBER NUMBER
- specifies the X and Y values of the cliporigin in the GC.
clipmask { on, off, set NUMBER NUMBER NUMBER NUMBER, clear }
- selects a clipping mode. If "on", then use the most recently
defined set of clipping rectangles; if "off", then do not do
any clipping but keep the clipping rectangles for future
reference; if "set", then add the rectangle specified by
the remaining numeric arguments as X1 Y1 X2 Y2 relative to the
cliporigin.
planemask NUMBER
- specifies the set of planes on to which graphics may be drawn
in the GC.
run
- run the currently configured test.
quit
- exit the program