Friday, April 18, 2008

CSS control Fillet

by:稀饭

CSS fillet from a well-known fact there will be jagged and difficult
CSS fillet generally not placed within the complex page elements, or elements of them placed there will be difficult to adjust the size, or the entire fillet will make a serious frame elemental composition of confusion (that is, the entire page does not listen to us, the rupture occurred)
CSS fillet difficult cross-browser, compatibility poor

layers on the assumption that the prospects of a point A, Background layer on a point B, C translucent goals, then we can use the following formula to get objective point of the RGB value of C:

XML/HTML code
R (C)=(R (A)*alpha+R (B)*(256-alpha))/256
G (C)=(G (A)*alpha+R (B)*(256-alpha))/
B 256 (C)=(B (A)*alpha+R (B)*(256-alpha))/256
alpha range [0256]
(R Red, G Green, B Blue)

This is a translucent algorithm (in fact, the difference is a computing), this algorithm is square (box) antialiasing algorithms based (of course, is in itself an antialiasing High topic, there are many algorithms, such as square (box), the triangle (triangle), Gaussian (gauss), Mixier (mitchell), most of which is a dynamic graphical antialiasing, a square in the anti-aliasing filtering algorithm is used within the region equal weight to sampling stack together to achieve, and that is to say from the edge of the closer, the higher the alpha value, the farther away from the edge, the lower the value of alpha, you can at the edge of the distribution of pixel values to achieve alpha The purpose of antialiasing

http://www.spiffycorners.com/
This is the realization of a php version, and use the square antialiasing algorithms.

another on the shoulder
http://spiffybox.com

original link:http://www.conjee.com/blog/article.asp?id=2740

No comments: