In wxWidgets, we're using the wxAffineMatrix2D class to display a rotated rectangle. Below is a small sample of the
code we use. This code works great on a panel but when we use the wxPdfDC class, the rectangle disappears.
Is this the correct way to display a rotated rectangle in this library or is there another way.
Thanks,
RSB
We're using:
wxWidgets: 3.1.0
wxpdfdoc 0.9.5
Compiler: MSVC 14
Platform: Windows 10 (2004).
Code: Select all
double radians = degree__convert_to_radian(360 - orientation) ;
wxAffineMatrix2D mat = dc->GetTransformMatrix() ;
mat.Translate(origin_position.x_coord, origin_position.y_coord);
mat.Rotate(radians) ;
dc->SetTransformMatrix(mat);
dc->DrawRoundedRectangle(-width / 2, -height / 2, width, height, radius) ;
dc->ResetTransformMatrix();