download: http://www.getpaint.net/
注意:要安裝 .net framework(上面的連結有)
3.0只能用於 Windows XP 及其後的版本。
給進階使用者增加某些特效。
download
http://paintdotnet.12.forumer.com/viewtopic.php?p=5120&highlight=#5120
void Render(Surface dst, Surface src, Rectangle roi)
{
//Environment values for fore/back colors placed into variables
ColorBgra TopColor = (ColorBgra)EnvironmentParameters.ForeColor;
ColorBgra BottomColor = (ColorBgra)EnvironmentParameters.BackColor;
//Alpha information extracted from the fore/back colors
int TopAlpha = TopColor.A;
int BottomAlpha = BottomColor.A;
//The difference between the two alpha values is calculated
int Difference = BottomAlpha - TopAlpha;
//The height of the image is placed into a variable
float maxy = dst.Height - 1;
//Two variables used in the effect's loops are created
ColorBgra PixelColor;
float yratio;
float IntermediateAlpha;
for (int y = roi.Top; y < roi.Bottom; y++)
{
for (int x = roi.Left; x < roi.Right; x++)
{
//The color of the current pixel is taken from the source surface
PixelColor = src[x, y];
//The distance from the top of the image in ratio form is found
yratio = (y / maxy);
//The alpha value of the color is modified to account for the distance from the top
//Previous alpha value is considered.
IntermediateAlpha = (byte)( (yratio * Difference) + TopAlpha );
PixelColor.A = (byte)((PixelColor.A * IntermediateAlpha) / 255);
//The modified color is put onto the destination surface
dst[x, y] = PixelColor;
}
}
}
learn more: Web 2.0 how-to design style guide
http://www.mobile01.com/topicdetail.php?f=164&t=147270
Page Information
|
Wiki Information |
Recent PBwiki Blog Posts |