|
如下是整个类的完整代码。
//--------------------------- TextOnSeal class ---------------------------------------
//------------------------------------------------------------------------------------
//---File: TextOnSeal
//---Description: The class file to create seal bitmap with text
//---Author: Knight
//---Date: Nov.3, 2006
//------------------------------------------------------------------------------------
//---------------------------{TextOnSeal class}---------------------------------------
namespace Seal
{
using System;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Diagnostics;
/// <summary>
/// Summary description for TextOnSeal.
/// </summary>
public class TextOnSeal
{
private string _text;
private Font _font;
private Color _pathcolor = Color.Red;
private Color _color = Color.Black;
private Color _fillcolor = Color.Black;
private int _letterspace = 10;
private bool _showpath = true;
private Rectangle _rectcircle;
private Rectangle _rect;
private int _intentlength = 10;
private Char_Direction _chardirect = Char_Direction.Center;
private int _degree = 90;
private string _basestring;
#region Class_Properties
public Char_Direction CharDirection
{
get{ return _chardirect;}
set{
if( _chardirect != value )
{
_chardirect = value;
switch( _chardirect )
{
case Char_Direction.Center:
_degree = 90;
break;
case Char_Direction.ClockWise:
_degree = 0;
break;
case Char_Direction.OutSide:
_degree = -90;
break;
case Char_Direction.AntiClockWise:
_degree = 180;
break;
}
}
}
}
public string BaseString
{
get{ return _basestring;}
set{ _basestring = value; }
}
public string Text
{
get{ return _text;}
set{ _text = value;}
}
public Font TextFont
{
get{ return _font;}
set{ _font = value;}
}
public Color PathColor
{
get{ return _pathcolor;}
set{ _pathcolor = value; }
}
public Color ColorTOP
{
get{ return _color;}
set{ _color = value;}
}
public Color FillColor
{
get{ return _fillcolor;}
set{ _fillcolor = value;}
}
public int LetterSpace
{
get{ return _letterspace;}
set{ _letterspace = value;}
}
public bool ShowPath
{
get{ return _showpath;}
set{ _showpath = value;}
}
public int SealSize
{
set{
_rect = new Rectangle( 0, 0, value, value );
_rectcircle = new Rectangle(
new Point( _rect.X + _intentlength, _rect.Y + _intentlength ),
new Size( _rect.Width - 2 * _intentlength, _rect.Height - 2 * _intentlength ) ) ;
}
}
共8页: 上一页 [1] [2] [3] 4 [5] [6] [7] [8] 下一页
|