Exemple #1
0
 private float method_1(DxfEntity entity, DrawContext drawContext, bool forText, bool fill)
 {
     if (!fill && this.graphicsConfig_0.DisplayLineWeight)
     {
         return((float)this.graphicsConfig_0.DotsPerHundredthMm * (float)drawContext.GetLineWeight(entity));
     }
     if (forText)
     {
         return(this.float_0);
     }
     return(this.float_1);
 }
Exemple #2
0
            private double method_0(DxfEntity entity, DrawContext drawContext, bool forText)
            {
                double num1;

                if (this.graphicsConfig_0.DisplayLineWeight)
                {
                    short num2 = drawContext.GetLineWeight(entity);
                    if (num2 == (short)0)
                    {
                        num2 = this.graphicsConfig_0.DefaultLineWeight;
                    }
                    num1 = this.graphicsConfig_0.DotsPerHundredthMm * (double)num2;
                }
                else
                {
                    num1 = !forText ? this.double_1 : this.double_0;
                }
                return(num1);
            }
Exemple #3
0
        private void method_16(DrawContext context, IPathDrawer pathDrawer)
        {
            Bounds2D         collectBounds = new Bounds2D();
            IList <Class908> class908List  = Class666.smethod_4(this, this.Color.ToColor(), context.GetLineWeight((DxfEntity)this), Matrix4D.Identity, collectBounds);

            if (this.backgroundFillFlags_0 == BackgroundFillFlags.UseBackgroundFillColor && this.backgroundFillInfo_0 != null)
            {
                double num1 = this.double_1 * (this.backgroundFillInfo_0.BorderOffsetFactor - 1.0);
                double num2 = this.double_2 == 0.0 ? collectBounds.Delta.X : this.double_2;
                double y    = collectBounds.Delta.Y;
                double num3;
                double num4;
                switch (this.AttachmentPoint)
                {
                case AttachmentPoint.TopLeft:
                    num3 = collectBounds.Corner1.X + 0.5 * num2;
                    num4 = collectBounds.Corner2.Y - 0.5 * y;
                    break;

                case AttachmentPoint.TopCenter:
                    num3 = collectBounds.Center.X;
                    num4 = collectBounds.Corner2.Y - 0.5 * y;
                    break;

                case AttachmentPoint.TopRight:
                    num3 = collectBounds.Corner2.X - 0.5 * num2;
                    num4 = collectBounds.Corner2.Y - 0.5 * y;
                    break;

                case AttachmentPoint.MiddleLeft:
                    num3 = collectBounds.Corner1.X + 0.5 * num2;
                    num4 = collectBounds.Center.Y;
                    break;

                case AttachmentPoint.MiddleCenter:
                    num3 = collectBounds.Center.X;
                    num4 = collectBounds.Center.Y;
                    break;

                case AttachmentPoint.MiddleRight:
                    num3 = collectBounds.Corner2.X - 0.5 * num2;
                    num4 = collectBounds.Center.Y;
                    break;

                case AttachmentPoint.BottomLeft:
                    num3 = collectBounds.Corner1.X + 0.5 * num2;
                    num4 = collectBounds.Corner1.Y + 0.5 * y;
                    break;

                case AttachmentPoint.BottomCenter:
                    num3 = collectBounds.Center.X;
                    num4 = collectBounds.Corner1.Y + 0.5 * y;
                    break;

                case AttachmentPoint.BottomRight:
                    num3 = collectBounds.Corner2.X - 0.5 * num2;
                    num4 = collectBounds.Corner1.Y + 0.5 * y;
                    break;

                default:
                    num3 = collectBounds.Center.X;
                    num4 = collectBounds.Center.Y;
                    break;
                }
                pathDrawer.DrawPath((IShape2D) new Rectangle2D(num3 - 0.5 * num2 - num1, num4 - 0.5 * y - num1, num3 + 0.5 * num2 + num1, num4 + 0.5 * y + num1), this.Transform, this.backgroundFillInfo_0.Color, context.GetLineWeight((DxfEntity)this), true, false, 0.0);
            }
            foreach (Class908 class908 in (IEnumerable <Class908>)class908List)
            {
                class908.Draw(pathDrawer, Matrix4D.Identity, 0.0);
            }
        }