internal static void smethod_0( IInteractorWinFormsDrawable drawable, DxfEntity entity, PaintEventArgs e, GraphicsHelper graphicsHelper, InteractionContext context) { DxfLine dxfLine = (DxfLine)entity; Matrix4D projectionTransform = context.ProjectionTransform; PointF pointF1 = projectionTransform.TransformToPointF(dxfLine.point3D_0); PointF pointF2 = projectionTransform.TransformToPointF(dxfLine.End); if ((double)pointF1.Y == (double)pointF2.Y) { return; } PointF pointF3 = projectionTransform.TransformToPointF(WW.Math.Point3D.GetMidPoint(dxfLine.point3D_0, dxfLine.point3D_1)); double num = System.Math.Atan2((double)pointF2.Y - (double)pointF1.Y, (double)pointF2.X - (double)pointF1.X); if (context.ProjectionFlipsOrientation) { num = -num; } e.Graphics.DrawString((num * (180.0 / System.Math.PI)).ToString(context.AngleFormatString) + "°", graphicsHelper.DefaultFont, graphicsHelper.DefaultBrush, pointF3); }
public bool InPaperSpace(DxfEntity parentEntityContext) { if (parentEntityContext != null && parentEntityContext.PaperSpace) { return(true); } return(this.bool_1); }
public Class1021( DxfEntity insert, DrawContext.Surface drawContext, ISurfaceGraphicsFactory graphicsFactory) { this.dxfEntity_0 = insert; this.surface_0 = drawContext; this.isurfaceGraphicsFactory_0 = graphicsFactory; }
public Class1020( DxfEntity insert, DrawContext.Wireframe drawContext, IWireframeGraphicsFactory2 graphicsFactory) { this.dxfEntity_0 = insert; this.wireframe_0 = drawContext; this.iwireframeGraphicsFactory2_0 = graphicsFactory; }
public Class1022( DxfEntity insert, DrawContext.Surface drawContext, Graphics graphics, IGraphicElementBlock parentGraphicElementBlock, GraphicElementInsert graphicElementInsert) { this.method_0(insert, drawContext, graphics, parentGraphicElementBlock, graphicElementInsert); graphicElementInsert.InsertCells = new GraphicElementInsert.InsertCell[1, 1]; }
public DefaultCreateInteractor( DxfEntity entity, ITransaction transaction, IControlPointCollection controlPoints) : base(entity) { this.itransaction_0 = transaction; this.itransaction_0.Completed += new EventHandler(this.itransaction_0_Completed); this.icontrolPointCollection_0 = controlPoints; }
internal void method_12(DxfEntity from) { this.Layer = from.Layer; this.entityColor_0 = from.entityColor_0; this.transparency_0 = from.transparency_0; this.DxfColor = from.DxfColor; this.LineType = from.LineType; this.double_0 = from.double_0; this.short_0 = from.short_0; this.bool_0 = from.bool_0; this.bool_1 = from.bool_1; }
private void method_0( DxfEntity insert, DrawContext.Surface drawContext, Graphics graphics, IGraphicElementBlock parentGraphicElementBlock, GraphicElementInsert graphicElementInsert) { this.dxfEntity_0 = insert; this.surface_0 = drawContext; this.graphics_0 = graphics; this.igraphicElementBlock_0 = parentGraphicElementBlock; this.graphicElementInsert_0 = graphicElementInsert; }
public override void CopyFrom(DxfHandledObject from, CloneContext cloneContext) { base.CopyFrom(from, cloneContext); DxfEntity dxfEntity = (DxfEntity)from; this.Layer = Class906.GetLayer(cloneContext, dxfEntity.Layer); this.entityColor_0 = dxfEntity.entityColor_0; this.transparency_0 = dxfEntity.transparency_0; this.DxfColor = Class906.smethod_10(cloneContext, dxfEntity.DxfColor); this.LineType = Class906.GetLineType(cloneContext, dxfEntity.LineType); this.double_0 = dxfEntity.double_0; this.short_0 = dxfEntity.short_0; this.bool_0 = dxfEntity.bool_0; this.bool_1 = dxfEntity.bool_1; }
void ILeader.imethod_0( DrawContext context, IList <WW.Math.Point3D> points, IList <WW.Math.Point3D> polyline) { DxfEntity entity = this.dxfObjectReference_6.Value as DxfEntity; if (entity == null) { return; } WW.Math.Point3D point = points[points.Count - 1]; Vector3D zaxis = this.HorizontalDirection; zaxis.Normalize(); if (this.hookLineDirection_0 == HookLineDirection.Same) { zaxis = -zaxis; } BoundsCalculator boundsCalculator = new BoundsCalculator(context.Config); Matrix4D transpose = DxfUtil.GetToWCSTransform(zaxis).GetTranspose(); Matrix4D matrix4D = Transformation4D.Translation(-(Vector3D)point); boundsCalculator.GetBounds(context.Model, entity, transpose * matrix4D); Bounds3D bounds = boundsCalculator.Bounds; if (!bounds.Initialized) { return; } double z1 = bounds.Min.Z; double z2 = bounds.Max.Z; double num1 = 0.5 * (z1 + z2); bool flag = this.dxfDimensionStyleOverrides_0.TextVerticalAlignment != DimensionTextVerticalAlignment.Above && this.dxfDimensionStyleOverrides_0.TextVerticalPosition >= -0.7 && this.dxfDimensionStyleOverrides_0.TextVerticalPosition <= 0.7; double num2 = this.dxfDimensionStyleOverrides_0.ScaleFactor; if (num2 == 0.0) { num2 = 1.0; } double num3 = this.dxfDimensionStyleOverrides_0.DimensionLineGap * num2; double num4 = !flag ? (num1 < 0.0 ? z1 : z2) : System.Math.Max(z1 - num3, 0.0); polyline.Add(point + zaxis * num4); }
internal override void vmethod_1(Class1070 context) { base.vmethod_1(context); if (this.OwnerObjectSoftReference == null) { return; } DxfEntity objectSoftReference = (DxfEntity)this.OwnerObjectSoftReference; if (this.Color != objectSoftReference.Color) { this.Color = objectSoftReference.Color; } if (this.DxfColor != objectSoftReference.DxfColor) { this.DxfColor = objectSoftReference.DxfColor; } if (this.Layer == objectSoftReference.Layer) { return; } this.Layer = objectSoftReference.Layer; }
public DefaultEditInteractor(DxfEntity entity) : base(entity) { }
protected virtual void VisitInsertingEntity(DxfEntity entity, DxfBlock insertedBlock) { this.VisitEntity(entity); }
public DefaultCreateInteractor(DxfEntity entity, ITransaction transaction) : this(entity, transaction, entity.InteractionControlPoints) { }
public CreateInteractor(DxfEntity entity) : base(entity) { }
public void imethod_3(DxfEntity entity) { entity.Draw(this.surface_2, this.graphics_0, (IGraphicElementBlock)this.graphicElementInsert_0.UnclippedBlock); }
public Class10(DxfEntity entity) : base(entity) { }
protected Interactor(DxfEntity entity) { this.dxfEntity_0 = entity; }
public EntityEventArgs(DxfEntity entity) { this.dxfEntity_0 = entity; }
public void imethod_3(DxfEntity entity) { entity.Draw(this.surface_2, this.isurfaceGraphicsFactory_0); }
protected abstract void VisitEntity(DxfEntity entity);
public Remove(DxfEntityCollection entities, int index) { this.dxfEntityCollection_0 = entities; this.int_0 = index; this.dxfEntity_0 = entities[index]; }
public DxfEntity(DxfEntity templateEntity) { this.method_12(templateEntity); }
public CreateWithLengthInteractor(DxfEntity entity, ITransaction transaction) : base(entity, transaction) { }
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 imethod_3(DxfEntity entity) { entity.Draw(this.wireframe_2, this.iwireframeGraphicsFactory2_0); }
public EditInteractor(DxfEntity entity) : base(entity) { }
private ArgbColor method_13(DrawContext context, DxfLayer layer) { int index = this.list_0[0].Elements.Count - 1; DxfMLineStyle style = this.Style; return(index < 0 || index >= style.Elements.Count ? context.GetPlotColor((DxfEntity)this) : DxfEntity.GetColor(context.Config.IndexedColors, style.Elements[index].Color, context.ByBlockColor, context.ByBlockDxfColor, layer)); }
public Class13(DxfEntity entity, ITransaction transaction) : base(entity, transaction, (IControlPointCollection) new DxfCircle.Class13.Class537((DxfCircle)entity)) { }
public Add(DxfEntityCollection entities, DxfEntity entity) { this.dxfEntityCollection_0 = entities; this.dxfEntity_0 = entity; }