Exemplo n.º 1
0
 public EmfPlusTextureBrushOptionalData(MetafileReader reader, BrushDataFlags flags, uint size)
 {
     if ((flags & BrushDataFlags.HasTransform) != 0)
     {
         Transform = new EmfPlusTransformMatrix(reader);
     }
     Image = new EmfPlusImage(reader, size);
 }
        public EmfPlusLinearGradientBrushOptionalData(MetafileReader reader, BrushDataFlags flags)
        {
            if ((flags & BrushDataFlags.HasTransform) != 0)
            {
                Transform = new EmfPlusTransformMatrix(reader);
            }

            // TODO: check ordering and also mutually exclusivity.
            if ((flags & BrushDataFlags.HasPresetColors) != 0)
            {
                PresetColors = new EmfPlusBlendColors(reader);
            }
            if ((flags & BrushDataFlags.HasVerticalBlendColors) != 0)
            {
                VerticalBlend = new EmfPlusBlendFactors(reader);
            }
            if ((flags & BrushDataFlags.HasHorizontalBlendColors) != 0)
            {
                HorizontalBlend = new EmfPlusBlendFactors(reader);
            }
        }