<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title>DongPad</title><link>http://www.dongpad.com</link> <description>Every day is a new beginning!</description><copyright>2.0 beta 03</copyright> <language>zh-cn</language><item><title>Applications = Code + Markup读书笔记(2)</title><description><![CDATA[<p>1.由RGB三原色组成的颜色空间也叫sRGB颜色空间,sRGB空间将显示点阵图像的做法正式化   <br />The RGB color space implied by byte values of red, green, and blue primaries is sometimes </p>  <p>known as the sRGB color space, where s stands for standard. The sRGB space formalizes </p>  <p>common practices in displaying bitmapped images from scanners and digital cameras on </p>  <p>computer monitors. When used to display colors on the video display, the values of the sRGB </p>  <p>primaries are generally directly proportional to the voltages of the electrical signals </p>  <p>sent from the video display board to the monitor. </p>  <p>2.引入了scRGB的概念,也被称为sRGB64   <br />关于scRGB的Wikipedia: <a href="http://en.wikipedia.org/wiki/ScRGB">http://en.wikipedia.org/wiki/ScRGB</a></p>  <p>3.sRGB三原色存储类型为byte,scRGB三原色存储类型为float,由于scRGB可以大于1或小于0,所以scRGB颜 </p>  <p>色空间更大 </p>  <p>4.Brush体系结构   <br />Object    <br />└─DispatcherObject (abstract)    <br />&#160;&#160; └─DependencyObject    <br />&#160;&#160;&#160;&#160;&#160; └─Freezable (abstract)    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; └─Animatable (abstract)    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; └─Brush (abstract)    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ├─GradientBrush (abstract)    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; │ ├─LinearGradientBrush    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; │ └─RadialGradientBrush    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; │    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ├─SolidColorBrush    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; │    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; └─TileBrush (abstract)    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ├─DrawingBrush    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ├─ImageBrush    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; └─VisualBrush </p>  <p>5.关于Brush的动态事件机制,如上结构图,Brush继承自Freezable,而Freezable实现了changed事件,所以 </p>  <p>只要Brush改变,都会通知事件的订阅者,该示例中就是通知Window来重绘窗体了,这一点需要和Winform进 </p>  <p>行区分,Winform中除非人为处理,否则更改颜色不会触发窗体绘制   <br />Obviously somebody is redrawing the client area every time the brush changes, but it's all </p>  <p>happening behind the scenes. This dynamic response is possible because Brush derives from </p>  <p>the Freezable class, which implements an event named Changed. This event is fired whenever </p>  <p>any changes are made to the Brush object, and this is how the background can be redrawn </p>  <p>whenever a change occurs in the brush. </p>  <p>This Changed event and similar mechanisms are used extensively behind the scenes in the </p>  <p>implementation of animation and other features in the Windows Presentation Foundation. </p>  <p>6.Brushes.PaleGoldenrod和new SolidColorBrush(Colors.PaleGoldenrod)虽然得到的是相同的brush, </p>  <p>但是在使用的时候要考虑到前者不允许被修改,因为前者是一个静态只读属性，还需要注意到Frozen的相关概念   <br />The SolidColorBrush objects returned from the Brushes class are in a frozen state, which </p>  <p>means they can no longer be altered </p>  <p>7.LinearGradientBrush及RadialGradientBrush的一些属性和示例应用 </p>  <p>活学活用，切勿读死书 @_@</p>]]></description><author>Jack</author><link>http://www.dongpad.com/CSharp-20090929-221.html</link><pubdate>2009-9-29 0:05:02</pubdate></item></channel></rss>
