| 2007 | } |
| 2008 | |
| 2009 | void drawEllipse( const svg::Ellipse &ellipse ) { |
| 2010 | if( ! shouldRender( ellipse ) ) |
| 2011 | return; |
| 2012 | if( ( ellipse.getRadiusX() < 0 ) || ( ellipse.getRadiusY() < 0 ) ) |
| 2013 | return; |
| 2014 | mCtx.save(); |
| 2015 | mCtx.translate( ellipse.getCenter() ); |
| 2016 | mCtx.scale( ellipse.getRadiusX(), ellipse.getRadiusY() ); |
| 2017 | mCtx.arc( 0, 0, 1, 0, 2 * M_PI ); |
| 2018 | mCtx.restore(); |
| 2019 | strokeAndFill( ellipse ); |
| 2020 | } |
| 2021 | |
| 2022 | void drawImage( const svg::Image &image ) { |
| 2023 | if( ! shouldRender( image ) ) |