    # File lib/rvg/units.rb, line 9
                def dpi=(n)
                    if !defined?(@dpi)
                        [Float, Fixnum].each do |c|
                            c.class_eval "# the default measurement - 1px is 1 pixel\ndef px\nself\nend\n# inches\ndef in\nself * ::Magick::RVG.dpi\nend\n# millimeters\ndef mm\nself * ::Magick::RVG.dpi / 25.4\nend\n# centimeters\ndef cm\nself * ::Magick::RVG.dpi / 2.54\nend\n# points\ndef pt\nself * ::Magick::RVG.dpi / 72.0\nend\n# picas\ndef pc\nself * ::Magick::RVG.dpi / 6.0\nend\n# percentage of the argument\ndef pct(of)\nself * Float(of) / 100.0\nend\n# the default is deg\ndef deg\nself\nend\n# radians -> degrees\ndef rad\nself * 180.0 / Math::PI\nend\n# grads -> degrees\ndef grad\nself * 9.0 / 10.0\nend\n"
                        end
                    end

                    @dpi = Float(n)
                    return @dpi
                rescue ArgumentError
                    raise TypeError, "Can't convert `#{n}' to Float"
                end