/// <summary>
 /// Initializes a new instance of the <see cref="D2D1DrawingStateDescription"/> struct.
 /// </summary>
 /// <param name="antialiasMode">The antialiasing mode for subsequent nontext drawing operations.</param>
 /// <param name="textAntialiasMode">The antialiasing mode for subsequent text and glyph drawing operations.</param>
 /// <param name="tag1">The first label for subsequent drawing operations.</param>
 /// <param name="tag2">The second label for subsequent drawing operations.</param>
 /// <param name="transform">The transformation to apply to subsequent drawing operations.</param>
 public D2D1DrawingStateDescription(D2D1AntialiasMode antialiasMode, D2D1TextAntialiasMode textAntialiasMode, ulong tag1, ulong tag2, D2D1Matrix3X2F transform)
 {
     this.antialiasMode     = antialiasMode;
     this.textAntialiasMode = textAntialiasMode;
     this.tag1      = tag1;
     this.tag2      = tag2;
     this.transform = transform;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="D2D1DrawingStateDescription"/> struct.
 /// </summary>
 /// <param name="antialiasMode">The antialiasing mode for subsequent nontext drawing operations.</param>
 /// <param name="textAntialiasMode">The antialiasing mode for subsequent text and glyph drawing operations.</param>
 public D2D1DrawingStateDescription(D2D1AntialiasMode antialiasMode, D2D1TextAntialiasMode textAntialiasMode)
 {
     this.antialiasMode     = antialiasMode;
     this.textAntialiasMode = textAntialiasMode;
     this.tag1      = 0U;
     this.tag2      = 0U;
     this.transform = D2D1Matrix3X2F.Identity;
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="D2D1LayerParameters"/> struct.
 /// </summary>
 /// <param name="contentBounds">The content bounds of the layer. Content outside these bounds is not guaranteed to render.</param>
 /// <param name="geometricMask">The geometric mask specifies the area of the layer that is composited into the render target.</param>
 /// <param name="maskAntialiasMode">A value that specifies the antialiasing mode for the geometricMask.</param>
 /// <param name="maskTransform">A value that specifies the transform that is applied to the geometric mask when composing the layer.</param>
 /// <param name="opacity">An opacity value that is applied uniformly to all resources in the layer when compositing to the target.</param>
 /// <param name="opacityBrush">A brush that is used to modify the opacity of the layer. The brush is mapped to the layer, and the alpha channel of each mapped brush pixel is multiplied against the corresponding layer pixel.</param>
 /// <param name="layerOptions">A value that specifies whether the layer intends to render text with ClearType antialiasing.</param>
 public D2D1LayerParameters(
     D2D1RectF contentBounds,
     D2D1Geometry geometricMask,
     D2D1AntialiasMode maskAntialiasMode,
     D2D1Matrix3X2F maskTransform,
     float opacity,
     D2D1Brush opacityBrush,
     D2D1LayerOptions layerOptions)
 {
     this.contentBounds     = contentBounds;
     this.geometricMask     = geometricMask == null ? null : geometricMask.GetHandle <ID2D1Geometry>();
     this.maskAntialiasMode = maskAntialiasMode;
     this.maskTransform     = maskTransform;
     this.opacity           = opacity;
     this.opacityBrush      = opacityBrush == null ? null : opacityBrush.GetHandle <ID2D1Brush>();
     this.layerOptions      = layerOptions;
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="D2D1BrushProperties"/> struct.
 /// </summary>
 /// <param name="opacity">A value between 0.0f and 1.0f, inclusive, that specifies the degree of opacity of the brush.</param>
 /// <param name="transform">The transformation that is applied to the brush.</param>
 public D2D1BrushProperties(float opacity, D2D1Matrix3X2F transform)
 {
     this.opacity   = opacity;
     this.transform = transform;
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="D2D1BrushProperties"/> struct.
 /// </summary>
 /// <param name="opacity">A value between 0.0f and 1.0f, inclusive, that specifies the degree of opacity of the brush.</param>
 public D2D1BrushProperties(float opacity)
 {
     this.opacity   = opacity;
     this.transform = D2D1Matrix3X2F.Identity;
 }
Ejemplo n.º 6
0
 public static extern bool D2D1InvertMatrix(
     [In, Out] ref D2D1Matrix3X2F matrix);
Ejemplo n.º 7
0
 public static extern bool D2D1IsMatrixInvertible(
     [In] ref D2D1Matrix3X2F matrix);
Ejemplo n.º 8
0
 public static extern void D2D1MakeSkewMatrix(
     [In] float angleX,
     [In] float angleY,
     [In] D2D1Point2F center,
     [Out] out D2D1Matrix3X2F matrix);
Ejemplo n.º 9
0
 public static extern void D2D1MakeRotateMatrix(
     [In] float angle,
     [In] D2D1Point2F center,
     [Out] out D2D1Matrix3X2F matrix);
Ejemplo n.º 10
0
        public D2D1TransformedGeometry CreateTransformedGeometry(D2D1Geometry sourceGeometry, D2D1Matrix3X2F transform)
        {
            if (sourceGeometry == null)
            {
                throw new ArgumentNullException("sourceGeometry");
            }

            ID2D1TransformedGeometry transformedGeometry;

            this.factory.CreateTransformedGeometry(sourceGeometry.GetHandle <ID2D1Geometry>(), ref transform, out transformedGeometry);
            return(new D2D1TransformedGeometry(transformedGeometry));
        }