Пример #1
0
 public EmfPlusTextureBrushOptionalData(MetafileReader reader, BrushDataFlags flags, uint size)
 {
     if ((flags & BrushDataFlags.HasTransform) != 0)
     {
         Transform = new EmfPlusTransformMatrix(reader);
     }
     Image = new EmfPlusImage(reader, size);
 }
Пример #2
0
 public EmfPlusPenOptionalData(MetafileReader reader, PenDataFlags flags)
 {
     if ((flags & PenDataFlags.HasTransform) != 0)
     {
         Transform = new EmfPlusTransformMatrix(reader);
     }
     if ((flags & PenDataFlags.HasStartCap) != 0)
     {
         StartCap = (LineCapType)reader.ReadInt32();
     }
     if ((flags & PenDataFlags.HasEndCap) != 0)
     {
         EndCap = (LineCapType)reader.ReadInt32();
     }
     if ((flags & PenDataFlags.HasJoin) != 0)
     {
         Join = (LineJoinType)reader.ReadInt32();
     }
     if ((flags & PenDataFlags.HasMiterLimit) != 0)
     {
         MiterLimit = reader.ReadSingle();
     }
     if ((flags & PenDataFlags.HasLineStyle) != 0)
     {
         LineStyle = (LineStyle)reader.ReadInt32();
     }
     if ((flags & PenDataFlags.HasDashedLineCap) != 0)
     {
         DashedLineCap = (DashedLineCapType)reader.ReadInt32();
     }
     if ((flags & PenDataFlags.HasDashedLineOffset) != 0)
     {
         DashOffset = reader.ReadSingle();
     }
     if ((flags & PenDataFlags.HasDashedLine) != 0)
     {
         DashLineData = new EmfPlusDashedLineData(reader);
     }
     if ((flags & PenDataFlags.HasNonCenter) != 0)
     {
         Alignment = (PenAlignment)reader.ReadInt32();
     }
     if ((flags & PenDataFlags.HasCompoundLine) != 0)
     {
         CompoundLineData = new EmfPlusCompoundLineData(reader);
     }
     if ((flags & PenDataFlags.HasCustomStartCap) != 0)
     {
         CustomStartCapData = new EmfPlusCustomStartCapData(reader);
     }
     if ((flags & PenDataFlags.HasCustomEndCap) != 0)
     {
         CustomEndCapData = new EmfPlusCustomEndCapData(reader);
     }
 }
        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);
            }
        }