protected void DrawInternal( DrawContext.Surface context, ISurfaceGraphicsFactory graphicsFactory, double startAngle, double endAngle) { graphicsFactory.SetColor(context.GetPlotColor((DxfEntity)this)); IList <WW.Math.Geometry.Polyline3D> polylines; IList <FlatShape4D> shapes; this.GetPolylines((DrawContext)context, context.GetTransformer().LineTypeScaler, startAngle, endAngle, out polylines, out shapes); if (this.Thickness != 0.0) { Class940.Extrude((DxfEntity)this, context, graphicsFactory, polylines, false, this.Thickness * this.ZAxis); } else { Class940.smethod_16((DxfEntity)this, context, graphicsFactory, polylines, false); } if (shapes == null) { return; } Class940.smethod_24((IPathDrawer) new Class473((DxfEntity)this, context, graphicsFactory), (IEnumerable <FlatShape4D>)shapes, this.Color.ToColor(), context.GetLineWeight((DxfEntity)this), this.Thickness); }
public override void DrawInternal( DrawContext.Surface context, ISurfaceGraphicsFactory graphicsFactory) { ushort mApproximationPointCount; ushort nApproximationPointCount; this.method_13(out mApproximationPointCount, out nApproximationPointCount); WW.Math.Point3D[,] point3DArray = this.method_19((int)mApproximationPointCount - 1, (int)nApproximationPointCount - 1); int length1 = point3DArray.GetLength(0); int length2 = point3DArray.GetLength(1); Vector4D[,] polygonMesh = new Vector4D[length1, length2]; Interface41 transformer = context.GetTransformer(); for (int index1 = 0; index1 < length1; ++index1) { for (int index2 = 0; index2 < length2; ++index2) { polygonMesh[index1, index2] = transformer.Transform(point3DArray[index1, index2]); } } graphicsFactory.SetColor(context.GetPlotColor((DxfEntity)this)); graphicsFactory.CreatePolygonMesh(polygonMesh, this.ClosedInMDirection, this.ClosedInNDirection); }
public override void DrawInternal( DrawContext.Surface context, ISurfaceGraphicsFactory 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); graphicsFactory.SetColor(plotColor); Interface41 transformer = context.GetTransformer(); if (this.double_1 != 0.0) { graphicsFactory.CreateSegment(transformer.Transform(this.point3D_0), transformer.Transform(this.point3D_0 + this.double_1 * this.vector3D_0)); } else { graphicsFactory.CreatePoint(transformer.Transform(this.point3D_0)); } }
public void DrawFrame(DrawContext.Surface context, ISurfaceGraphicsFactory graphicsFactory) { foreach (DxfEntity dxfEntity in (DxfHandledObjectCollection <DxfViewport>) this.dxfViewportCollection_0) { dxfEntity.Draw(context, graphicsFactory); } }
public override void DrawInternal( DrawContext.Surface context, ISurfaceGraphicsFactory graphicsFactory) { graphicsFactory.SetColor(context.GetPlotColor((DxfEntity)this)); IList <WW.Math.Geometry.Polyline3D> polylines; IList <FlatShape4D> shapes; this.GetPolylines((DrawContext)context, context.GetTransformer().LineTypeScaler, out polylines, out shapes); if (this.double_1 != 0.0) { Class940.Extrude((DxfEntity)this, context, graphicsFactory, polylines, false, this.double_1 * this.vector3D_0); } else { Class940.smethod_16((DxfEntity)this, context, graphicsFactory, polylines, false); } if (shapes == null) { return; } IPathDrawer pathDrawer = (IPathDrawer) new Class473((DxfEntity)this, context, graphicsFactory); foreach (FlatShape4D flatShape4D in (IEnumerable <FlatShape4D>)shapes) { pathDrawer.DrawPath(flatShape4D.FlatShape, flatShape4D.Transformation, this.Color.ToColor(), context.GetLineWeight((DxfEntity)this), flatShape4D.IsFilled, false, this.double_1); } }
public override void DrawInternal( DrawContext.Surface context, ISurfaceGraphicsFactory graphicsFactory) { graphicsFactory.SetColor(context.GetPlotColor((DxfEntity)this)); IList <WW.Math.Geometry.Polyline3D> polylines; IList <FlatShape4D> shapes; this.GetPolylines((DrawContext)context, context.GetTransformer().LineTypeScaler, out polylines, out shapes); Interface41 transformer = (Interface41)context.GetTransformer().Clone(); transformer.SetPreTransform(this.Transform); IList <Polyline4D> polyline4DList = DxfUtil.smethod_51(polylines, transformer); if (polyline4DList.Count > 0) { foreach (Polyline4D polyline4D in (IEnumerable <Polyline4D>)polyline4DList) { graphicsFactory.CreatePolyline((IList <Vector4D>)polyline4D, polyline4D.Closed); } } if (shapes == null) { return; } Class940.smethod_24((IPathDrawer) new Class473((DxfEntity)this, context, graphicsFactory), (IEnumerable <FlatShape4D>)shapes, this.Color.ToColor(), context.GetLineWeight((DxfEntity)this), 0.0); }
public override void DrawInternal( DrawContext.Surface context, ISurfaceGraphicsFactory graphicsFactory) { DxfTextStyle textStyle = this.TextStyle; if (textStyle == null) { return; } ShxFile shxFile = textStyle.GetShxFile(); if (shxFile == null) { return; } ShxShape shapeByIndex = shxFile.GetShapeByIndex(this.ushort_0); if (shapeByIndex == null) { return; } WW.Math.Point2D endPoint; new Class473((DxfEntity)this, context, graphicsFactory).DrawPath(shapeByIndex.GetGlyphShape(false, out endPoint), this.Transform, this.Color.ToColor(), context.GetLineWeight((DxfEntity)this), false, false, this.double_1); }
public void Draw(DrawContext.Surface context, ISurfaceGraphicsFactory graphicsFactory) { foreach (DxfEntity dxfEntity in this.GetEntitiesInDrawingOrder(context.Config)) { dxfEntity.Draw(context, graphicsFactory); } }
public void Draw(DrawContext.Surface context, ISurfaceGraphicsFactory graphicsFactory) { graphicsFactory.BeginNode(this, context); if (this.IsEntityVisibleInContext((DrawContext)context, this.UseLayerEnabled)) { this.DrawInternal(context, graphicsFactory); } graphicsFactory.EndNode(); }
public override void DrawInternal( DrawContext.Surface context, ISurfaceGraphicsFactory graphicsFactory) { graphicsFactory.SetColor(context.GetPlotColor((DxfEntity)this)); IList <Polyline3D> polylines = this.GetPolylines(); Class940.smethod_16((DxfEntity)this, context, graphicsFactory, polylines, false); }
public Class1021( DxfEntity insert, DrawContext.Surface drawContext, ISurfaceGraphicsFactory graphicsFactory) { this.dxfEntity_0 = insert; this.surface_0 = drawContext; this.isurfaceGraphicsFactory_0 = graphicsFactory; }
public Class473( DxfEntity entity, DrawContext.Surface context, ISurfaceGraphicsFactory graphicsFactory) { this.dxfEntity_0 = entity; this.surface_0 = context; this.isurfaceGraphicsFactory_0 = graphicsFactory; }
public void Draw(ISurfaceGraphicsFactory graphicsFactory) { graphicsFactory.BeginNode(this.dxfEntity_0, this.surface_0); for (LinkedListNode <ISurfaceDrawable> linkedListNode = this.linkedList_0.First; linkedListNode != null; linkedListNode = linkedListNode.Next) { linkedListNode.Value.Draw(graphicsFactory); } graphicsFactory.EndNode(); }
public override void DrawInternal( DrawContext.Surface context, ISurfaceGraphicsFactory graphicsFactory) { if (!this.method_17((DrawContext)context)) { return; } base.DrawInternal(context, graphicsFactory); }
public static void smethod_16( DxfEntity entity, DrawContext.Surface context, ISurfaceGraphicsFactory graphicsFactory, IList <WW.Math.Geometry.Polyline3D> polylines, bool areSurfaces) { foreach (WW.Math.Geometry.Polyline3D polyline in (IEnumerable <WW.Math.Geometry.Polyline3D>)polylines) { Class940.smethod_17(entity, context, graphicsFactory, polyline, areSurfaces); } }
public static void smethod_19( DxfEntity entity, DrawContext.Surface context, ISurfaceGraphicsFactory graphicsFactory, List <WW.Math.Point3D> boundary, List <bool> edgeVisibleList) { Interface41 transformer = context.GetTransformer(); Polyline4D boundary1 = DxfUtil.smethod_46(new WW.Math.Geometry.Polyline3D((IList <WW.Math.Point3D>)boundary), transformer); Class940.smethod_20(entity, context, graphicsFactory, boundary1, edgeVisibleList); }
internal static void Extrude( DxfEntity entity, DrawContext.Surface context, ISurfaceGraphicsFactory graphicsFactory, IList <WW.Math.Geometry.Polyline3D> polylines, bool areSurfaces, Vector3D extrusion) { foreach (WW.Math.Geometry.Polyline3D polyline in (IEnumerable <WW.Math.Geometry.Polyline3D>)polylines) { Class940.Extrude(entity, context, graphicsFactory, polyline, areSurfaces, extrusion); } }
public override void DrawInternal( DrawContext.Surface context, ISurfaceGraphicsFactory graphicsFactory) { graphicsFactory.SetColor(context.GetPlotColor((DxfEntity)this)); List <bool> edgeVisibleList = new List <bool>(this.list_0.Count); for (int index = 0; index < this.list_0.Count; ++index) { edgeVisibleList.Add((this.invisibleEdgeFlags_0 & Dxf3DFace.invisibleEdgeFlags_1[index]) == InvisibleEdgeFlags.None); } Class940.smethod_19((DxfEntity)this, context, graphicsFactory, this.list_0, edgeVisibleList); }
public override void DrawInternal( DrawContext.Surface context, ISurfaceGraphicsFactory graphicsFactory) { IList <IList <Polyline2D2N> > polylines1; IList <IList <Polyline2D2N> > polylines2; IList <FlatShape4D> shapes; bool fill; this.GetPolylines((DrawContext)context, context.GetTransformer().LineTypeScaler, out polylines1, out polylines2, out shapes, out fill); ArgbColor plotColor = context.GetPlotColor((DxfEntity)this); graphicsFactory.SetColor(plotColor); int count = polylines1.Count; for (int index = 0; index < count; ++index) { IList <Polyline2D2N> polyline2D2NList = polylines1[index]; IList <Polyline2D2N> polylinesB = polylines2[index]; bool flag = this.Thickness != 0.0; if (polylinesB == null) { if (flag) { Class940.smethod_5((DxfEntity)this, context, graphicsFactory, polyline2D2NList, fill, this.Transform, this.ZAxis, this.Thickness); } else { IList <Polyline3D> polyline3DList = (IList <Polyline3D>) new List <Polyline3D>(); DxfUtil.smethod_15(polyline2D2NList, (IList <Polyline2D2N>)null, this.Transform, polyline3DList, false); Class940.smethod_15((DxfEntity)this, context, graphicsFactory, polyline3DList); } } else if (flag) { Class940.smethod_7((DxfEntity)this, context, graphicsFactory, polyline2D2NList, polylinesB, fill, this.Transform, this.ZAxis, this.Thickness); } else { Class940.smethod_10((DxfEntity)this, context, graphicsFactory, polyline2D2NList, polylinesB, this.Transform, this.ZAxis, fill); } if (shapes != null) { Class473 class473 = new Class473((DxfEntity)this, context, graphicsFactory); foreach (FlatShape4D flatShape4D in (IEnumerable <FlatShape4D>)shapes) { class473.DrawPath(flatShape4D.FlatShape, flatShape4D.Transformation, this.Color.ToColor(), (short)0, flatShape4D.IsFilled, false, this.Thickness); } } } }
public static void smethod_15( DxfEntity entity, DrawContext.Surface context, ISurfaceGraphicsFactory graphicsFactory, IList <WW.Math.Geometry.Polyline3D> polylines) { Interface41 transformer = context.GetTransformer(); foreach (WW.Math.Geometry.Polyline3D polyline in (IEnumerable <WW.Math.Geometry.Polyline3D>)polylines) { Polyline4D polyline4D = DxfUtil.smethod_46(polyline, transformer); graphicsFactory.CreatePolyline((IList <Vector4D>)polyline4D, polyline.Closed); } }
private static void smethod_9( DxfEntity entity, ISurfaceGraphicsFactory graphicsFactory, WW.Cad.Drawing.Polyline2D2N polyline2D, Interface41 transformer, Polyline4D polyline4DBottom, Polyline4D polyline4DTop) { int count = polyline2D.Count; int startVertexIndex = polyline2D.Closed ? count - 1 : 0; for (int endVertexIndex = polyline2D.Closed ? 0 : 1; endVertexIndex < count; ++endVertexIndex) { Point2D2N point2D2N1 = polyline2D[startVertexIndex]; Point2D2N point2D2N2 = point2D2N1; int num1 = endVertexIndex; while (endVertexIndex < count) { Point2D2N point2D2N3 = polyline2D[endVertexIndex]; if (!(point2D2N1.EndNormal != point2D2N3.StartNormal)) { ++endVertexIndex; point2D2N1 = point2D2N3; } else { break; } } if (endVertexIndex == count) { endVertexIndex = count - 1; } Vector3D[] vector3DArray = new Vector3D[endVertexIndex - num1 + 2]; vector3DArray[0] = transformer.Transform((Vector3D)point2D2N2.StartNormal); vector3DArray[1] = transformer.Transform((Vector3D)point2D2N2.EndNormal); int num2 = num1; int index1 = 2; while (num2 < endVertexIndex) { int index2 = num2 >= count ? 0 : num2; vector3DArray[index1] = transformer.Transform((Vector3D)polyline2D[index2].EndNormal); ++num2; ++index1; } graphicsFactory.CreateQuadStrip((IList <Vector4D>)polyline4DBottom, (IList <Vector4D>)polyline4DTop, (IList <Vector3D>)vector3DArray, startVertexIndex, endVertexIndex); startVertexIndex = endVertexIndex; } }
public override void DrawInternal( DrawContext.Surface context, ISurfaceGraphicsFactory graphicsFactory) { graphicsFactory.SetColor(context.GetPlotColor((DxfEntity)this)); WW.Math.Geometry.Polyline3D polyline = this.method_13(); if (this.Thickness != 0.0) { Class940.Extrude((DxfEntity)this, context, graphicsFactory, polyline, this.Model.Header.FillMode, this.Thickness * this.ZAxis); } else { Class940.smethod_17((DxfEntity)this, context, graphicsFactory, polyline, this.Model.Header.FillMode); } }
public override void DrawInternal( DrawContext.Surface context, ISurfaceGraphicsFactory graphicsFactory) { graphicsFactory.SetColor(context.GetPlotColor((DxfEntity)this)); IList <WW.Math.Geometry.Polyline3D> polylines; IList <FlatShape4D> shapes; this.GetPolylines((DrawContext)context, context.GetTransformer().LineTypeScaler, out polylines, out shapes); Class940.smethod_16((DxfEntity)this, context, graphicsFactory, polylines, false); if (shapes == null) { return; } Class940.smethod_24((IPathDrawer) new Class473((DxfEntity)this, context, graphicsFactory), (IEnumerable <FlatShape4D>)shapes, this.Color.ToColor(), context.GetLineWeight((DxfEntity)this), 0.0); }
internal static void smethod_5( DxfEntity entity, DrawContext.Surface context, ISurfaceGraphicsFactory graphicsFactory, IList <WW.Cad.Drawing.Polyline2D2N> polylines, bool areSurfaces, Matrix4D transform, Vector3D normal, double extrusion) { int count = polylines.Count; for (int index = 0; index < count; ++index) { WW.Cad.Drawing.Polyline2D2N polyline = polylines[index]; Class940.smethod_6(entity, context, graphicsFactory, polyline, areSurfaces, transform, normal, extrusion); } }
public override void DrawInternal( DrawContext.Surface context, ISurfaceGraphicsFactory graphicsFactory) { this.method_16((DrawContext)context, (IPathDrawer) new Class473((DxfEntity)this, context, graphicsFactory)); if (!context.Config.ShowTextAlignmentPoints) { return; } graphicsFactory.SetColor(ArgbColors.White); IList <WW.Math.Geometry.Polyline3D> polylines = this.method_18(); if (polylines.Count <= 0) { return; } Class940.smethod_15((DxfEntity)this, context, graphicsFactory, polylines); }
public static void smethod_17( DxfEntity entity, DrawContext.Surface context, ISurfaceGraphicsFactory graphicsFactory, WW.Math.Geometry.Polyline3D polyline, bool isSurface) { Interface41 transformer = context.GetTransformer(); Polyline4D boundary = DxfUtil.smethod_46(polyline, transformer); if (isSurface) { Class940.smethod_20(entity, context, graphicsFactory, boundary, (List <bool>)null); } else { graphicsFactory.CreatePolyline((IList <Vector4D>)boundary, polyline.Closed); } }
public override void DrawInternal( DrawContext.Surface context, ISurfaceGraphicsFactory graphicsFactory) { DxfImageDef imageDef = this.ImageDef; if (imageDef == null || !imageDef.Bitmap.IsValid) { return; } List <WW.Math.Point2D> clipBoundary = (List <WW.Math.Point2D>) this.GetClipBoundary((DrawContext)context); if (clipBoundary == null || clipBoundary.Count <= 0) { return; } List <Triangulator2D.Triangle> triangleList = new List <Triangulator2D.Triangle>(); List <WW.Math.Point2D> point2DList = new List <WW.Math.Point2D>(); Triangulator2D.Triangulate((IList <IList <WW.Math.Point2D> >) new List <WW.Math.Point2D>[1] { clipBoundary }, (IList <Triangulator2D.Triangle>)triangleList, (IList <WW.Math.Point2D>)point2DList); Interface41 nterface41 = (Interface41)context.GetTransformer().Clone(); Matrix4D preTransform = this.method_15(); nterface41.SetPreTransform(preTransform); WW.Math.Point2D[] point2DArray = new WW.Math.Point2D[point2DList.Count]; Vector4D[] vector4DArray = new Vector4D[point2DList.Count]; Size2D referencedImageSize = this.ReferencedImageSize; double num1 = 1.0 / referencedImageSize.X; double num2 = 1.0 / referencedImageSize.Y; Vector2D vector2D = new Vector2D(0.5, 0.5); for (int index = point2DList.Count - 1; index >= 0; --index) { WW.Math.Point2D point2D = point2DList[index] + vector2D; point2DArray[index] = new WW.Math.Point2D(num1 * point2D.X, 1.0 - num2 * point2D.Y); vector4DArray[index] = nterface41.Transform(new WW.Math.Point3D(point2D.X, point2D.Y, 0.0)); } byte[] rgbaBytes = imageDef.Bitmap.GetRgbaBytes(); graphicsFactory.CreateTexturedTriangles(rgbaBytes, imageDef.Bitmap.Width, imageDef.Bitmap.Height, preTransform.Transform(WW.Math.Vector3D.ZAxis), (IList <Triangulator2D.Triangle>)triangleList, (IList <WW.Math.Point2D>)point2DArray, (IList <Vector4D>)vector4DArray); }
public override void DrawInternal( DrawContext.Surface context, ISurfaceGraphicsFactory graphicsFactory) { if (!this.IsVisible((DrawContext)context)) { return; } DxfMText dxfMtext = this.method_20(context.Config); if (dxfMtext != null) { dxfMtext.DrawInternal(context, graphicsFactory); } else { base.DrawInternal(context, graphicsFactory); } }
internal static void smethod_10( DxfEntity entity, DrawContext.Surface context, ISurfaceGraphicsFactory graphicsFactory, IList <WW.Cad.Drawing.Polyline2D2N> polylinesA, IList <WW.Cad.Drawing.Polyline2D2N> polylinesB, Matrix4D transform, Vector3D normal, bool areSurfaces) { int count = polylinesA.Count; for (int index = 0; index < count; ++index) { WW.Cad.Drawing.Polyline2D2N polylineA = polylinesA[index]; WW.Cad.Drawing.Polyline2D2N polylineB = polylinesB[index]; Class940.smethod_11(entity, context, graphicsFactory, polylineA, polylineB, transform, normal, areSurfaces); } }
public override void DrawInternal( DrawContext.Surface context, ISurfaceGraphicsFactory graphicsFactory) { Vector4D[,] polygonMesh = new Vector4D[(int)this.ushort_0, (int)this.ushort_1]; Interface41 transformer = context.GetTransformer(); int index1 = 0; for (int index2 = 0; index2 < (int)this.ushort_0; ++index2) { int index3 = 0; while (index3 < (int)this.ushort_1) { polygonMesh[index2, index3] = transformer.Transform(this.dxfHandledObjectCollection_1[index1].Position); ++index3; ++index1; } } graphicsFactory.SetColor(context.GetPlotColor((DxfEntity)this)); graphicsFactory.CreatePolygonMesh(polygonMesh, this.ClosedInMDirection, this.ClosedInNDirection); }