Logo Search packages:      
Sourcecode: codeblocks version File versions  Download package

void wxPdfDocument::Rotate ( double  angle,
double  x = -1,
double  y = -1 
) [virtual]

Performs a rotation around a given center.

angleangle in degrees.
xabscissa of the rotation center. Default value: current position.
yordinate of the rotation center. Default value: current position.

The rotation affects all elements which are printed after the method call (with the exception of the clickable areas).


  • Only the display is altered. The GetX() and GetY() methods are not affected, nor the automatic page break mechanism.
  • Rotation is not kept from page to page. Each page begins with a null rotation.

Definition at line 1749 of file pdfgraphics.cpp.

References m_h, m_inTransform, m_k, m_x, m_y, StartTransform(), and Transform().

Referenced by RotatedImage(), RotatedText(), and ShapedText().

  if (m_inTransform == 0)
  if (x < 0)
    x = m_x;
  if (y < 0)
    y = m_y;
  y = (m_h - y) * m_k;
  x *= m_k;
  // calculate elements of transformation matrix
  double tm[6];
  angle *= (atan(1.) / 45.);
  tm[0] = cos(angle);
  tm[1] = sin(angle);
  tm[2] = -tm[1];
  tm[3] = tm[0];
  tm[4] = x + tm[1] * y - tm[0] * x;
  tm[5] = y - tm[0] * y - tm[1] * x;
  //rotate the coordinate system around ($x,$y)

Here is the call graph for this function:

Here is the caller graph for this function:

Generated by  Doxygen 1.6.0   Back to index