C#(.net)水印图片的生成 - .net语言 -

C#(.net)水印图片的生成

时间:2010-01-27 14:36:01   来源:   评论:加载中...   点击:加载中...
/** * 使用说明:*  建议先定义一个WaterImage实例*  然后利用实例的属性,去匹配需要进行操作的参数*  然后定义一个WaterImageMan...

                case ImagePosition.Center:
                    xPosOfWm = (phWidth - wmWidth) / 2;
                    yPosOfWm = (phHeight - wmHeight) / 2;
                    break;
                case ImagePosition.LeftBottom:
                    xPosOfWm = 10;
                    yPosOfWm = phHeight - wmHeight - 10;
                    break;
                case ImagePosition.LeftTop:
                    xPosOfWm = 10;
                    yPosOfWm = 10;
                    break;
                case ImagePosition.RightTop:
                    xPosOfWm = phWidth - wmWidth - 10;
                    yPosOfWm = 10;
                    break;
                case ImagePosition.RigthBottom:
                    xPosOfWm = phWidth - wmWidth - 10;
                    yPosOfWm = phHeight - wmHeight - 10;
                    break;
                case ImagePosition.TopMiddle:
                    xPosOfWm = (phWidth - wmWidth) / 2;
                    yPosOfWm = 10;
                    break;
                default:
                    xPosOfWm = 10;
                    yPosOfWm = phHeight - wmHeight - 10;
                    break;
            }

            //



相关热词搜索:

 
上一篇:枚举 ENUM
下一篇:.net 中常用的26个优化
收藏 将此文推荐给朋友
分享到: