﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>IT博客-射手的博客-随笔分类-文件,图形与多媒体</title><link>http://www.cnitblog.com/Archer/category/8230.html</link><description>学习Delphi,需要一个记录学习的博客,</description><language>zh-cn</language><lastBuildDate>Wed, 28 Sep 2011 21:24:09 GMT</lastBuildDate><pubDate>Wed, 28 Sep 2011 21:24:09 GMT</pubDate><ttl>60</ttl><item><title>TGgraphics-&gt;TCanvas-&gt;TPen,TBrush.TFont 简介</title><link>http://www.cnitblog.com/Archer/archive/2009/04/13/56304.html</link><dc:creator>Archer</dc:creator><author>Archer</author><pubDate>Mon, 13 Apr 2009 03:21:00 GMT</pubDate><guid>http://www.cnitblog.com/Archer/archive/2009/04/13/56304.html</guid><wfw:comment>http://www.cnitblog.com/Archer/comments/56304.html</wfw:comment><comments>http://www.cnitblog.com/Archer/archive/2009/04/13/56304.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnitblog.com/Archer/comments/commentRss/56304.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/Archer/services/trackbacks/56304.html</trackback:ping><description><![CDATA[<span  style="color: rgb(0, 0, 102); font-family: verdana; "><div class="posttitle" style="padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 0px; "><br></div><p style="font-size: small; color: rgb(0, 0, 0); padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; word-wrap: break-word; "><span style="color: rgb(51, 102, 255); ">Graphics</span>&nbsp;- (图形)<br>&nbsp; 图像控件及对象的定义都在<span style="color: rgb(51, 102, 255); ">Graphics</span>单元当中.<br>TCanvas对象,它实际上是一个画布,当用<span style="color: rgb(51, 102, 255); background-color: rgb(255, 255, 255); ">TPen&nbsp;</span><span style="color: rgb(255, 102, 0); ">(画笔)&nbsp;</span>对象和&nbsp;<span style="color: rgb(51, 102, 255); background-color: rgb(255, 255, 255); ">TBrush&nbsp;</span><span style="color: rgb(255, 102, 0); ">(画刷)&nbsp;</span>对象设置其属性值后就可以在画布上实现绘图的操作.</p><div style="padding-right: 5px; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left-color: rgb(204, 204, 204); width: 973px; word-break: break-all; padding-top: 4px; background-color: rgb(238, 238, 238); "><img src="http://www.cnitblog.com/Images/OutliningIndicators/None.gif" align="top" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; "><span style="color: rgb(0, 0, 255); ">TGraphics</span>&nbsp;对象&nbsp;<br>TGraphics 对象是&nbsp;<span style="color: rgb(0, 0, 255); ">TBitmap(位图),TIcon(图标),TMetafile(图元)</span>对象的基类可储存任何一个对象.如果知道图像的类型,则将图像储存到相应的对象当中;<br><div style="padding-right: 5px; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left-color: rgb(204, 204, 204); width: 953px; word-break: break-all; padding-top: 4px; background-color: rgb(238, 238, 238); "><img src="http://www.cnitblog.com/Images/OutliningIndicators/None.gif" align="top" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; ">例:<br>Var<br>&nbsp;&nbsp; b:<span style="color: rgb(0, 0, 255); ">T</span><span style="color: rgb(0, 0, 255); ">Graphics</span>;<br>begin<br>&nbsp; b:=TJPEGimage.Crearte;<br>&nbsp; b.LoadFromFile('1.jpg');<br>&nbsp; b.SaveToFile('C:\1.jpg');<br>end;</div></div><br>------------------------------------------------------------------------------------------------------------------------------------------------------<br><span style="color: rgb(51, 102, 255); ">TCanvas</span>&nbsp; 画布<br>&nbsp;&nbsp; &nbsp;TCanvas对象被称为画布,可实现个各种绘图的功能,几乎所有组件的Canvas属性就是TCanvas对象.<br>在组件上绘制图形其实就是在组件的画布上面绘制图形.<br>TCanvas 对象下的绘制工具:&nbsp;&nbsp;<span style="color: rgb(51, 102, 255); ">Brush&nbsp;,Pen,Font&nbsp;</span>属性分别都&nbsp;<span style="color: rgb(51, 102, 255); ">TBrush,TPen,TFont<span style="color: rgb(255, 102, 0); ">(字体)</span></span>对象,用于定义绘制图形时的风格;&nbsp;<br>------------------------------------------------------------------------------------------------------------------------------------------------------<br><div style="padding-right: 5px; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left-color: rgb(204, 204, 204); width: 973px; word-break: break-all; padding-top: 4px; height: 106px; background-color: rgb(238, 238, 238); "><img src="http://www.cnitblog.com/Images/OutliningIndicators/None.gif" align="top" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; ">&nbsp;<span style="color: rgb(0, 0, 255); ">TPen</span>&nbsp; 对象<br>&nbsp;含义: TPen 对象用于指定TCanvas对象在绘制线条和外围边框时所要使用的画笔种类,设置画笔的大小.颜色.样式.通过对Tpen对象相关属性的设置,可以将图一图形以不同的样式进行绘制;<br><br>TPen 主要属性有:&nbsp;<span style="color: rgb(0, 0, 255); ">Color (颜色),Style(风格),Width(宽度),Mode(样式).{属性详细参数在第285页}</span></div><div style="padding-right: 5px; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left-color: rgb(204, 204, 204); width: 973px; word-break: break-all; padding-top: 4px; height: 89px; background-color: rgb(238, 238, 238); "><img src="http://www.cnitblog.com/Images/OutliningIndicators/None.gif" align="top" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; "><span style="color: rgb(0, 0, 255); ">TBrush</span>&nbsp;对象<br>含义:TBrush 对象又称画刷,用指定的<span style="color: rgb(255, 0, 0); ">颜色<span style="color: rgb(0, 0, 0); ">和</span>图案<span style="color: rgb(0, 0, 0); ">对矩形,随圆或则图形进行填充. 设置TBrush对象的属性来制定填充TCanvas对象时使用的颜色和样式或图位;<br><br>TBrush 主要属性有:&nbsp;<span style="color: rgb(0, 0, 255); ">Color (颜色),Style(风格),Bitmap(位图).{属性详细参数在第287页};<br><br>Bitmap&nbsp;<span style="color: rgb(0, 0, 0); ">此属性是用图片来填充指定的图形(画布);<br></span></span></span></span></div><br><div style="padding-right: 5px; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left-color: rgb(204, 204, 204); width: 973px; word-break: break-all; padding-top: 4px; height: 89px; background-color: rgb(238, 238, 238); "><img src="http://www.cnitblog.com/Images/OutliningIndicators/None.gif" align="top" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; "><span style="color: rgb(0, 0, 255); ">TFont</span>&nbsp; 对象<br>含义: TFont<span>&nbsp;&nbsp;</span>对象,又称字体,设置该属性可以改变指定文本的字体外观;<br><br>TFont 主要属性有:&nbsp;<span style="color: rgb(0, 0, 255); ">Name(名称,既字体名称),Size(大小),Style(风格),Color(颜色). Options<span style="color: rgb(0, 0, 255); ">(<font color="#000000" style="color: rgb(0, 0, 255); ">选择项</font>).{属性详细设</span>置参考191页}</span></div><div><font  color="#0000FF" size="3"><span  style="font-size: 13px;"><br></span></font></div></span>
<img src ="http://www.cnitblog.com/Archer/aggbug/56304.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/Archer/" target="_blank">Archer</a> 2009-04-13 11:21 <a href="http://www.cnitblog.com/Archer/archive/2009/04/13/56304.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>