CodeBus
www.codebus.net
Search
Sign in
Sign up
Hot Search :
Source
embeded
web
remote control
p2p
game
More...
Location :
Home
Search - INT 1
Main Category
SourceCode
Documents
Books
WEB Code
Develop Tools
Other resource
Search - INT 1 - List
[
Graph Drawing
]
MyPaint1.0
DL : 0
设计思路: 对Windows XP自带的画笔程序进行分析,一般User画图过程: 首先鼠标选择绘图工具,然后选择颜色,接着按User需要作图。User对产出的图像进行操作。 对图形元素抽象出公共属性,设计我的画板的作图过程: 选择工具 、画预览效果、User满意并确定、绘制效果。 下面是程序用到主要变量: 当前绘图点粒度:int iGranularity 当前使用颜色:COLORREF curColor 当前绘图状态:int iPaintStatus 当前绘图状态属性:int iPaintProperty 前一个鼠标坐标:CPoint pOldPoint 多边形起点:CPoint pStartPoint 多边形终点:CPoint pEndPoint 当前鼠标坐标:CPoint pCurPoint 输出文本字符串缓存:CString strTextOut 对典型操作过程(画矩形)描述: 用户选择工具_RECTANGLE(使iPaintStatus=_RECTANGLE)、 选择绘图颜色(设定curColor)、 用户按下鼠标左键使绘图状态属性为预览(iPaintProperty=_PREVIEW)、 用户移动鼠标(绘制图形的橡皮线效果) 用户放开左键(绘制图形的实线效果) -design : Windows XP's own brush analysis procedures, the general User drawing process : first choice mouse drawing tool, then select colors, followed by Graphic User needs. User to output images to operate. Right abstract graphic elements from the public properties, design I slate of mapping process : select tools, painting preview effects, User satisfaction and identification, mapping results. Below is a procedure used mainly variables : the current drawing point size : int iGranularity current use of color : COLORREF curColor current graphics state : int iPaintStatus current graphics state attributes : int iPaintProperty before a mouse coordinates : jumping pOldPoint polygon starting point : jumping pStartPoint polygon end : When the redemption pEndPoint before the mouse coordinates
Date
: 2026-01-07
Size
: 1.91mb
User
:
mars
[
Graph Drawing
]
jisuanjituxing
DL : 0
根据多边形区域的填充原理可以推广到圆域的填充,由于圆的特殊属性,即可根据任何欲填充的像素点与圆心的距离是否大于或小于半径来判断是否在圆内或圆外,具体实现程序如下; 利用中点画圆算法实现边界程序: void CArea_FillData::MidpointCircle(int xc, int yc, int r, int color) {//画八分之一的圆 int x,y,d x=0 y=r d=1-r WholeCircle(xc,yc,x,y,color) while(x<y) -According to the regional polygon filling principle can be extended to the domain filled round, a round of special attributes, can be filled under any wishes to the central pixel and the distance is greater than or less than the radius to determine whether the circle or round, realize the procedure is as follows; Midpoint Circle Algorithm border procedures : void CArea_FillData : : MidpointCircle (int xc. yc int, int r, int color) (//painting of the eighth round int x, y, d x = 0 y = r d = 1-r WholeCircle (xc, yc, x, y, color) while (x
Date
: 2026-01-07
Size
: 89kb
User
:
周林
[
Graph Drawing
]
1821
DL : 0
一个实时曲线类 接口说明: // 设置网格间距 void SetGridResolutionX(int nGridReluX) // 设置网格间距 void SetGridResolutionY(int nGridReluY) // 设置网格滚动速度,正值为从左向右滚动,0不动 void SetGridScrollSpeedX(int nSpeedX) // 正值为从上到下滚动,0不动 void SetGridScrollSpeedY(int nSpeedY) // 网格线宽度 void SetGridLineWidth(int nWidth) // 背景色 void SetGridBackClr(COLORREF clr) // // 锁定数据显示范围 void LockRang(bool bfLock = true) // 锁定数据显示范围 void LockRang(float fMin, float fMax) // 设置数据 void SetData(float fData) // 曲线颜色 void SetLineColor(COLORREF clrLine = RGB ( 0 , 255 , 0 )) void SetLineWidth(int nWidth = 1) -curve of a real-time interface category :// set up grid spacing void SetGridResolutionX (int nGridR eluX)// set grid spacing void SetGridResolutionY (int n GridReluY)// set the rolling speed mesh, when rolling to the left-to-right, 0 Fixed void SetGridScrollSpeedX (int nSpeedX)// when rolling from the top down to, 0 Fixed void SetGridScrollSpeedY (int nSpeedY)// Grid line width void SetGridLineWidth (int nWidth)// background Color void SetGridBackClr (COLORREF clr)//// lock data display range void LockRang (bool bfLock = true)// lock significant data said the scope void LockRang (float fMin. float fMax)// set data void Graph (float fData)// color curve void SetLineColor (RG = COLORREF clrLine B (0, 255, 0)) void SetLineWidth (int nWidth = 1)
Date
: 2026-01-07
Size
: 49kb
User
:
yu
[
Graph Drawing
]
20080614171421929
DL : 0
cadence skill bindkey -*problem error value dis* *when difference rules * *because of default value* * auto load please rename* * libIinit.il and put int*
Date
: 2026-01-07
Size
: 3kb
User
:
paul
[
Graph Drawing
]
realtime
DL : 0
实时曲线绘制程序实例,多用于工业监控。// 接口说明: // 设置网格间距 void SetGridResolutionX(int nGridReluX) // 设置网格间距 void SetGridResolutionY(int nGridReluY) // 设置网格滚动速度,正值为从左向右滚动,0不动 void SetGridScrollSpeedX(int nSpeedX) // 正值为从上到下滚动,0不动 void SetGridScrollSpeedY(int nSpeedY) // 网格线宽度 void SetGridLineWidth(int nWidth) // 背景色 void SetGridBackClr(COLORREF clr) // // 锁定数据显示范围 void LockRang(bool bfLock = true) // 锁定数据显示范围 void LockRang(float fMin, float fMax) // 设置数据 void SetData(float fData) // 曲线颜色 void SetLineColor(COLORREF clrLine = RGB ( 0 , 255 , 0 )) void SetLineWidth(int nWidth = 1) -Real-time Curve drawing program instance, used for industrial monitoring.// Interface Description:// set the grid spacing void SetGridResolutionX (int nGridReluX) // set the grid spacing void SetGridResolutionY (int nGridReluY) // set the scroll speed of the grid coincided with the scroll from left to right, 0 did not Dynamic void SetGridScrollSpeedX (int nSpeedX) // positive for the top-down scrolling, 0 Fixed void SetGridScrollSpeedY (int nSpeedY) // grid width void SetGridLineWidth (int nWidth) // background color void SetGridBackClr (COLORREF clr) //// lock data show that the scope of void LockRang (bool bfLock = true) // lock data show that the scope of void LockRang (float fMin, float fMax) // Set the data void SetData (float fData) // curve Color void SetLineColor (COLORREF clrLine = RGB (0, 255, 0)) void SetLineWidth (int nWidth = 1)
Date
: 2026-01-07
Size
: 62kb
User
:
王磊
[
Graph Drawing
]
windmill
DL : 0
自己编写的风车, 使用的是Win32的平台, 当然,在该程序之中, 我们还可以绘制五角星, 旋转的风车, 移动旋转的五角星和五边形-windmill that I program int win32 plateform.
Date
: 2026-01-07
Size
: 20kb
User
:
rainy_blue_sky
[
Graph Drawing
]
src_01
DL : 0
1 添加数据类 CShapeBase 2 添加绘制图形的命令 3 添加线色/填充色的命令 4 鼠标支持 5 多个图的支持 6 选择 7 橡皮条绘图 int nOld = dc.SetROP2( R2_NOTXORPEN ) pShape->Draw( &dc ) //擦除 pShape->m_PtEnd = point pShape->Draw( &dc ) //绘制 dc.SetROP2( nOld ) -4 mouse support add graphics rendering commands 1 add data classes CShapeBase 2 of 3 Add line color/fill color command the support of more than 5 Figure 6 select 7 rubber band drawing int nOld = dc.SetROP2 (R2_NOTXORPEN) pShape-> Draw ( & dc) //to erase pShape-> m_PtEnd = point pShape-> Draw (& dc) //the draw dc.SetROP2 (nOld)
Date
: 2026-01-07
Size
: 37kb
User
:
章灿
[
Graph Drawing
]
Nieuw-Rich-Text-document
DL : 0
#include<graphics.h> #include<conio.h> main() { int gd = DETECT,gm,left=100,top=100,right=200,bottom=200,x= 300,y=150,radius=50 initgraph(&gd, &gm, C:\\TC\\BGI ) rectangle(left, top, right, bottom) circle(x, y, radius) bar(left + 300, top, right + 300, bottom) line(left - 10, top + 150, left + 410, top + 150) ellipse(x, y + 200, 0, 360, 100, 50) outtextxy(left + 100, top + 325, My First C Graphics Program ) getch() closegraph() return 0 }-#include<graphics.h> #include<conio.h> main() { int gd = DETECT,gm,left=100,top=100,right=200,bottom=200,x= 300,y=150,radius=50 initgraph(&gd, &gm, C:\\TC\\BGI ) rectangle(left, top, right, bottom) circle(x, y, radius) bar(left + 300, top, right + 300, bottom) line(left - 10, top + 150, left + 410, top + 150) ellipse(x, y + 200, 0, 360, 100, 50) outtextxy(left + 100, top + 325, My First C Graphics Program ) getch() closegraph() return 0 }
Date
: 2026-01-07
Size
: 1kb
User
:
leroy
[
Graph Drawing
]
Declarations-of-ellipse-function_37
DL : 0
Declarations of ellipse function :- void ellipse(int x, int y, int stangle, int endangle, int xradius, int yradius) Ellipse is used to draw an ellipse (x,y) are coordinates of center of the ellipse, stangle is the starting angle, end angle is the ending angle, and fifth and sixth parameters specifies the X and Y radius of the ellipse. To draw a complete ellipse strangles and end angle should be 0 and 360 respectively.
Date
: 2026-01-07
Size
: 9kb
User
:
mojojojo
[
Graph Drawing
]
exp6
DL : 0
void Parabola(POINT *p,int n),this is the function -void Parabola(POINT*p,int n),this is the function
Date
: 2026-01-07
Size
: 84kb
User
:
attitrue
CodeBus
is one of the largest source code repositories on the Internet!
Contact us :
1999-2046
CodeBus
All Rights Reserved.