/**
* 设置水印字体
*
* @param string|integer $font 字体
*/
function setMaskFont($font=2)
{
if(!is_numeric($font) && !file_exists($font))
{
die("字体文件不存在");
}
$this->font = $font;
}
/**
* 设置文字字体大小,仅对truetype字体有效
*/
function setMaskFontSize($size = "12")
{
$this->font_size = $size;
}
/**
* 设置图片水印
*
* @param string $img 水印图片源
*/
function setMaskImg($img)
{
$this->mask_img = $img;
}
/**
* 设置水印横向偏移
*
* @param integer $x 横向偏移量
*/
function setMaskOffsetX($x)
{
$this->mask_offset_x = (int)$x;
}
/**
* 设置水印纵向偏移
*
* @param integer $y 纵向偏移量
*/
function setMaskOffsetY($y)
{
$this->mask_offset_y = (int)$y;
}
/**
* 指定水印位置
*
* @param integer $position 位置,1:左上,2:左下,3:右上,0/4:右下
*/
function setMaskPosition($position=0)
{
$this->mask_position = (int)$position;
}
/**
* 设置图片合并程度
*
* @param integer $n 合并程度
*/
function setMaskImgPct($n)
{
$this->mask_img_pct = (int)$n;
}
/**
* 设置文字合并程度
*
* @param integer $n 合并程度
*/
?>