Ejemplo n.º 1
0
        protected override void ReadData(PsdReader reader, object userData)
        {
            var vstkDescriptor = new StructureDescriptor(reader, true);
            var strokeStyleContentDescriptor = (StructureDescriptor)vstkDescriptor.Items["strokeStyleContent"];

            switch (strokeStyleContentDescriptor.ClassId)
            {
            case "solidColorLayer":
            {
                Color = ColorReader.GetSolidColor(strokeStyleContentDescriptor);
                break;
            }

            case "gradientLayer":
            {
                Color = ColorReader.GetLinearGradientColor(strokeStyleContentDescriptor);
                break;
            }

            case "patternLayer":
            {
                var solidColor = new SolidColor();
                solidColor.Color = ColorReader.GetUnknownColor();
                Color            = solidColor;
                break;
            }
            }

            var slwv = (StructureUnitFloat)vstkDescriptor.Items["strokeStyleLineWidth"];

            WidthUnit = slwv.Unit;
            Width     = slwv.Value;
        }
Ejemplo n.º 2
0
        protected override void ReadData(PsdReader reader, object userData)
        {
            var colorDescriptor = new StructureDescriptor(reader, true);
            var typeDesc        = (StructureEnumerate)colorDescriptor.Items["Type"];

            switch (typeDesc.Value)
            {
            // linear
            case "Lnr ":
            {
                Color = ColorReader.GetLinearGradientColor(colorDescriptor);
                break;
            }

            // radial
            case "Rdl ":
            {
                Color = ColorReader.GetRadialGradientColor(colorDescriptor);
                break;
            }

            // angle
            case "Angl":

            //reflected
            case "Rflc":

            // diamand
            case "Dmnd":
            default:
            {
                var solid = new SolidColor();
                Color = solid;

                solid.Color = ColorReader.GetUnknownColor();
                break;
            }
            }
        }
Ejemplo n.º 3
0
        protected override void ReadData(PsdReader reader, object userData)
        {
            var soCoDescriptor = new StructureDescriptor(reader, true);

            Color = ColorReader.GetSolidColor(soCoDescriptor);
        }