public static D2D1Matrix3X2F Skew(float angleX, float angleY, D2D1Point2F center)
        {
            D2D1Matrix3X2F matrix;

            NativeMethods.D2D1MakeSkewMatrix(angleX, angleY, center, out matrix);
            return(matrix);
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="D2D1RadialGradientBrushProperties"/> struct.
 /// </summary>
 /// <param name="center">The center of the gradient ellipse, in the brush's coordinate space.</param>
 /// <param name="gradientOriginOffset">The offset of the gradient origin relative to the gradient ellipse's center, in the brush's coordinate space.</param>
 /// <param name="radiusX">The x-radius of the gradient ellipse, in the brush's coordinate space.</param>
 /// <param name="radiusY">The y-radius of the gradient ellipse, in the brush's coordinate space.</param>
 public D2D1RadialGradientBrushProperties(D2D1Point2F center, D2D1Point2F gradientOriginOffset, float radiusX, float radiusY)
 {
     this.center = center;
     this.gradientOriginOffset = gradientOriginOffset;
     this.radiusX = radiusX;
     this.radiusY = radiusY;
 }
        public static D2D1Matrix3X2F Rotation(float angle, D2D1Point2F center)
        {
            D2D1Matrix3X2F matrix;

            NativeMethods.D2D1MakeRotateMatrix(angle, center, out matrix);
            return(matrix);
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="D2D1ArcSegment"/> struct.
 /// </summary>
 /// <param name="point">The end point of the arc.</param>
 /// <param name="size">The x-radius and y-radius of the arc.</param>
 /// <param name="rotationAngle">A value that specifies how many degrees in the clockwise direction the ellipse is rotated relative to the current coordinate system.</param>
 /// <param name="sweepDirection">A value that specifies whether the arc sweep is clockwise or counterclockwise.</param>
 /// <param name="arcSize">A value that specifies whether the given arc is larger than 180 degrees.</param>
 public D2D1ArcSegment(D2D1Point2F point, D2D1SizeF size, float rotationAngle, D2D1SweepDirection sweepDirection, D2D1ArcSize arcSize)
 {
     this.point          = point;
     this.size           = size;
     this.rotationAngle  = rotationAngle;
     this.sweepDirection = sweepDirection;
     this.arcSize        = arcSize;
 }
        public static D2D1Matrix3X2F Scale(float x, float y, D2D1Point2F center)
        {
            D2D1Matrix3X2F scale;

            scale.m11 = x;
            scale.m12 = 0.0f;
            scale.m21 = 0.0f;
            scale.m22 = y;
            scale.m31 = center.X - (x * center.X);
            scale.m32 = center.Y - (y * center.Y);

            return(scale);
        }
        /// <summary>
        /// Creates a scale transformation that has the specified scale factors and center point.
        /// </summary>
        /// <param name="size">The x-axis and y-axis scale factors of the scale transformation.</param>
        /// <param name="center">The point about which the scale is performed.</param>
        /// <returns>The new scale transformation.</returns>
        public static D2D1Matrix3X2F Scale(D2D1SizeF size, D2D1Point2F center)
        {
            D2D1Matrix3X2F scale;

            scale.m11 = size.Width;
            scale.m12 = 0.0f;
            scale.m21 = 0.0f;
            scale.m22 = size.Height;
            scale.m31 = center.X - (size.Width * center.X);
            scale.m32 = center.Y - (size.Height * center.Y);

            return(scale);
        }
Ejemplo n.º 7
0
 /// <summary>
 /// Initializes a new instance of the <see cref="D2D1BezierSegment"/> struct.
 /// </summary>
 /// <param name="point1">The first control point for the Bezier segment.</param>
 /// <param name="point2">The second control point for the Bezier segment.</param>
 /// <param name="point3">The end point for the Bezier segment.</param>
 public D2D1BezierSegment(D2D1Point2F point1, D2D1Point2F point2, D2D1Point2F point3)
 {
     this.point1 = point1;
     this.point2 = point2;
     this.point3 = point3;
 }
 /// <summary>
 /// Uses this matrix to transform the specified point and returns the result.
 /// </summary>
 /// <param name="point">The point to transform.</param>
 /// <returns>The result point.</returns>
 public D2D1Point2F TranformPoint(D2D1Point2F point)
 {
     return(new D2D1Point2F(
                (point.X * this.m11) + (point.Y * this.m21) + this.m31,
                (point.X * this.m12) + (point.Y * this.m22) + this.m32));
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="D2D1LinearGradientBrushProperties"/> struct.
 /// </summary>
 /// <param name="startPoint">The starting point of the gradient axis, in the brush's coordinate space.</param>
 /// <param name="endPoint">The endpoint of the gradient axis, in the brush's coordinate space.</param>
 public D2D1LinearGradientBrushProperties(D2D1Point2F startPoint, D2D1Point2F endPoint)
 {
     this.startPoint = startPoint;
     this.endPoint   = endPoint;
 }
Ejemplo n.º 10
0
 public static extern void D2D1MakeSkewMatrix(
     [In] float angleX,
     [In] float angleY,
     [In] D2D1Point2F center,
     [Out] out D2D1Matrix3X2F matrix);
Ejemplo n.º 11
0
 public static extern void D2D1MakeRotateMatrix(
     [In] float angle,
     [In] D2D1Point2F center,
     [Out] out D2D1Matrix3X2F matrix);
Ejemplo n.º 12
0
 /// <summary>
 /// Initializes a new instance of the <see cref="D2D1QuadraticBezierSegment"/> struct.
 /// </summary>
 /// <param name="point1">The control point of the quadratic Bezier segment.</param>
 /// <param name="point2">The end point of the quadratic Bezier segment.</param>
 public D2D1QuadraticBezierSegment(D2D1Point2F point1, D2D1Point2F point2)
 {
     this.point1 = point1;
     this.point2 = point2;
 }
Ejemplo n.º 13
0
 /// <summary>
 /// Initializes a new instance of the <see cref="D2D1Ellipse"/> struct.
 /// </summary>
 /// <param name="point">The center point of the ellipse.</param>
 /// <param name="radiusX">The X-radius of the ellipse.</param>
 /// <param name="radiusY">The Y-radius of the ellipse.</param>
 public D2D1Ellipse(D2D1Point2F point, float radiusX, float radiusY)
 {
     this.point   = point;
     this.radiusX = radiusX;
     this.radiusY = radiusY;
 }
Ejemplo n.º 14
0
 public void BeginFigure(D2D1Point2F startPoint, D2D1FigureBegin figureBegin)
 {
     this.GetHandle <ID2D1SimplifiedGeometrySink>().BeginFigure(startPoint, figureBegin);
 }
Ejemplo n.º 15
0
 /// <summary>
 /// Initializes a new instance of the <see cref="D2D1Triangle"/> struct.
 /// </summary>
 /// <param name="point1">The first vertex of a triangle.</param>
 /// <param name="point2">The second vertex of a triangle.</param>
 /// <param name="point3">The third vertex of a triangle.</param>
 public D2D1Triangle(D2D1Point2F point1, D2D1Point2F point2, D2D1Point2F point3)
 {
     this.point1 = point1;
     this.point2 = point2;
     this.point3 = point3;
 }
Ejemplo n.º 16
0
 public void AddLine(D2D1Point2F point)
 {
     this.geometrySink.AddLine(point);
 }