Add tinygl_pixel_set and tinygl_pixel_get
This commit is contained in:
@@ -35,6 +35,24 @@ static tinygl_state_t tinygl =
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/** Set pixel.
|
||||||
|
@param pos coordinates of point
|
||||||
|
@param pixel_value pixel value. */
|
||||||
|
void tinygl_pixel_set (tinygl_point_t pos, tinygl_pixel_value_t pixel_value)
|
||||||
|
{
|
||||||
|
display_pixel_set (pos.x, pos.y, pixel_value);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/** Get pixel.
|
||||||
|
@param pos coordinates of point
|
||||||
|
@return pixel value. */
|
||||||
|
tinygl_pixel_value_t tinygl_pixel_get (tinygl_point_t pos)
|
||||||
|
{
|
||||||
|
return display_pixel_get (pos.x, pos.y);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/** Draw point.
|
/** Draw point.
|
||||||
@param pos coordinates of point
|
@param pos coordinates of point
|
||||||
@param pixel_value pixel value for line. */
|
@param pixel_value pixel value for line. */
|
||||||
|
|||||||
@@ -187,6 +187,18 @@ void tinygl_text (const char *string);
|
|||||||
void tinygl_draw_point (tinygl_point_t pos, tinygl_pixel_value_t pixel_value);
|
void tinygl_draw_point (tinygl_point_t pos, tinygl_pixel_value_t pixel_value);
|
||||||
|
|
||||||
|
|
||||||
|
/** Set pixel.
|
||||||
|
@param pos coordinates of point
|
||||||
|
@param pixel_value pixel value. */
|
||||||
|
void tinygl_pixel_set (tinygl_point_t pos, tinygl_pixel_value_t pixel_value);
|
||||||
|
|
||||||
|
|
||||||
|
/** Get pixel.
|
||||||
|
@param pos coordinates of point
|
||||||
|
@return pixel value. */
|
||||||
|
tinygl_pixel_value_t tinygl_pixel_get (tinygl_point_t pos);
|
||||||
|
|
||||||
|
|
||||||
/** Draw line.
|
/** Draw line.
|
||||||
@param pos1 coordinates of start of line
|
@param pos1 coordinates of start of line
|
||||||
@param pos2 coordinates of end of line
|
@param pos2 coordinates of end of line
|
||||||
|
|||||||
Reference in New Issue
Block a user