Method: PDF::Writer::Graphics#rotate_axis
- Defined in:
- lib/extensions/pdf-writer/pdf/writer/graphics.rb
#rotate_axis(angle) ⇒ Object
Rotate the axis of the coordinate system by the specified clockwise angle.
762 763 764 765 766 767 768 |
# File 'lib/extensions/pdf-writer/pdf/writer/graphics.rb', line 762 def rotate_axis(angle) rad = PDF::Math.deg2rad(angle) tt = "\n%.3f %.3f %.3f %.3f 0 0 cm" tx = [ Math.cos(rad), Math.sin(rad), -Math.sin(rad), Math.cos(rad) ] add_content(tt % tx) self end |