我正在尝试缩放由我的 AutoCAD 插件生成的表格。但是下面的代码
public void formatCells()
{
Transaction tr = doc.TransactionManager.StartTransaction();
DocumentLock docLock = doc.LockDocument();
using (tr)
using (docLock)
{
if (!IsWriteEnabled || !IsReadEnabled) //Committing transactions closes everything for reading and writing so it must be reopened
{
tr.GetObject(this.ObjectId, OpenMode.ForRead);
tr.GetObject(this.ObjectId, OpenMode.ForWrite);
}
TransformBy(Matrix3d.Scaling(20, Position));
SetTextHeight(20, 7);
SetAlignment(CellAlignment.MiddleCenter, 1); //Sets alignment to middle center
SetRowHeight(3); //Sets height of new row
SetColumnWidth(8); //Sets width of new columns
tr.Commit();
}
}
产生如下图所示的结果。我如何使桌子看起来更好而不是现在的混乱?