c语言图形编程(三、绘图函数-)(C language graphics programming (three, drawing function -)).doc
c语言图形编程(三、绘图函数-01)(C language graphics programming (three, drawing function -01))A screen and a viewport setting and clear function
Setviewport (36.) set the viewport graphic function
Clearviewport (37.) clear graphical viewport function
38. cleardevice () clear screen function
Getviewsettings (39.) gets the graphics view settings function
Two, palette and color function
40. setpalette () set palette function
41. setallpalette () sets the entire palette function
Setting the background color function for 42. setbackcolor ()
43. SetColor () set the color function
44. GetBkColor () returns the background color function
45. getcolor () returns the current drawing color
46. getmaxcolor () returns the maximum color value function
47. GetPalette () to obtain palette function
48. getpalettesize () returns the palette size function
49. getdefaultpalette () to obtain the default palette function
Three, screen position function
50. getmaxx () returns the maximum X coordinate function
51. getmaxy () returns the maximum y coordinate function
52. geTx () returns the X coordinate function
53. gety () returns the Y coordinate function
54. moveto () function
55. moverel () relative moving function
----------------------------------------------------
Borland C++ provides a comprehensive set of graphical functions, the section describes the functions related to graphics display, this section describes the drawing function, the next section will introduce its graphics text function.
The general drawing, we must first clear the screen and set the graphics viewport, set the drawing color, and then in a location on the screen to draw points or lines or curves. The functions with these functions are given below.
A screen and a viewport setting and clear function
Setviewport (36.) set the viewport graphic function
Function: function (setviewport) to set the current graphical viewport.
Usage: the function calls are void setviewport (int left, int top, int right, int bottom, int clip);
Descr