private void method_15( DrawContext.Wireframe context, Bitmap bitmap, out DxfRasterImage rasterImage, out Vector4D transformedOrigin, out Vector4D transformedXAxis, out Vector4D transformedYAxis) { GdiBitmap gdiBitmap = new GdiBitmap(bitmap); rasterImage = (DxfRasterImage) new DxfImage(); DxfImageDef imageDef = new DxfImageDef(context.Model); imageDef.SetBitmap((IBitmap)gdiBitmap); rasterImage.SetImageDef(imageDef, true); IClippingTransformer clippingTransformer = (IClippingTransformer)context.GetTransformer().Clone(); Matrix4D preTransform1 = Transformation4D.Translation((WW.Math.Vector3D) this.point3D_3); clippingTransformer.SetPreTransform(preTransform1); Matrix4D preTransform2 = Transformation4D.Scaling((this.point3D_2 - this.point3D_3).GetLength() / (double)bitmap.Width, (this.point3D_0 - this.point3D_3).GetLength() / (double)bitmap.Height, 1.0); clippingTransformer.SetPreTransform(preTransform2); Matrix4D matrix = clippingTransformer.Matrix; WW.Math.Point3D zero = WW.Math.Point3D.Zero; transformedOrigin = matrix.TransformTo4D(zero); transformedXAxis = matrix.TransformTo4D(zero + WW.Math.Vector3D.XAxis); transformedYAxis = matrix.TransformTo4D(zero + WW.Math.Vector3D.YAxis); }
public override void DrawInternal( DrawContext.Wireframe context, IWireframeGraphicsFactory2 graphicsFactory) { IList <Polyline4D> polylines4D; IList <FlatShape4D> shapes; bool fill; this.GetPolylines4D((DrawContext)context, context.GetTransformer(), out polylines4D, out shapes, out fill); ArgbColor plotColor = context.GetPlotColor((DxfEntity)this); if (polylines4D.Count > 0) { Class940.smethod_3((DxfEntity)this, context, graphicsFactory, plotColor, false, fill, !fill, polylines4D); } if (shapes == null) { return; } IPathDrawer pathDrawer = (IPathDrawer) new Class396((DxfEntity)this, context, graphicsFactory); foreach (FlatShape4D flatShape4D in (IEnumerable <FlatShape4D>)shapes) { pathDrawer.DrawPath(flatShape4D.FlatShape, flatShape4D.Transformation, this.Color.ToColor(), (short)0, flatShape4D.IsFilled, false, this.Thickness); } }
public override void DrawInternal( DrawContext.Wireframe context, IWireframeGraphicsFactory graphicsFactory) { IList <Polyline3D> polylines1; IList <FlatShape4D> shapes; this.method_14((DrawContext)context, context.GetTransformer().LineTypeScaler, out polylines1, out shapes); IList <Polyline4D> polylines2 = DxfUtil.smethod_36(polylines1, false, context.GetTransformer()); if (polylines2.Count > 0) { graphicsFactory.CreatePath((DxfEntity)this, context, context.GetPlotColor((DxfEntity)this, this.dxfDimensionStyleOverrides_0.DimensionLineColor), false, polylines2, false, true); } if (shapes != null) { Class940.smethod_23((IPathDrawer) new ns0.Class0((DxfEntity)this, context, graphicsFactory), (IEnumerable <IShape4D>)shapes, this.dxfDimensionStyleOverrides_0.DimensionLineColor, context.GetLineWeight((DxfEntity)this)); } if (!DxfLeader.smethod_7((ILeader)this, (IList <WW.Math.Point3D>) this.list_0)) { return; } if (this.dxfDimensionStyleOverrides_0.LeaderArrowBlock == null) { Polyline3D polyline = this.method_15(); if (polyline == null) { return; } IClippingTransformer clippingTransformer = (IClippingTransformer)context.GetTransformer().Clone(); clippingTransformer.SetPreTransform(this.method_16()); List <Polyline4D> polyline4DList = new List <Polyline4D>((IEnumerable <Polyline4D>)clippingTransformer.Transform(polyline, polyline.Closed)); if (polyline4DList.Count <= 0) { return; } graphicsFactory.CreatePath((DxfEntity)this, context, context.GetPlotColor((DxfEntity)this, this.dxfDimensionStyleOverrides_0.DimensionLineColor), false, (IList <Polyline4D>)polyline4DList, true, true); } else { DxfInsert.Interface46 nterface46 = (DxfInsert.Interface46) new DxfInsert.Class1019((DxfEntity)this, context, graphicsFactory); nterface46.imethod_0(0, 0, this.method_16()); nterface46.Draw(this.dxfDimensionStyleOverrides_0.LeaderArrowBlock, true); } }
public override void DrawInternal( DrawContext.Wireframe context, IWireframeGraphicsFactory graphicsFactory) { foreach (Segment4D segment in (IEnumerable <Segment4D>)context.GetTransformer().Transform(new Segment3D(this.point3D_0, this.point3D_0 + 10000000.0 * this.vector3D_0))) { graphicsFactory.CreateRay((DxfEntity)this, context, context.GetPlotColor((DxfEntity)this), segment); } }
public override void DrawInternal( DrawContext.Wireframe context, IWireframeGraphicsFactory graphicsFactory) { IList <Polyline4D> polylines4D = this.GetPolylines4D(context.GetTransformer()); if (polylines4D.Count <= 0) { return; } graphicsFactory.CreatePath((DxfEntity)this, context, context.GetPlotColor((DxfEntity)this), false, polylines4D, context.Model.Header.FillMode && this.vector3D_0.X == 0.0 && this.vector3D_0.Y == 0.0, true); }
public override void DrawInternal( DrawContext.Wireframe context, IWireframeGraphicsFactory2 graphicsFactory) { IList <Polyline4D> polylines4D = this.GetPolylines4D(context.GetTransformer()); if (polylines4D.Count <= 0) { return; } Class940.smethod_3((DxfEntity)this, context, graphicsFactory, context.GetPlotColor((DxfEntity)this), false, false, true, polylines4D); }
public override void DrawInternal( DrawContext.Wireframe context, IWireframeGraphicsFactory graphicsFactory) { IList <Polyline4D> polylines4D; bool fill; this.GetPolylines4D(context.GetTransformer(), out polylines4D, out fill); if (polylines4D.Count <= 0) { return; } graphicsFactory.CreatePath((DxfEntity)this, context, context.GetPlotColor((DxfEntity)this), false, polylines4D, fill, true); }
public override void DrawInternal( DrawContext.Wireframe context, IWireframeGraphicsFactory2 graphicsFactory) { IList <Polyline4D> polylines4D = this.GetPolylines4D(context.GetTransformer()); if (polylines4D.Count <= 0) { return; } bool fill = context.Model.Header.FillMode && this.vector3D_0.X == 0.0 && this.vector3D_0.Y == 0.0; Class940.smethod_3((DxfEntity)this, context, graphicsFactory, context.GetPlotColor((DxfEntity)this), false, fill, !fill, polylines4D); }
public override void DrawInternal( DrawContext.Wireframe context, IWireframeGraphicsFactory2 graphicsFactory) { IList <Polyline4D> polyline4DList = context.GetTransformer().Transform(this.method_14(), true); if (polyline4DList == null || polyline4DList.Count <= 0) { return; } IList <Polyline4D> polylines4D; IList <IShape4D> shapes; this.GetPolylines4D((DrawContext)context, context.GetTransformer(), out polylines4D, out shapes); Bitmap bitmap = this.Preview(context.Config.OleImageSize, context.Config.OleImageSize); if (bitmap != null) { DxfRasterImage rasterImage; Vector4D transformedOrigin; Vector4D transformedXAxis; Vector4D transformedYAxis; this.method_15(context, bitmap, out rasterImage, out transformedOrigin, out transformedXAxis, out transformedYAxis); graphicsFactory.BeginGeometry((DxfEntity)this, context, context.GetPlotColor((DxfEntity)this), false, false, true, true); graphicsFactory.CreateImage(rasterImage, new WW.Math.Point2D(0.0, 0.0), new WW.Math.Point2D((double)(bitmap.Width - 1), (double)(bitmap.Height - 1)), transformedOrigin, transformedXAxis, transformedYAxis, context); graphicsFactory.EndGeometry(); } if (polylines4D.Count > 0) { Class940.smethod_3((DxfEntity)this, context, graphicsFactory, context.GetPlotColor((DxfEntity)this), false, false, true, polylines4D); } if (shapes == null) { return; } Class940.smethod_23((IPathDrawer) new Class396((DxfEntity)this, context, graphicsFactory), (IEnumerable <IShape4D>)shapes, this.Color.ToColor(), context.GetLineWeight((DxfEntity)this)); }
public override void DrawInternal( DrawContext.Wireframe context, IWireframeGraphicsFactory graphicsFactory) { IClippingTransformer transformer = context.GetTransformer(); Vector3D vector3D = 10000000.0 * this.vector3D_0; WW.Math.Point3D start = this.point3D_0 - vector3D; WW.Math.Point3D end = this.point3D_0 + vector3D; foreach (Segment4D segment in (IEnumerable <Segment4D>)transformer.Transform(new Segment3D(start, end))) { Vector4D?startPoint = transformer.Transform(this.point3D_0); graphicsFactory.CreateXLine((DxfEntity)this, context, context.GetPlotColor((DxfEntity)this), startPoint, segment); } }
public override void DrawInternal( DrawContext.Wireframe context, IWireframeGraphicsFactory graphicsFactory) { IList <Polyline4D> polyline4DList = context.GetTransformer().Transform(this.method_14(), true); if (polyline4DList == null || polyline4DList.Count <= 0) { return; } IList <Polyline4D> polylines4D; IList <IShape4D> shapes; this.GetPolylines4D((DrawContext)context, context.GetTransformer(), out polylines4D, out shapes); IClippingTransformer clippingTransformer = (IClippingTransformer)context.GetTransformer().Clone(); Matrix4D preTransform = Transformation4D.Translation((WW.Math.Vector3D) this.point3D_3); clippingTransformer.SetPreTransform(preTransform); Matrix4D matrix = clippingTransformer.Matrix; WW.Math.Point3D zero = WW.Math.Point3D.Zero; Vector4D transformedOrigin = matrix.TransformTo4D(zero); Vector4D transformedXAxis = matrix.TransformTo4D(zero + WW.Math.Vector3D.XAxis); Vector4D transformedYAxis = matrix.TransformTo4D(zero + WW.Math.Vector3D.YAxis); graphicsFactory.CreateScalableImage((DxfEntity)this, context, (IBitmapProvider)this, polyline4DList[0], new Size2D((this.point3D_2 - this.point3D_3).GetLength(), (this.point3D_0 - this.point3D_3).GetLength()), transformedOrigin, transformedXAxis, transformedYAxis); if (polylines4D.Count > 0) { graphicsFactory.CreatePath((DxfEntity)this, context, context.GetPlotColor((DxfEntity)this), false, polylines4D, false, true); } if (shapes == null) { return; } Class940.smethod_23((IPathDrawer) new ns0.Class0((DxfEntity)this, context, graphicsFactory), (IEnumerable <IShape4D>)shapes, this.Color.ToColor(), context.GetLineWeight((DxfEntity)this)); }
public override void DrawInternal( DrawContext.Wireframe context, IWireframeGraphicsFactory graphicsFactory) { if (!this.PaperSpace || !(context is DrawContext.Wireframe.PaperToPaperSpace) || (!this.method_22((DrawContext)context) || this.UseNonRectangularClipBoundary)) { return; } IList <Polyline4D> polylines = this.method_21((DrawContext)context, context.GetTransformer()); if (polylines.Count <= 0) { return; } graphicsFactory.CreatePath((DxfEntity)this, context, context.GetPlotColor((DxfEntity)this), false, polylines, false, true); }
internal void method_20( DrawContext.Wireframe context, IWireframeGraphicsFactory graphicsFactory) { ArgbColor[] argbColorArray = new ArgbColor[10] { ArgbColors.Red, ArgbColors.Green, ArgbColors.Blue, ArgbColors.Magenta, ArgbColors.Cyan, ArgbColors.Violet, ArgbColors.Orange, ArgbColors.YellowGreen, ArgbColors.Purple, ArgbColors.DarkOrchid }; ArgbColor color = argbColorArray[(int)this.Id % argbColorArray.Length]; IList <Polyline4D> polylines = this.method_21((DrawContext)context, context.GetTransformer()); if (polylines.Count <= 0) { return; } graphicsFactory.CreatePath((DxfEntity)this, context, color, false, polylines, false, true); }
public override void DrawInternal( DrawContext.Wireframe context, IWireframeGraphicsFactory2 graphicsFactory) { PointDisplayMode pointDisplayMode = context.Model.Header.PointDisplayMode; bool flag = this.Layer != null && this.Layer == context.DefPointsLayer; if (pointDisplayMode == PointDisplayMode.None && !flag) { return; } ArgbColor plotColor = context.GetPlotColor((DxfEntity)this); IClippingTransformer transformer = context.GetTransformer(); if (this.double_1 != 0.0) { foreach (Segment4D segment4D in (IEnumerable <Segment4D>)transformer.Transform(new Segment3D(this.point3D_0, this.point3D_0 + this.double_1 * this.vector3D_0))) { graphicsFactory.BeginGeometry((DxfEntity)this, context, plotColor, false, false, true, true); graphicsFactory.CreateLine((DxfEntity)this, segment4D.Start, segment4D.End); graphicsFactory.EndGeometry(); } } else if (pointDisplayMode != PointDisplayMode.Point && context.Model.Header.PointDisplaySize > 0.0 && !flag) { IShape4D shape = transformer.Transform((IShape4D) new FlatShape4D(context.PointShape2D, Transformation4D.Translation(this.point3D_0.X, this.point3D_0.Y, this.point3D_0.Z), false)); if (shape.IsEmpty) { return; } graphicsFactory.BeginGeometry((DxfEntity)this, context, plotColor, false, true, false, true); graphicsFactory.CreateShape((DxfEntity)this, shape); graphicsFactory.EndGeometry(); } else { Vector4D?nullable = transformer.Transform(this.point3D_0); if (!nullable.HasValue) { return; } graphicsFactory.BeginGeometry((DxfEntity)this, context, plotColor, false, true, false, true); graphicsFactory.CreateDot((DxfEntity)this, nullable.Value); graphicsFactory.EndGeometry(); } }
public override void DrawInternal( DrawContext.Wireframe context, IWireframeGraphicsFactory2 graphicsFactory) { IList <Polyline4D> polylines4D; IList <IShape4D> shapes; this.GetPolylines4D((DrawContext)context, context.GetTransformer(), out polylines4D, out shapes); if (polylines4D.Count > 0) { Class940.smethod_3((DxfEntity)this, context, graphicsFactory, context.GetPlotColor((DxfEntity)this), false, false, true, polylines4D); } if (shapes == null) { return; } Class940.smethod_23((IPathDrawer) new Class396((DxfEntity)this, context, graphicsFactory), (IEnumerable <IShape4D>)shapes, this.Color.ToColor(), context.GetLineWeight((DxfEntity)this)); }
protected void DrawInternal( DrawContext.Wireframe context, IWireframeGraphicsFactory graphicsFactory, double startAngle, double endAngle) { IList <Polyline4D> polylines4D; IList <FlatShape4D> shapes; this.GetPolylines4D((DrawContext)context, context.GetTransformer(), startAngle, endAngle, out polylines4D, out shapes); if (polylines4D.Count > 0) { graphicsFactory.CreatePath((DxfEntity)this, context, context.GetPlotColor((DxfEntity)this), false, polylines4D, false, true); } if (shapes == null) { return; } Class940.smethod_23((IPathDrawer) new ns0.Class0((DxfEntity)this, context, graphicsFactory), (IEnumerable <IShape4D>)shapes, this.Color.ToColor(), context.GetLineWeight((DxfEntity)this)); }
public override void DrawInternal( DrawContext.Wireframe context, IWireframeGraphicsFactory2 graphicsFactory) { IClippingTransformer transformer = context.GetTransformer(); IList <WW.Math.Geometry.Polyline3D> polylines1; IList <FlatShape4D> flatShapes; this.method_13((DrawContext)context, transformer, out polylines1, out flatShapes); IList <Polyline4D> polylines2 = DxfUtil.smethod_36(polylines1, false, transformer); if (polylines2.Count > 0) { Class940.smethod_3((DxfEntity)this, context, graphicsFactory, context.GetPlotColor((DxfEntity)this), false, false, true, polylines2); } if (flatShapes == null) { return; } Class940.smethod_23((IPathDrawer) new Class396((DxfEntity)this, context, graphicsFactory), (IEnumerable <IShape4D>)flatShapes, this.Color.ToColor(), context.GetLineWeight((DxfEntity)this)); }
public override void DrawInternal( DrawContext.Wireframe context, IWireframeGraphicsFactory graphicsFactory) { if (this.list_0.Count <= 0) { return; } Polygon2D clipBoundary = this.GetClipBoundary((DrawContext)context); if (clipBoundary == null) { return; } Matrix4D preTransform = this.method_15(); IClippingTransformer clippingTransformer = (IClippingTransformer)context.GetTransformer().Clone(); clippingTransformer.SetPreTransform(preTransform); Matrix4D matrix = clippingTransformer.Matrix; WW.Math.Point3D point = new WW.Math.Point3D(-0.5, -0.5, 0.0); Vector4D transformedOrigin = matrix.TransformTo4D(point); Vector4D transformedXAxis = matrix.TransformTo4D(point + WW.Math.Vector3D.XAxis); Vector4D transformedYAxis = matrix.TransformTo4D(point + WW.Math.Vector3D.YAxis); WW.Math.Geometry.Polyline3D polyline = new WW.Math.Geometry.Polyline3D(true); foreach (WW.Math.Point2D point2D in (List <WW.Math.Point2D>)clipBoundary) { polyline.Add((WW.Math.Point3D)point2D); } IList <Polyline4D> polyline4DList = clippingTransformer.Transform(polyline, true); if (polyline4DList.Count <= 0) { return; } Polyline4D imageBoundary = polyline4DList[0]; graphicsFactory.CreateImage(this, context, this.bool_2 ? imageBoundary : (Polyline4D)null, imageBoundary, transformedOrigin, transformedXAxis, transformedYAxis); }
private IList <Polyline4D> method_16( DrawContext.Wireframe context, out Polyline3DT imageBoundaryPolyline, out IClippingTransformer transformer) { Polygon2D clipBoundary = this.GetClipBoundary((DrawContext)context); if (clipBoundary != null && clipBoundary.Count != 0) { Matrix4D preTransform = this.method_15(); transformer = context.GetTransformer(); transformer = (IClippingTransformer)transformer.Clone(); transformer.SetPreTransform(preTransform); imageBoundaryPolyline = new Polyline3DT(true); foreach (WW.Math.Point2D point2D in (List <WW.Math.Point2D>)clipBoundary) { imageBoundaryPolyline.Add(new Point3DT((WW.Math.Point3D)point2D, 0U)); } return((IList <Polyline4D>) new List <Polyline4D>((IEnumerable <Polyline4D>)transformer.Transform(imageBoundaryPolyline.ToPolyline3D(), true))); } imageBoundaryPolyline = (Polyline3DT)null; transformer = (IClippingTransformer)null; return((IList <Polyline4D>) new Polyline4D[0]); }
public override void DrawInternal( DrawContext.Wireframe context, IWireframeGraphicsFactory graphicsFactory) { Polyline3DT imageBoundaryPolyline; IClippingTransformer transformer; IList <Polyline4D> polylines1 = this.method_16(context, out imageBoundaryPolyline, out transformer); if (polylines1.Count <= 0) { return; } graphicsFactory.CreatePath((DxfEntity)this, context, context.Config.BackColor, false, polylines1, true, false); IList <FlatShape4D> flatShape4DList = (IList <FlatShape4D>)null; if (!context.WipeoutVariables.DisplayFrame) { return; } IList <WW.Math.Geometry.Polyline3D> polyline3DList; if (context.Config.ApplyLineType) { IList <FlatShape4D> resultShapes = (IList <FlatShape4D>) new List <FlatShape4D>(); polyline3DList = (IList <WW.Math.Geometry.Polyline3D>) new List <WW.Math.Geometry.Polyline3D>(); Vector3D upward = Vector3D.CrossProduct(this.XAxis, this.YAxis); if (upward == Vector3D.Zero) { upward = Vector3D.ZAxis; } else { upward.Normalize(); } DxfUtil.smethod_11(context.Config, polyline3DList, resultShapes, imageBoundaryPolyline, this.GetLineType((DrawContext)context), upward, context.TotalLineTypeScale * this.LineTypeScale, context.GetTransformer().LineTypeScaler); if (resultShapes.Count == 0) { flatShape4DList = (IList <FlatShape4D>)null; } } else { polyline3DList = (IList <WW.Math.Geometry.Polyline3D>) new WW.Math.Geometry.Polyline3D[1] { imageBoundaryPolyline.ToPolyline3D() }; flatShape4DList = (IList <FlatShape4D>)null; } IList <Polyline4D> polylines2 = DxfUtil.smethod_36(polyline3DList, false, transformer); graphicsFactory.CreatePath((DxfEntity)this, context, this.GetColor((DrawContext)context), false, polylines2, false, true); }
public override void DrawInternal( DrawContext.Wireframe context, IWireframeGraphicsFactory2 graphicsFactory) { if (this.list_0.Count == 0) { return; } DxfLayer layer = this.GetLayer((DrawContext)context); int minElementCount = this.method_15(); DxfMLineStyle style = this.Style; for (int elementIndex = 0; elementIndex < style.Elements.Count; ++elementIndex) { DxfMLineStyle.Element element = style.Elements[elementIndex]; IList <Polyline4D> polylines4D; IList <IShape4D> shapes; this.GetPolylines4D((DrawContext)context, elementIndex, minElementCount, element, context.GetTransformer(), out polylines4D, out shapes); ArgbColor color = DxfEntity.GetColor(context.Config.IndexedColors, element.Color, context.ByBlockColor, context.ByBlockDxfColor, layer); if (polylines4D.Count > 0) { foreach (Polyline4D polyline4D in (IEnumerable <Polyline4D>)polylines4D) { if (polyline4D.Count <= 2) { polyline4D.Closed = false; } } Class940.smethod_3((DxfEntity)this, context, graphicsFactory, color, false, false, true, polylines4D); } if (shapes != null) { Class940.smethod_23((IPathDrawer) new Class396((DxfEntity)this, context, graphicsFactory), (IEnumerable <IShape4D>)shapes, element.Color, context.GetLineWeight((DxfEntity)this)); } } IList <Polyline4D> polylines1 = this.method_14((DrawContext)context, context.GetTransformer()); if (polylines1.Count > 0) { foreach (Polyline4D polyline4D in (IEnumerable <Polyline4D>)polylines1) { if (polyline4D.Count <= 2) { polyline4D.Closed = false; } } ArgbColor color = this.method_13((DrawContext)context, layer); Class940.smethod_3((DxfEntity)this, context, graphicsFactory, color, false, false, true, polylines1); } if (!style.IsFillOn) { return; } IList <Polyline4D> polylines2 = this.method_16(context.GetTransformer()); if (polylines2 == null || polylines2.Count <= 0) { return; } Class940.smethod_2((DxfEntity)this, context, graphicsFactory, DxfEntity.GetColor(context.Config.IndexedColors, style.FillColor, context.ByBlockColor, context.ByBlockDxfColor, this.GetLayer((DrawContext)context)), false, true, false, polylines2); }
public void CreateMText(DxfMText text, DrawContext.Wireframe drawContext) { if (text.Text == null || text.Text.Trim() == string.Empty) { return; } Bounds2D collectBounds = new Bounds2D(); IList <Class908> chunks = Class666.smethod_4(text, text.Color.ToColor(), drawContext.GetLineWeight((DxfEntity)text), drawContext.GetTransformer().Matrix, collectBounds); BackgroundFillFlags backgroundFillFlags = text.BackgroundFillFlags; BackgroundFillInfo backgroundFillInfo = text.BackgroundFillInfo; if (backgroundFillFlags == BackgroundFillFlags.UseBackgroundFillColor && backgroundFillInfo != null) { System.Drawing.Color color = (System.Drawing.Color)DxfEntity.GetColor(this.graphicsConfig_0.IndexedColors, backgroundFillInfo.Color, drawContext.ByBlockColor, drawContext.ByBlockDxfColor, text.GetLayer((DrawContext)drawContext)); double num1 = text.Height * (backgroundFillInfo.BorderOffsetFactor - 1.0); double x1 = collectBounds.Center.X; double y1 = collectBounds.Center.Y; double width = text.Width; double y2 = collectBounds.Delta.Y; double num2; double num3; switch (text.AttachmentPoint) { case AttachmentPoint.TopLeft: num2 = collectBounds.Corner1.X + 0.5 * width; num3 = collectBounds.Corner2.Y - 0.5 * y2; break; case AttachmentPoint.TopCenter: num2 = collectBounds.Center.X; num3 = collectBounds.Corner2.Y - 0.5 * y2; break; case AttachmentPoint.TopRight: num2 = collectBounds.Corner2.X - 0.5 * width; num3 = collectBounds.Corner2.Y - 0.5 * y2; break; case AttachmentPoint.MiddleLeft: num2 = collectBounds.Corner1.X + 0.5 * width; num3 = collectBounds.Center.Y; break; case AttachmentPoint.MiddleCenter: num2 = collectBounds.Center.X; num3 = collectBounds.Center.Y; break; case AttachmentPoint.MiddleRight: num2 = collectBounds.Corner2.X - 0.5 * width; num3 = collectBounds.Center.Y; break; case AttachmentPoint.BottomLeft: num2 = collectBounds.Corner1.X + 0.5 * width; num3 = collectBounds.Corner1.Y + 0.5 * y2; break; case AttachmentPoint.BottomCenter: num2 = collectBounds.Center.X; num3 = collectBounds.Corner1.Y + 0.5 * y2; break; case AttachmentPoint.BottomRight: num2 = collectBounds.Corner2.X - 0.5 * width; num3 = collectBounds.Corner1.Y + 0.5 * y2; break; default: num2 = collectBounds.Center.X; num3 = collectBounds.Center.Y; break; } short lineWeight = drawContext.GetLineWeight((DxfEntity)text); Matrix4D matrix4D = drawContext.GetTransformer().Matrix *text.Transform; WW.Math.Point2D point = new WW.Math.Point2D(num2 - 0.5 * width - num1, num3 - 0.5 * y2 - num1); double x2 = width + 2.0 * num1; double y3 = y2 + 2.0 * num1; this.method_4(false, (Interface12) new Class341((ArgbColor)color, (Interface23) new Class535(true, new Vector4D[4] { matrix4D.TransformTo4D(point), matrix4D.TransformTo4D(point + new Vector2D(x2, 0.0)), matrix4D.TransformTo4D(point + new Vector2D(x2, y3)), matrix4D.TransformTo4D(point + new Vector2D(0.0, y3)) }), true, lineWeight)); } this.method_3(chunks, (DxfEntity)text, drawContext); }
public override void DrawInternal( DrawContext.Wireframe context, IWireframeGraphicsFactory2 graphicsFactory) { if (this.list_0.Count > 0) { Bounds2D bounds2D = this.method_14((DrawContext)context); Matrix4D preTransform = this.method_15(); IClippingTransformer clippingTransformer = (IClippingTransformer)context.GetTransformer().Clone(); clippingTransformer.SetPreTransform(preTransform); Vector4D?nullable1 = clippingTransformer.Transform(WW.Math.Point3D.Zero); Vector4D?nullable2 = clippingTransformer.Transform(WW.Math.Point3D.Zero + WW.Math.Vector3D.XAxis); Vector4D?nullable3 = clippingTransformer.Transform(WW.Math.Point3D.Zero + WW.Math.Vector3D.YAxis); if (this.ImageDef != null && nullable1.HasValue && (nullable2.HasValue && nullable3.HasValue)) { graphicsFactory.BeginGeometry((DxfEntity)this, context, ArgbColor.Empty, false, false, false, true); graphicsFactory.CreateImage(this, bounds2D.Corner1, bounds2D.Corner2, nullable1.Value, nullable2.Value, nullable3.Value, context); graphicsFactory.EndGeometry(); } } if (this.ImageDef != null && !context.Config.DrawImageFrame) { return; } Polygon2D clipBoundary = this.GetClipBoundary((DrawContext)context); if (clipBoundary == null) { return; } Matrix4D preTransform1 = this.method_15(); IClippingTransformer clippingTransformer1 = (IClippingTransformer)context.GetTransformer().Clone(); clippingTransformer1.SetPreTransform(preTransform1); WW.Math.Geometry.Polyline3D polyline1 = new WW.Math.Geometry.Polyline3D(true); foreach (WW.Math.Point2D point2D in (List <WW.Math.Point2D>)clipBoundary) { polyline1.Add((WW.Math.Point3D)point2D); } List <Polyline4D> polyline4DList = new List <Polyline4D>((IEnumerable <Polyline4D>)clippingTransformer1.Transform(polyline1, true)); if (this.ImageDef == null) { graphicsFactory.BeginGeometry((DxfEntity)this, context, context.Config.BackColor, false, true, false, false); foreach (Polyline4D polyline2 in polyline4DList) { graphicsFactory.CreatePolyline((DxfEntity)this, polyline2); } graphicsFactory.EndGeometry(); } if (this.ImageDef != null && !context.Config.DrawImageFrame) { return; } graphicsFactory.BeginGeometry((DxfEntity)this, context, this.GetColor((DrawContext)context), false, false, true, true); foreach (Polyline4D polyline2 in polyline4DList) { graphicsFactory.CreatePolyline((DxfEntity)this, polyline2); } graphicsFactory.EndGeometry(); }
public override void DrawInternal( DrawContext.Wireframe context, IWireframeGraphicsFactory2 graphicsFactory) { if (!this.PaperSpace || !(context is DrawContext.Wireframe.PaperToPaperSpace) || (!this.method_22((DrawContext)context) || this.UseNonRectangularClipBoundary)) { return; } foreach (Polyline4D polyline in (IEnumerable <Polyline4D>) this.method_21((DrawContext)context, context.GetTransformer())) { Class940.smethod_1((DxfEntity)this, context, graphicsFactory, context.GetPlotColor((DxfEntity)this), false, false, true, polyline); } }
public override void DrawInternal( DrawContext.Wireframe context, IWireframeGraphicsFactory2 graphicsFactory) { if (context.Config.TryDrawingTextAsText && graphicsFactory.SupportsText) { graphicsFactory.BeginGeometry((DxfEntity)this, context, context.GetPlotColor((DxfEntity)this), true, true, false, true); graphicsFactory.CreateMText(this); graphicsFactory.EndGeometry(); } else { this.method_16((DrawContext)context, (IPathDrawer) new Class396((DxfEntity)this, context, graphicsFactory)); if (!context.Config.ShowTextAlignmentPoints) { return; } IList <Polyline4D> polylines = DxfUtil.smethod_36(this.method_18(), false, context.GetTransformer()); if (polylines.Count <= 0) { return; } Class940.smethod_3((DxfEntity)this, context, graphicsFactory, context.GetPlotColor((DxfEntity)this), true, false, true, polylines); } }
public void CreateText(DxfText text, DrawContext.Wireframe drawContext, ArgbColor color) { if (text.Text == null || text.Text.Trim() == string.Empty) { return; } this.method_3(Class666.smethod_5(text, text.Color.ToColor(), drawContext.GetLineWeight((DxfEntity)text), drawContext.GetTransformer().Matrix *text.Transform, (Bounds2D)null), (DxfEntity)text, drawContext); }