a. Drawing Simple Circle

<< Click to Display Table of Contents >>

Navigation:  Tutorials > Tutorial 06 - Drawing Circles >

a. Drawing Simple Circle

This section shows how to draw a simple circle using the CircleExt() command.

 

 

Command Prototype

 

uint16_t CircleExt(int X,int Y,int Radius1,int Radius2,uint32_t Color,just_t Justification,int16_t Angle,int Radiusat);

 

Parameters

Description

X,Y

(x,y) coordinates

Radius1

Inner radius

Radius2

Outer radius

Color

Circle color

Justification

Justification values (i.e MM,TL,BL, etc.)

Angle

Angle at which circle will be drawn

Radiusat

Distance from center

 

 

Code

 

 

void setup()

{

 /* Initialize CleO - needs to be done only once */

 CleO.begin();

 

 /* Start building a screen frame */

 CleO.Start();

 

/* Draw a circle with (160, 240) centre,150 as outter radius, 140 as innner radius, with dark orange color and 0 angle and radiusat  */

 CleO.CircleExt(160, 240, 140, 150, DARK_ORANGE, MM, 0, 0);

 

/* Display completed screen frame */

 CleO.Show();

}

 

void loop()

{

}

 

 

Description

 

The above code snippet draws a dark orange color circle with (160, 240) as a center; and with 140 and 150 as inner and outer radius respectively.

 

 

Output

 

Here is the output displayed upon executing the above code snippet -

 

DrawingCircle