graphov.gml
来自「开放源码的编译器open watcom 1.6.0版的源代码」· GML 代码 · 共 732 行 · 第 1/2 页
GML
732 行
.fd _moveto
set the current output position
.fd _moveto_w
set the current output position using window coordinates
.fd _pie
draw a wedge of a "pie"
.fd _pie_w
draw a wedge of a "pie" using window coordinates
.fd _pie_wxy
draw a wedge of a "pie" using window coordinates
.fd _polygon
draw a polygon
.fd _polygon_w
draw a polygon using window coordinates
.fd _polygon_wxy
draw a polygon using window coordinates
.fd _rectangle
draw a rectangle
.fd _rectangle_w
draw a rectangle using window coordinates
.fd _rectangle_wxy
draw a rectangle using window coordinates
.fd _setpixel
set the color of the pixel at the specified position
.fd _setpixel_w
set the color of the pixel at the specified position in window coordinates
.fdend
.keep end
.*
.section *refid=grov8 Text &rroutines
.***********************
.np
These &routines deal with displaying text in both graphics and text modes.
This type of text output can be displayed
in only one size.
.np
This text is displayed using the
.kw _outtext
and
.kw _outmem
&routines..
The output position for text follows the last text that was displayed
or can be reset
.gfuncref settextposition .
Text windows can be created
.gfuncref settextwindow
in which the text will scroll.
Text is displayed with the current text color
.gfuncref settextcolor .
.keep begin
.np
.fdbeg
.fd _clearscreen
clear the screen and fill with the background color
.fd _displaycursor
determine whether the cursor is to be displayed after a graphics &routine
completes execution
.fd _getbkcolor
get the background color
.fd _gettextcolor
get the color used to display text
.fd _gettextcursor
get the shape of the text cursor
.fd _gettextposition
get the current output position for text
.fd _gettextwindow
get the boundary of the current text window
.fd _outmem
display a text string of a specified length
.fd _outtext
display a text string
.fd _scrolltextwindow
scroll the contents of the text window
.fd _setbkcolor
set the background color
.fd _settextcolor
set the color used to display text
.fd _settextcursor
set the shape of the text cursor
.fd _settextposition
set the output position for text
.fd _settextwindow
set the boundary of the region used to display text
.fd _wrapon
permit or disallow wrap-around of text in a text window
.fdend
.keep end
.*
.section *refid=grov9 Graphics Text &rroutines
.********************************
.np
These &routines deal with displaying graphics text.
Graphics text is displayed
as a sequence of line segments, and
can be drawn in different sizes
.gfuncref setcharsize ,
with different orientations
.gfuncref settextorient
and alignments
.gfuncref settextalign .
The &routines ending with
.id _w
use the window coordinate system; the others use the view coordinate system.
.keep begin
.np
.fdbeg
.fd _gettextextent
get the bounding rectangle for a graphics text string
.fd _gettextsettings
get information about the current settings used to display graphics text
.fd _grtext
display graphics text
.fd _grtext_w
display graphics text using window coordinates
.fd _setcharsize
set the character size used to display graphics text
.fd _setcharsize_w
set the character size in window coordinates used to display graphics text
.fd _setcharspacing
set the character spacing used to display graphics text
.fd _setcharspacing_w
set the character spacing in window coordinates used to display graphics text
.fd _settextalign
set the alignment used to display graphics text
.fd _settextorient
set the orientation used to display graphics text
.fd _settextpath
set the path used to display graphics text
.fdend
.keep end
.*
.section *refid=grov10 Image Manipulation &rroutines
.*************************************
.np
These &routines are used to transfer screen images.
The
.kw _getimage
&routine transfers a rectangular image from the screen into memory.
The
.kw _putimage
&routine transfers an image from memory back onto the screen.
The &routines ending with
.id _w
or
.id _wxy
use the window coordinate system; the others use the view coordinate system.
.keep begin
.np
.fdbeg
.fd _getimage
store an image of an area of the screen into memory
.fd _getimage_w
store an image of an area of the screen in window coordinates into memory
.fd _getimage_wxy
store an image of an area of the screen in window coordinates into memory
.fd _imagesize
get the size of a screen area
.fd _imagesize_w
get the size of a screen area in window coordinates
.fd _imagesize_wxy
get the size of a screen area in window coordinates
.fd _putimage
display an image from memory on the screen
.fd _putimage_w
display an image from memory on the screen using window coordinates
.fdend
.keep end
.*
.section *refid=grov11 Font Manipulation &rroutines
.************************************
.np
These &routines are for the display of fonts compatible with
Microsoft Windows.
Fonts are contained in files with an extension of
.mono .FON.
Before font based text can be displayed, the fonts must be registered
with the
.kw _registerfonts
&routine,
and a font must be selected with the
.kw _setfont
&routine..
.keep begin
.np
.fdbeg
.fd _getfontinfo
get information about the currently selected font
.fd _getgtextextent
get the length in pixels of a text string
.fd _getgtextvector
get the current value of the font text orientation vector
.fd _outgtext
display a string of text in the current font
.fd _registerfonts
initialize the font graphics system
.fd _setfont
select a font from among the registered fonts
.fd _setgtextvector
set the font text orientation vector
.fd _unregisterfonts
frees memory allocated by the font graphics system
.fdend
.keep end
.*
.section *refid=grov12 Presentation Graphics &rroutines
.****************************************
.np
These &routines provide a system for displaying and manipulating
presentation graphics elements such as bar charts and pie charts.
The presentation graphics &routines can be further divided into
three classes:
.begnote
.note Display &rroutines
.sk 0
These &routines are for the initialization of the presentation graphics
system and the displaying of charts.
.note Analyze &rroutines
.sk 0
These &routines calculate default values for chart elements without
actually displaying the chart.
.note Utility &rroutines
.sk 0
These &routines provide additional support to control the appearance
of presentation graphics elements.
.endnote
.np
The following subsections describe these &routine classes in more detail.
Each &routine in the class is noted with a brief description of its
purpose.
.*
.beglevel
.*
.section *refid=grov13 Display &rroutines
.**************************
.np
These &routines are for the initialization of the presentation graphics
system and the displaying of charts.
The
.kw _pg_initchart
&routine initializes the system and should be the first
presentation graphics &routine called.
The single-series &routines display a
single set of data on a chart; the multi-series &routines
(those ending with
.id ms)
display several sets of data on the same chart.
.keep begin
.np
.fdbeg
.fd _pg_chart
display a bar, column or line chart
.fd _pg_chartms
display a multi-series bar, column or line chart
.fd _pg_chartpie
display a pie chart
.fd _pg_chartscatter
display a scatter chart
.fd _pg_chartscatterms
display a multi-series scatter chart
.fd _pg_defaultchart
initialize the chart environment for a specific chart type
.fd _pg_initchart
initialize the presentation graphics system
.fdend
.keep end
.*
.section *refid=grov14 Analyze &rroutines
.**************************
.np
These &routines calculate default values for chart elements without
actually displaying the chart.
The &routines ending with
.id ms
analyze multi-series charts; the others analyze single-series charts.
.keep begin
.np
.fdbeg
.fd _pg_analyzechart
analyze a bar, column or line chart
.fd _pg_analyzechartms
analyze a multi-series bar, column or line chart
.fd _pg_analyzepie
analyze a pie chart
.fd _pg_analyzescatter
analyze a scatter chart
.fd _pg_analyzescatterms
analyze a multi-series scatter chart
.fdend
.keep end
.*
.section *refid=grov15 Utility &rroutines
.**************************
.np
These &routines provide additional support to control the appearance
of presentation graphics elements.
.keep begin
.np
.fdbeg
.fd _pg_getchardef
get bit-map definition for a specific character
.fd _pg_getpalette
get presentation graphics palette (colors, line styles, fill patterns and
plot characters)
.fd _pg_getstyleset
get presentation graphics style-set (line styles for window borders and
grid lines)
.fd _pg_hlabelchart
display text horizontally on a chart
.fd _pg_resetpalette
reset presentation graphics palette to default values
.fd _pg_resetstyleset
reset presentation graphics style-set to default values
.fd _pg_setchardef
set bit-map definition for a specific character
.fd _pg_setpalette
set presentation graphics palette (colors, line styles, fill patterns and
plot characters)
.fd _pg_setstyleset
set presentation graphics style-set (line styles for window borders and
grid lines)
.fd _pg_vlabelchart
display text vertically on a chart
.fdend
.keep end
.*
.endlevel
.*
.endlevel
.*
.if '&lang' eq 'C' .do begin
.section *refid=grov16 Graphics Header Files
.do end
.el .do begin
.section *refid=grov16 Include Files
.do end
.******************************
.np
.if '&lang' eq 'C' .do begin
.ix 'graphics header files'
All program modules which use the Graphics Library should
include the header file
.filename graph.h.
This file contains prototypes for all the &routines in the library
as well as the structures and constants used by them.
.np
Modules using the presentation graphics &routines should also
include the header file
.filename pgchart.h.
.do end
.el .do begin
.ix 'graphics include files'
All program modules which use the Graphics Library should
include the file
.filename graphapi.fi.
This file contains definitions of all the &routines in the library.
As well, each &routine should include
.filename graph.fi
which contains all the structure and constant definitions.
.np
Modules using the presentation graphics &routines should also
include the file
.filename pgapi.fi.
As well, each &routine should include
.filename pg.fi.
.do end
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?