GFXprim
2D bitmap graphics library with emphasis on speed and correctness
Loading...
Searching...
No Matches
Enumerations | Functions
gp_circle_seg.h File Reference

A ring and circle drawing algorithms. More...

#include <core/gp_types.h>

Go to the source code of this file.

Enumerations

enum  gp_circle_segments { GP_CIRCLE_SEG1 = 0x01 , GP_CIRCLE_SEG2 = 0x02 , GP_CIRCLE_SEG3 = 0x04 , GP_CIRCLE_SEG4 = 0x08 }
 Quadrants in the cartesian space. More...
 

Functions

void gp_circle_seg (gp_pixmap *pixmap, gp_coord xcenter, gp_coord ycenter, gp_size r, uint8_t seg_flag, gp_pixel pixel)
 Draws a circle segment.
 
void gp_fill_circle_seg (gp_pixmap *pixmap, gp_coord xcenter, gp_coord ycenter, gp_size r, uint8_t seg_flag, gp_pixel pixel)
 Draws a filled circle segment.
 
void gp_fill_ring_seg (gp_pixmap *pixmap, gp_coord xcenter, gp_coord ycenter, gp_size r1, gp_size r2, uint8_t seg_flag, gp_pixel pixel)
 Draws a filled ring segment.
 

Detailed Description

A ring and circle drawing algorithms.

Definition in file gp_circle_seg.h.

Enumeration Type Documentation

◆ gp_circle_segments

Quadrants in the cartesian space.

The center is set in the middle of the circle. First segment is where both x and y are possitive, second is where only y is possitive, third is for both x and y negative and the last one for only y negative.

Note that on computer screen (and in in-memory bitmaps) cordinates for y grows in the opposite direction to the standard cartesian plane.

So first segment is actually down right, second is down left, third is up left, and fourth is up right.

Enumerator
GP_CIRCLE_SEG1 

First Quadrant.

GP_CIRCLE_SEG2 

Second Quadrant.

GP_CIRCLE_SEG3 

Third Quadrant.

GP_CIRCLE_SEG4 

Fourth Quadrant.

Definition at line 31 of file gp_circle_seg.h.