Exemplo n.º 1
0
        public IPlotStyle GetPlotStyle(
            IPlotPropertyOwner plotPropertyOwner,
            DrawContext drawContext)
        {
            EntityColor entityColor = plotPropertyOwner.GetEntityColor(drawContext);

            if (entityColor.ColorType == ColorType.ByColorIndex && entityColor.ToArgbColor() == this.argbColor_0)
            {
                return((IPlotStyle) new OverrideColorPlotStyle(this.argbColor_1, plotPropertyOwner, drawContext));
            }
            return((IPlotStyle) new DefaultPlotStyle(plotPropertyOwner, drawContext));
        }
Exemplo n.º 2
0
 public override void imethod_10(
     EntityColor color,
     Transparency transparency,
     bool isColorBookColor)
 {
     if (color == EntityColor.ByBlock && !isColorBookColor)
     {
         this.imethod_32((short)0);
     }
     else
     {
         ushort num = 0;
         bool   flag;
         if (flag = transparency.TransparencyType != TransparencyType.ByLayer)
         {
             num |= (ushort)8192;
         }
         if (isColorBookColor)
         {
             this.imethod_32((short)(ushort)((uint)num | 49152U));
         }
         else if (color == EntityColor.ByLayer)
         {
             this.imethod_32((short)(ushort)((uint)num | 256U));
         }
         else if (color.ColorType == ColorType.ByColorIndex)
         {
             this.imethod_32((short)(ushort)((uint)num | (uint)(ushort)color.ColorIndex));
         }
         else
         {
             int colorDifference;
             int colorIndex = (int)DxfIndexedColorSet.GetColorIndex(color.ToArgbColor(), out colorDifference);
             this.imethod_32((short)(ushort)((uint)num | (uint)(ushort)(32768 | colorIndex)));
             this.imethod_33((int)color.Data);
         }
         if (!flag)
         {
             return;
         }
         this.imethod_33((int)transparency.Data);
     }
 }