MCPcopy Create free account
hub / github.com/cinder/Cinder / drawEllipse

Method drawEllipse

blocks/Cairo/src/Cairo.cpp:2009–2020  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 ) )

Callers 1

renderSelfMethod · 0.80

Calls 5

saveMethod · 0.80
restoreMethod · 0.80
translateMethod · 0.45
scaleMethod · 0.45
arcMethod · 0.45

Tested by

no test coverage detected