PdfSharp.Drawing.XGraphics.RotateAtTransform C# (CSharp) Метод

RotateAtTransform() публичный Метод

Applies the specified rotation operation to the transformation matrix of this object by prepending it to the object's transformation matrix.
public RotateAtTransform ( double angle, XPoint point ) : void
angle double
point XPoint
Результат void
    public void RotateAtTransform(double angle, XPoint point)
    {
      //RotateAtTransform(angle, point, XMatrixOrder.Prepend);
      XMatrix matrix = new XMatrix();  //XMatrix.Identity;
      matrix.RotateAtPrepend(angle, point);
      AddTransform(matrix, XMatrixOrder.Prepend);
    }

Same methods

XGraphics::RotateAtTransform ( double angle, XPoint point, XMatrixOrder order ) : void

Usage Example

Пример #1
1
        /// <summary>
        /// Draws a sample box.
        /// </summary>
        public void BeginBox(XGraphics gfx, int number)
        {
            //obracene XY
            gfx.RotateAtTransform(90.0, new XPoint(height / 4, width / 4));
            gfx.TranslateTransform(+62, +63);
            //const int dEllipse = 15;
            XRect rect = new XRect(0, 0, height /2 -2, width/2 -2);

            if (number % 2 == 0)
                rect.X += height/2 +2;
            rect.Y =  ((number - 1) / 2) * (-width/2 - 3);
            //rect.Inflate(-10, -10);
            //XRect rect2 = rect;

            XPen pen = new XPen(XColors.Black, 1);

            gfx.DrawRectangle(pen, rect.X, rect.Y, rect.Width, rect.Height);

            //rect2.Offset(this.borderWidth, this.borderWidth);
            //gfx.DrawRoundedRectangle(new XSolidBrush(this.shadowColor), rect2, new XSize(dEllipse + 8, dEllipse + 8));
            //XLinearGradientBrush brush = new XLinearGradientBrush(rect, this.backColor, this.backColor2, XLinearGradientMode.Vertical);
            //gfx.DrawRoundedRectangle(this.borderPen, brush, rect, new XSize(dEllipse, dEllipse));
            //rect.Inflate(-5, -5);

            //rect.Inflate(-10, -5);
            //rect.Y += 20;
            //rect.Height -= 20;
            ////gfx.DrawRectangle(XPens.Red, rect);

            //    gfx.TranslateTransform(rect.X, rect.Y);

            this.state = gfx.Save();
        }
All Usage Examples Of PdfSharp.Drawing.XGraphics::RotateAtTransform