protected AojPrintPaper(AojPrintPaper obj) { _objectArray = new ArrayList(); this._id = obj.Id; this._width = obj.Width; this._height = obj.Height; this._paperSizeName = obj.PaperSizeName; this._orientation = obj.Orientation; this._margin = obj.Margin; this._pageScale = obj.PageScale; foreach (object o in obj.ObjectArray) { this._objectArray.Add(((ICloneable)o).Clone()); } }
/// <summary> /// 创建空白图像用于纸张打印 /// /// 读取Paper基本属性,用于进行打印 /// </summary> /// <param name="aojXmlReader">XML文件读取器</param> /// <returns></returns> public Graphics CreateGraphics(AojPrintPaper paper) { //创建一块空白的图像区域 paper.Image = new Bitmap(paper.Width, paper.Height, System.Drawing.Imaging.PixelFormat.Format32bppRgb); //图像对象的创建 Graphics g = Graphics.FromImage(paper.Image); g.PageUnit = GraphicsUnit.Pixel; g.PageScale = AojUnitConvert.SafeToSingle(this._pageScale); g.SmoothingMode = SmoothingMode.HighQuality; g.FillRectangle(AojGrapicsHelper.GetBrush("#FFFFFF"), 0f, 0f, paper.Width, paper.Height); return g; }
public object Clone() { AojPrintPaper printpaper = new AojPrintPaper(this); return printpaper; }