Applications = Code + Markup读书笔记(2)-程序员宅基地

1.由RGB三原色组成的颜色空间也叫sRGB颜色空间,sRGB空间将显示点阵图像的做法正式化
The RGB color space implied by byte values of red, green, and blue primaries is sometimes

known as the sRGB color space, where s stands for standard. The sRGB space formalizes

common practices in displaying bitmapped images from scanners and digital cameras on

computer monitors. When used to display colors on the video display, the values of the sRGB

primaries are generally directly proportional to the voltages of the electrical signals

sent from the video display board to the monitor.

2.引入了scRGB的概念,也被称为sRGB64
关于scRGB的Wikipedia: http://en.wikipedia.org/wiki/ScRGB

3.sRGB三原色存储类型为byte,scRGB三原色存储类型为float,由于scRGB可以大于1或小于0,所以scRGB颜

色空间更大

4.Brush体系结构
Object
└─DispatcherObject (abstract)
   └─DependencyObject
      └─Freezable (abstract)
         └─Animatable (abstract)
            └─Brush (abstract)
               ├─GradientBrush (abstract)
               │ ├─LinearGradientBrush
               │ └─RadialGradientBrush
               │
               ├─SolidColorBrush
               │
               └─TileBrush (abstract)
                  ├─DrawingBrush
                  ├─ImageBrush
                  └─VisualBrush

5.关于Brush的动态事件机制,如上结构图,Brush继承自Freezable,而Freezable实现了changed事件,所以

只要Brush改变,都会通知事件的订阅者,该示例中就是通知Window来重绘窗体了,这一点需要和Winform进

行区分,Winform中除非人为处理,否则更改颜色不会触发窗体绘制
Obviously somebody is redrawing the client area every time the brush changes, but it's all

happening behind the scenes. This dynamic response is possible because Brush derives from

the Freezable class, which implements an event named Changed. This event is fired whenever

any changes are made to the Brush object, and this is how the background can be redrawn

whenever a change occurs in the brush.

This Changed event and similar mechanisms are used extensively behind the scenes in the

implementation of animation and other features in the Windows Presentation Foundation.

6.Brushes.PaleGoldenrod和new SolidColorBrush(Colors.PaleGoldenrod)虽然得到的是相同的brush,

但是在使用的时候要考虑到前者不允许被修改,因为前者是一个静态只读属性,还需要注意到Frozen的相关概念
The SolidColorBrush objects returned from the Brushes class are in a frozen state, which

means they can no longer be altered

7.LinearGradientBrush及RadialGradientBrush的一些属性和示例应用

活学活用,切勿读死书 @_@

转载于:https://www.cnblogs.com/DongPad/archive/2009/09/29/1576068.html

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/weixin_30485799/article/details/96700027

智能推荐

JS对table添加删除一行_var row = btn.parentnode.parentnode; r-程序员宅基地

文章浏览阅读1k次。添加一行,并用AJAX提交数据。 function submitForm() { var name = $("#name").val(); var description = $("#description").val(); var url = $("#url").val(); $.ajax({ url: '/admin/ops', type:_var row = btn.parentnode.parentnode; row.parentnode.removechild(row);

HTML学习记录(列表标签&属性)_列表标签的属性-程序员宅基地

文章浏览阅读196次。ol:有序列表标签属性值描述type1,A,a,I,i规定列表顺序类型reversed (HTML5新加)reversed列表倒叙startnumberHTML5不支持,规定列表起始<ol type="A/a/I,i">ul:无序列表标签属性值描述typedisc,square,circle规定列表顺..._列表标签的属性

FFmpeg 编译支持的格式_ffmpeg g722-程序员宅基地

文章浏览阅读332次。[meng@localhost ffmpeg-4.3.2]$ ./configure --helpUsage: configure [options]Options: [defaults in brackets after descriptions]Help options: --help print this message --quiet Suppress showing informative output --_ffmpeg g722

Python GUI 快速入门_pygui-程序员宅基地

文章浏览阅读2.6k次,点赞4次,收藏22次。GUI 就是图形用户界面的意思,在 Python 中使用 PyQt 可以快速搭建自己的应用,使得自己的程序看上去更加高大上,学会 GUI 编程可以使得自己的软件有可视化的结果,更方便地参加 “互联网+”或其他创新创业大赛。目 录1 安装PyQt 与QtDesigner2 添加GUI 到 PyCharm3 界面设计测试小程序1 安装PyQt 与QtDesigner如果你想用 Python 快速制作界面,可以安装 PyQt:pip install pyQt5 -ih..._pygui

以吃货联盟初级改版为例,(面向对象初级程序设计模拟网上点餐控制台程序(第一版未使用工具辅助类)。_吃货(多实例测试)-程序员宅基地

文章浏览阅读999次,点赞2次,收藏6次。面向对象最初级程序设计思维:设计过程与抽象过程,(类是对象的模板与抽象,是具有相同属性和方法的一组对象的集 合,对象是类的实体,由属性与行为共同组成一个具体的实体。) 类与对象的关系:类是对象抽象,对象是类的实例化实体。 使用类图理解类的关系 面向对象三大特性应用:1、封装 ;2、继承;3、多态;是程序设计更符合人思考的方式。 封装:{维护数据安全性将属性私有化(以包机制,与private..._吃货(多实例测试)

Camstar技术介绍-程序员宅基地

文章浏览阅读212次。Camstar_camstar

随便推点

phpword 利用现有模板文档,填充数据和图片后导出保存_有什么系统输入word模板后线上填写后,再导出-程序员宅基地

文章浏览阅读2.1k次。话不多说,直接说步骤:1、利用composer下载 phpword:composer require phpoffice/phpword2、直接使用即可: public function actionTest() { $phpWord = new PhpWord(); $template = $phpWord->loadTemplate('./html/test.docx');//模板文档 $template->_有什么系统输入word模板后线上填写后,再导出

Oracle中通过存储过程,Function,触发器实现解析时间类型的字段并插入的对应的数据表中...-程序员宅基地

文章浏览阅读71次。摘要:之前在项目中解决了插入字符串类型的数据,今天试着写了一个插入date类型的字段,成功了,现在记录一下,以便以后查看:一:首先建立一个根据xml节点名称获取对应的xml值的Function.sql:CREATE OR REPLACE FUNCTION MIP.GetXmlNodeValue (xmlStr CLOB, nodeName VARCHAR2) RETURN VAR..._oracle sql 触发器中对date类型的字段的处理

KCF -目标检测算法总结_kcf 目标检测-程序员宅基地

文章浏览阅读1.1w次,点赞7次,收藏48次。KCF简介KCF是一种鉴别式追踪方法,这类方法一般都是在追踪过程中训练一个目标检测器,使用目标检测器去检测下一帧预测位置是否是目标,然后再使用新检测结果去更新训练集进而更新目标检测器。而在训练目标检测器时一般选取目标区域为正样本,目标的周围区域为负样本,当然越靠近目标的区域为正样本的可能性越大。简单来说 KCF 是 核相关滤波算法,滤波器 和 跟踪patch 进行相乘的到相关性,对应位置较..._kcf 目标检测

汇编语言编一程序段,求双字(DX,AX)的绝对值_汇编语言求双字长数的绝对值-程序员宅基地

文章浏览阅读4.7k次。a100mov ax,ffff;把双字长数的低字放到AX中mov dx,ffff;把双字长数的高字放到DX中test dx,8000;测试双字长数的符号jz 0113;如果是非负数,则直接保存neg dx;如果是负数,则求补neg ax;求补sbb dx,0int 3g=073f:0100 0113运行附图如下:..._汇编语言求双字长数的绝对值

Qt安装MySQL驱动,解决QMYSQL driver not loaded问题_qsmqldriver-程序员宅基地

文章浏览阅读222次。根据项目https://github.com/thecodemonkey86/qt_mysql_driver翻译Get precompiled qsqlmysql.dll from releases获取编译后的qsqlmysql.dll 链接不是很懂这两个有什么区别之后put qsqlmysql.dll (if release build) / qsqlmysqld.dll (if debug build, but note that when using MinGW 8.1.0 the d_qsmqldriver

Java面试题目大汇总(附参考答案)-程序员宅基地

文章浏览阅读1.4w次,点赞61次,收藏333次。足足准备了长达3个月的面试,终于在上周拿到了阿里的offer!博主汇总整理了一份我面试之前看的一些Java面试题目,可以说是非常详细!分享给大家,希望对正在面试Java岗位的朋友有帮助哈~~(文末附参考答案)Java基础相关面试题目:JDK 和 JRE 有什么区别? == 和 equals 的区别是什么? 两个对象的 hashCode()相同,则 equals()也一定为 true,对吗? final 在 java 中有什么作用? java 中的 Math.round(-1.5)

推荐文章

热门文章

相关标签