addTextToImage(str字符, newLrD, float.Parse(frm2.Tag.ToString()));
//固化
fixedAnnonation();
//保存
saveToTiffFile();
GC.Collect();
public void addTextToImage(string addText,LeadRectD lrd, double fontSize)
{
AnnTextObject text = new AnnTextObject();
text.Stroke = null;//没有边框
text.Text = addText;
text.Font = new AnnFont("Arial", fontSize);
text.Fill = null;
text.Rect = lrd;//.ToLeadRectD();
text.TextForeground = AnnSolidColorBrush.Create("Black");
Automation.Container.Children.Add(text);
Automation.Invalidate(LeadRectD.Empty);
Automation.SelectObject(text);
} |