BN089-BS开发框架MVC4版/source20131023/Zephyr.Net/Zephyr.Utils/Document/PDF/Gios/PdfObjects/PdfTextBlock.cs

(开头部分) 2KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections;
using System.Drawing;

namespace Smart.Pdf
{
	/*
	public class PdfTextBlock : PdfObject
	{
		public PdfTextBlock(double startx,double starty)
		{this.textes=new ArrayList();}
		public ArrayList textes;
		public void Write(Font Font,Color Color, string Text)
		{
			PdfArea pa=new PdfArea();

			if (this.textes.Count==0)
			{
				pa.posx=0;
				pa.posy=0;
			}				
			else
			{
				pa.posx=((PdfText)textes[textes.Count-1]).area.TopRightVertex.X;
				pa.posy=((PdfText)textes[textes.Count-1]).area.TopRightVertex.Y;
			}

			pa.width=Utility.NeededArea(Font,Text).width;
			pa.height=Utility.NeededArea(Font,Text).height;

			this.textes.Add(new PdfText(Font,Color,Text,pa));
		}
		internal string ToLineStream()
		{
			string text="";
			text+="BT\n";
			foreach (PdfText pt in this.textes)
			{
				text+=Utility.FontToFontLine(pt.Font);
				text+=Utility.ColorrgLine(pt.Color);
				text+="1 0 0 1 "+pt.area.posx.ToString("0.##").Replace(",",".");
				text+=" "+(Settings.PH-(pt.Font.Height*0.465)).ToString("0.##").Replace(",",".");
				text+=" Tm ("+Utility.TextEncode(pt.Text)+") Tj\n";
			}
			text+="ET\n";
			return text;
		}
		
		
		internal override int StreamWrite(System.IO.Stream stream)
		{
			int num=this.id;
			string text=this.ToLineStream();
			Byte[] part2;
			if (Settings.FlateCompression) part2=Utility.Deflate(text); else
				part2=System.Text.ASCIIEncoding.ASCII.GetBytes(text);

			string s1="";
			s1+=num.ToString()+" 0 obj\n";
			s1+="<< /Lenght "+part2.Length;
后面还有 34 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。