Exemple #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="D2D1BitmapBrushProperties"/> struct.
 /// </summary>
 /// <param name="extendModeX">A value that describes how the brush horizontally tiles those areas that extend past its bitmap.</param>
 /// <param name="extendModeY">A value that describes how the brush vertically tiles those areas that extend past its bitmap.</param>
 /// <param name="interpolationMode">A value that specifies how the bitmap is interpolated when it is scaled or rotated.</param>
 public D2D1BitmapBrushProperties(D2D1ExtendMode extendModeX, D2D1ExtendMode extendModeY, D2D1BitmapInterpolationMode interpolationMode)
 {
     this.extendModeX       = extendModeX;
     this.extendModeY       = extendModeY;
     this.interpolationMode = interpolationMode;
 }
        public D2D1GradientStopCollection CreateGradientStopCollection(D2D1GradientStop[] gradientStops, D2D1Gamma colorInterpolationGamma, D2D1ExtendMode extendMode)
        {
            if (gradientStops == null)
            {
                throw new ArgumentNullException("gradientStops");
            }

            if (gradientStops.Length < 1)
            {
                throw new ArgumentOutOfRangeException("gradientStops");
            }

            ID2D1GradientStopCollection gradientStopCollection;
            this.GetHandle<ID2D1RenderTarget>().CreateGradientStopCollection(gradientStops, (uint)gradientStops.Length, colorInterpolationGamma, extendMode, out gradientStopCollection);
            return new D2D1GradientStopCollection(gradientStopCollection);
        }