闁衡偓閹増顥� (0) +1 閻犙嶆嫹 (0) +1 闂婎亷鎷� (0) +1
闁衡偓閹増顥戦柟瀛樺姇婵拷闁哄被鍎冲﹢鍛村绩閹増顥�>>

正在阅读:用.net实现按透明度生成水印文件用.net实现按透明度生成水印文件

2004-09-22 10:16 出处:CSDN 作者:zhgroup 责任编辑:linjixiong


  break;
  case 2: //左下
  x1 = 0;
  if( (sHeight-wHeight) > 0 ) //源图比水印图高
  y1 = sHeight - wHeight;
  else
  y1 = sWidth;
  break;
  case 3: //右上
  y1 = 0;
  if( (sWidth - wWidth) > 0) // 源图比水印图宽
  x1 = sWidth - wWidth;
  else
  x1 = sWidth;
  break;
  case 4: //右下
  //计算高度
  if( (sHeight-wHeight) > 0 ) //源图比水印图高
  y1 = sHeight - wHeight;
  else
  y1 = sWidth;
  //计算宽度
  if( (sWidth - wWidth) > 0) // 源图比水印图宽
  x1 = sWidth - wWidth;
  else
  x1 = sWidth;
  break;
  case 5: //居中
  //计算高度
  if( (sHeight-wHeight) > 0 ) //源图比水印图高
  y1 = (sHeight - wHeight) / 2;
  else
  y1 = sWidth;
  //计算宽度
  if( (sWidth - wWidth) > 0) // 源图比水印图宽
  x1 = (sWidth - wWidth) / 2;
  else
  x1 = sWidth;
  break;
  }
  if( (sHeight-wHeight) > 0)
  h = wHeight;
  else
  h = sHeight;
  if( (sWidth - wWidth) > 0)
  w = wWidth;
  else
  w = sWidth;
  }
  else //源图比水印图小
  {

 

察看评论详细内容 我要发表评论
作者笔名 简短内容 发表时间
:

键盘也能翻页,试试“← →”键

关注我们

最新资讯离线随时看 聊天吐槽赢奖品
闁归潧顑嗗┃鈧悹浣告健濡拷闁搞儳鍋涢崺灞俱亜閸洖鍔�