public static ulong BuildCommonLineByLayer(LJJSPoint ptStart, LJJSPoint ptEnd, double penWidth) { gPoint pStart = FigureStrucConvert.ConvertLJJSPointToGPoint(ptStart); gPoint pEnd = FigureStrucConvert.ConvertLJJSPointToGPoint(ptEnd); return(VectorDrawHelper.CommonLineByLayer(DrawCommonData.activeDocument, pStart, pEnd, penWidth, "", "")); }
public static ulong BuildCommonHorSolidLineByLayer(LJJSPoint pStart, double lineWidth, double penWidth, int horDirection) { gPoint pEnd = new gPoint(pStart.XValue + horDirection * lineWidth, pStart.YValue); gPoint pstart = new gPoint(pStart.XValue, pStart.YValue); return(VectorDrawHelper.CommonLineByLayer(DrawCommonData.activeDocument, pstart, pEnd, penWidth, "", DrawCommonData.SolidLineTypeName)); }
public static ulong AddRectImageHatch(LJJSPoint leftBottomInsertPt, double rectHeigh, double rectWidth, string imagePath, double hatchScale, List <StrValueProperty> additionImageLst) { vdXProperties tmppro = new vdXProperties(); gPoint leftBottomPt = new gPoint(leftBottomInsertPt.XValue, leftBottomInsertPt.YValue); gPoint leftTopPt = new gPoint(leftBottomInsertPt.XValue, leftBottomInsertPt.YValue + DrawCommonData.DirectionUp * rectHeigh); gPoint rightBottomPt = new gPoint(leftBottomInsertPt.XValue + rectWidth * DrawCommonData.DirectionRight, leftBottomInsertPt.YValue); gPoint rightTopPt = new gPoint(leftBottomInsertPt.XValue + rectWidth * DrawCommonData.DirectionRight, leftBottomInsertPt.YValue + DrawCommonData.DirectionUp * rectHeigh); Vertexes hatchRect = new Vertexes(); hatchRect.Add(leftBottomPt); hatchRect.Add(leftTopPt); hatchRect.Add(rightTopPt); hatchRect.Add(rightBottomPt); if (null != additionImageLst && additionImageLst.Count > 0) { for (int i = 0; i < additionImageLst.Count; i++) { StrValueProperty tmp = additionImageLst[i]; if (!string.IsNullOrEmpty(tmp.PropertyName) && !string.IsNullOrEmpty(tmp.PropertyValue)) { vdXProperty tmpproperty = new vdXProperty(); tmpproperty.Name = tmp.PropertyName; tmpproperty.PropValue = tmp.PropertyValue; tmppro.AddItem(tmpproperty); } } } return(VectorDrawHelper.AddHatchImageToFigure(DrawCommonData.activeDocument, hatchRect, "", imagePath, hatchScale, tmppro)); }
public static ulong BuildCommonSoldLine(LJJSPoint ptStart, LJJSPoint ptEnd, int lineColor, double penWidth) { gPoint pStart = FigureStrucConvert.ConvertLJJSPointToGPoint(ptStart); gPoint pEnd = FigureStrucConvert.ConvertLJJSPointToGPoint(ptEnd); return(VectorDrawHelper.CommonLine(DrawCommonData.activeDocument, pStart, pEnd, penWidth, lineColor, DrawCommonData.SolidLineTypeName, "")); }
public static ulong BuildHorToRightSolidLine(LJJSPoint pStart, double lineWidth, double penWidth, int pColor, string pToolTip) { gPoint pEnd = new gPoint(pStart.XValue + lineWidth, pStart.YValue); gPoint pstart = new gPoint(pStart.XValue, pStart.YValue); return(VectorDrawHelper.CommonLine(DrawCommonData.activeDocument, pstart, pEnd, penWidth, pColor, DrawCommonData.SolidLineTypeName, pToolTip)); }
public static ulong InsertBlock(string blockName, double XScale, double YScale, LJJSPoint position) { string blockna = blockName.Trim(); return(VectorDrawHelper.InsertBolck(DrawCommonData.activeDocument, blockna, XScale, YScale, new gPoint(position.XValue, position.YValue))); }
public static void VerSolidArrow(LJJSPoint basePoint, double width, double height, int direction) { Vertexes controlPtCollection = new Vertexes(); gPoint pt2 = new gPoint(basePoint.XValue + width, basePoint.YValue); gPoint pt3 = new gPoint(basePoint.XValue, basePoint.YValue + direction * height); gPoint pt4 = new gPoint(basePoint.XValue - width, basePoint.YValue); controlPtCollection.Add(FigureStrucConvert.ConvertLJJSPointToGPoint(basePoint)); controlPtCollection.Add(pt2); controlPtCollection.Add(pt3); controlPtCollection.Add(pt4); // VectorDrawHelper.BuildSpineWithSolidHatch(DrawCommonData.activeDocument, controlPtCollection, VectorDraw.Professional.Constants.VdConstPlineFlag.PlFlagCLOSE, VectorDraw.Professional.Constants.VdConstSplineFlag.SFlagSTANDARD, Color.Black.ToArgb(), ""); }
private static ulong AddAreaHatch(vdDocument activeDocument, List <LJJSPoint> hatchPtLst, int areaLineColor, int areaHatchColor, VdConstSplineFlag splineFlag) { Vertexes hatcharea = new Vertexes(); if (null != hatchPtLst && hatchPtLst.Count() > 0) { for (int i = 0; i < hatchPtLst.Count(); i++) { gPoint gpt = new gPoint(hatchPtLst[i].XValue, hatchPtLst[i].YValue); hatcharea.Add(gpt); } return(VectorDrawHelper.AddHatchToFigure(activeDocument, hatcharea, areaLineColor, areaHatchColor, splineFlag)); } return(0); }
public static ulong AddBlackRect(LJJSPoint insertPoint, double rectHeight, double rectWidth, double penWidth, DrawDirection drawDirection) { return(VectorDrawHelper.AddRect(DrawCommonData.activeDocument, FigureStrucConvert.ConvertLJJSPointToGPoint(insertPoint), rectHeight, rectWidth, 0, penWidth, drawDirection)); }
public static void Layer_SetToCurrent(string layerName) { VectorDrawHelper.Layer_SetCurrent(DrawCommonData.activeDocument, layerName); }
public static ulong BuildToRightHorLine(LJJSPoint ptStart, double lineLen, double penWidth, int lineColor, string lineTypeName, string pToolTip) { gPoint ptend = new gPoint(ptStart.XValue + lineLen, ptStart.YValue); return(VectorDrawHelper.CommonLine(DrawCommonData.activeDocument, FigureStrucConvert.ConvertLJJSPointToGPoint(ptStart), ptend, penWidth, lineColor, lineTypeName, pToolTip)); }
public static void ClearAll() { VectorDrawHelper.ClearAllEntities(DrawCommonData.activeDocument); }
public static ulong AddHorCommonTextByLayer(string textContent, LJJSPoint insertPt, AttachmentPoint attachmentPoint, double textHeight, string fontFile) { AttachmentPointAdapter attptAdapter = GetAttachmentPointAdapter(attachmentPoint); return(VectorDrawHelper.AddTextByLayer(DrawCommonData.activeDocument, textContent, new gPoint(insertPt.XValue, insertPt.YValue), attptAdapter.verJust, attptAdapter.HorJust, fontFile, textHeight, 1.0, VectorDraw.Render.grTextStyleExtra.TextLineFlags.None, 0, false)); }
public static ulong AddHorCommonText(string textContent, LJJSPoint insertPt, int textColor, AttachmentPoint attachmentPoint, string txtStyle) { AttachmentPointAdapter attptAdapter = GetAttachmentPointAdapter(attachmentPoint); return(VectorDrawHelper.AddText(DrawCommonData.activeDocument, textContent, new gPoint(insertPt.XValue, insertPt.YValue), textColor, attptAdapter.verJust, attptAdapter.HorJust, txtStyle)); }
public static void CreateLayer(string layerName, int layerColor, string lineType) { VectorDrawHelper.CreateLayer(DrawCommonData.activeDocument, layerName, layerColor, lineType); }
public static ulong BuildHorToRightBlackSolidLine(LJJSPoint pStart, double lineWidth, double penWidth, string pToolTip) { gPoint pEnd = new gPoint(pStart.XValue + lineWidth, pStart.YValue); return(VectorDrawHelper.CommonLine(DrawCommonData.activeDocument, FigureStrucConvert.ConvertLJJSPointToGPoint(pStart), pEnd, penWidth, DrawCommonData.BlackColorRGB, DrawCommonData.SolidLineTypeName, pToolTip)); }
/// <summary> /// 添加横排文字,分散式,需要整行文字的所占的宽度; /// </summary> /// <param name="txtcontent"></param> /// <param name="txtheight"></param> /// <param name="postion"></param> /// <param name="txtlayoutstytle"></param> /// <param name="txtstyle"></param> /// <returns></returns> public static ulong AddHengPaiMTextHaveWidth(string txtcontent, double txtheight, LJJSPoint postion, AttachmentPoint txtlayoutstytle, string txtstyle, double horAreaWidth) { string textstring = "\\T2;" + txtcontent; return(VectorDrawHelper.AddMText(DrawCommonData.activeDocument, txtheight, txtstyle, txtcontent, new gPoint(postion.XValue, postion.YValue), VectorDraw.Professional.Constants.VdConstVerJust.VdTextVerBottom, VectorDraw.Professional.Constants.VdConstHorJust.VdTextHorCenter, "")); }
public static ulong AddZongPaiMTextHaveHeigh(string txtcontent, double txtheight, LJJSPoint postion, AttachmentPoint txtlayoutstytle, string txtstyle, double verAreaHeight) { return(VectorDrawHelper.AddZongPaiMText(DrawCommonData.activeDocument, txtheight, txtstyle, txtcontent, new gPoint(postion.XValue, postion.YValue), VectorDraw.Professional.Constants.VdConstVerJust.VdTextVerCen, VectorDraw.Professional.Constants.VdConstHorJust.VdTextHorCenter, "", verAreaHeight)); }
public static ulong BuildCommonPolyLine(List <LJJSPoint> ptcol, double penWidth, Color PenColor) { List <gPoint> ljjsgPtLst = FigureStrucConvert.ConverLJJSPtLstTogPtLst(ptcol); return(VectorDrawHelper.CommonPolyLine(DrawCommonData.activeDocument, ljjsgPtLst, penWidth, PenColor)); }