CodeBus
www.codebus.net
Search
Sign in
Sign up
Hot Search :
Source
embeded
web
remote control
p2p
game
More...
Location :
Home
Search - access C
Main Category
SourceCode
Documents
Books
WEB Code
Develop Tools
Other resource
Search - access C - List
[
2D Graphic
]
基本画线实现算法
DL : 0
新建一个C++Builder项目 设置Form1的font为“宋体,小五” 在Form1中添加一个TRadioGroup组件rgDrawWhat供选择画什么图形;添加一个Tbutton组件colorBtn和一个TcolorDialog组件ColorDialog1;添加一个TImage组件Image1。 3、 将当前项目保存在自己实验文件夹的exp1子文件夹中(以防错误操作而前功尽弃)。 编写colorBtn的OnClick事件,激活ColorDialog1,并获取所选择的颜色: if (ColorDialog1->Execute()) Image1->Canvas->Pen->Color = ColorDialog1->Color 5、 编写Image1的OnImage1MouseUp事件,要求实现: 1) 若是第奇数次鼠标按钮弹起,则根据rgDrawWhat的选择,记录直线第一个端点或圆心坐标; 2) 若是第偶数次鼠标按钮弹起,则根据rgDrawWhat的选择,记录直线第二个端点并利用TCanvas的MoveTo()和LineTo()方法画出直线段,或计算出圆的外接矩形后调用TCanvas的Ellipse()方法画圆。-C Builder a new project set the font to Form1 "wherein V" in Form1 add a TRadioGroup components rgDrawWhat options for what painting graphics; Add a Tbutton colorBtn components and a TcolorDialog ColorDialog1 components; Add a TImage component Image1. 3, the current project will be kept in their laboratories folders exp1 Documents folder (to prevent erroneous operation and wasted). Preparation colorBtn the OnClick, ColorDialog1 activated, and access to the choice of colors : if (ColorDialog1- gt; Execute ()) Image1- gt; Canvas- gt; Pen-gt; Color = ColorDialog1- gt; Color 5, the preparation of OnImage1MouseUp Image1, call for : a) If the first odd number of pop-up mouse button, then choose rgDrawWhat the record straight section or an endpoint Center coordinates; 2) If the firs
Date
: 2025-12-22
Size
: 570kb
User
:
朱磊
[
2D Graphic
]
PointInpolygon
DL : 0
C++ MO 实现点在面中的判断,获取点的Z值-C++ MO achieve in the face of the judge, access point Z value
Date
: 2025-12-22
Size
: 1.34mb
User
:
Lenber
[
2D Graphic
]
cximage600_full
DL : 0
CxImage类库是一个优秀的图像操作类库。它可以快捷地存取、显示、转换各种图像。有的读者可能说,有那么多优秀的图形库,如OpenIL,FreeImage,PaintLib等等,它们可谓是功能强大,齐全,没必要用其它的类库。但我要说,这些类库基本上没有免费的,使用这些类库,你要被这样那样的许可协议所束缚。在这点上,CxImage类库是完全免费的。另外,在使用上述类库时,你会遇到重重麻烦。因为它们大部分是平台无关的,且用C语言写成,有的还夹杂着基本的C++ wrapper和成堆德编译选项的声明需要你去处理。而CxImage类库在这方面做得很好。还有让我最看好的,就是作者完全公开了源代码。相对于那些封装好的图形库和GDI+来说,这一点使我们可以进一步学习各种编解码技术,而不再浮于各种技术的表面。 -CxImage library is an excellent image manipulation library. It can quickly access, display, convert all images. Some readers may say, there are so many excellent graphics library, such as OpenIL, FreeImage, PaintLib so that they can be said is a powerful, complete, no need to use other libraries. But I have to say, these libraries are basically no free use of these libraries, such as you to be bound by the license agreement. At this point, CxImage library is completely free. In addition, the use of the library, you will encounter a lot of trouble. Because most of them are platform-independent, and written with C language, and some mixed with the basic C++ wrapper, and piles of German compile options you need to deal with the statement. While the CxImage library doing very well in this regard. Let me also the most promising-that full disclosure of the source code. Relative to those packaged and GDI+ graphics library, this point allows us to further study a variety of codec technology, i
Date
: 2025-12-22
Size
: 3.11mb
User
:
CodeBus
is one of the largest source code repositories on the Internet!
Contact us :
1999-2046
CodeBus
All Rights Reserved.