未分类

AlphaBlendMatrix and how to resize the image by C#

The description about Alpha Blending in MSDN is as follows

Alpha Blending Lines and Fills

In GDI+, a color is a 32-bit value with 8 bits each for alpha, red, green, and blue. The alpha value indicates the transparency of the color — the extent to which the color is blended with the background color. Alpha values range from 0 through 255, where 0 represents a fully transparent color, and 255 represents a fully opaque color. Continue reading

STL 之 set,multiset

set 集合容器实现了 红黑树( red-black tree) 的平衡二叉检索树的数据结构
当元素放入容器中,会按照一定的排序算法自动排序。这种自动排序的特性加速了元素查找的过程,但是也带来了一个问题:不可以直接修改set或multiset容器中的元素值,因为这样做就可能违反了元素自动排序的规则。如果你希望修改一个元素的值,必须先erase删除原有的元素,再插入insert新的元素。
Continue reading