# Source CodeHow to Draw Filled Circles

#### Boboo99

##### Scrub
Dank Tier VIP
Fleep Tier Donator
C++:
``````void DrawCirlceSplashDamage(Vector3D PositionNade, float radius, vec4_t Color)
{
for (int i = 1; i <= 360; i++)
{

}
}``````
To draw a "filled" circle around a certain point,could be useful to draw the grenade damage radius (Thats what I did)

C++:
``````void DrawCirlceOnScreen(Vector2D Position, float radius, vec4_t Color)
{
for (int i = 1; i <= 360; i+=10)
{
int x = i + 10;
Vector2D PositionOld(Position.x + (radius * cos(i * PI / 180)), Position.y + (radius * sin(i * PI / 180)));
Vector2D PositionNew(Position.x + (radius * cos(x * PI / 180)), Position.y + (radius * sin(x * PI / 180)));

DrawLine(PositionOld.x, PositionOld.y, PositionNew.x, PositionNew.y, Color, RegisterShader("white"), 1);
}
}``````
Draws a circle around a certain position on the screen,could be useful for a circle ESP(Thats what I did )

#### Rake

Good snippet, thanx!

#### GAFO666

##### Hacker
Meme Tier VIP
If you do a filled circle, I would recommend triangles instead of lines, since it gets more performant that way and you wont get resolution problems with empty pixels
the theory looks like that: (well almost, Im not good in drawing ... my art teacher hated me ... :*( )

Ofc you need to apply it for the rendering engine you use

Attention! Before you post:

Read the How to Ask Questions Guide
99% of questions are answered in the Beginner's Guide, do it before asking a question.

No Hack Requests. Post in the correct section.  Search the forum first. Read the rules.

How to make a good post:

• Fill out the form correctly
• Tell us the game name & coding language
• Post everything we need to know to help you
• Ask specific questions, be descriptive
• Post errors, line numbers & screenshots
• Post code snippets using code tags
• If it's a large project, zip it up and attach it

If you do not comply, your post may be deleted.  We want to help, please make a good post and we will do our best to help you.