MCPcopy Create free account
hub / github.com/davidgiven/fluxengine / star

Method star

dep/agg/src/agg2d.cpp:840–858  ·  view source on GitHub ↗

------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

838
839//------------------------------------------------------------------------
840void Agg2D::star(double cx, double cy, double r1, double r2, double startAngle, int numRays)
841{
842 m_path.remove_all();
843 double da = agg::pi / double(numRays);
844 double a = startAngle;
845 int i;
846 for (i = 0; i < numRays; i++)
847 {
848 double x = cos(a) * r2 + cx;
849 double y = sin(a) * r2 + cy;
850 if (i) m_path.line_to(x, y);
851 else m_path.move_to(x, y);
852 a += da;
853 m_path.line_to(cos(a) * r1 + cx, sin(a) * r1 + cy);
854 a += da;
855 }
856 closePolygon();
857 drawPath(FillAndStroke);
858}
859
860
861//------------------------------------------------------------------------

Callers

nothing calls this directly

Calls 3

remove_allMethod · 0.45
line_toMethod · 0.45
move_toMethod · 0.45

Tested by

no test coverage detected