/// <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;
 }
 /// <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;
 }
Beispiel #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;
 }
 public void PushAxisAlignedClip(D2D1RectF clipRect, D2D1AntialiasMode antialiasMode)
 {
     this.GetHandle<ID2D1RenderTarget>().PushAxisAlignedClip(ref clipRect, antialiasMode);
 }