Skip to content

Commit 7848989

Browse files
authored
Clean up pixel code (#137)
* Add missing Doxygen docs * Apply astyle styling
1 parent 18b86ee commit 7848989

2 files changed

Lines changed: 8 additions & 10 deletions

File tree

include/hagl/pixel.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ extern "C" {
5050
* Output will be clipped to the current clip window.
5151
*
5252
* @param surface
53-
* @param x0
54-
* @param y0
55-
* @param color
53+
* @param x0 X coordinate
54+
* @param y0 Y coordinate
55+
* @param color pixel color
5656
*/
5757
void
5858
hagl_put_pixel(void const *surface, int16_t x0, int16_t y0, hagl_color_t color);
@@ -64,8 +64,8 @@ hagl_put_pixel(void const *surface, int16_t x0, int16_t y0, hagl_color_t color);
6464
* error or if HAL does not support this feature returns black.
6565
*
6666
* @param surface
67-
* @param x0
68-
* @param y0
67+
* @param x0 X coordinate
68+
* @param y0 Y coordinate
6969
* @return color at the given location
7070
*/
7171
hagl_color_t

src/hagl_pixel.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
33
MIT License
44
5-
Copyright (c) 2018-2023 Mika Tuupola
5+
Copyright (c) 2018-2026 Mika Tuupola
66
77
Permission is hereby granted, free of charge, to any person obtaining a copy
88
of this software and associated documentation files (the "Software"), to deal
@@ -38,8 +38,7 @@ SPDX-License-Identifier: MIT
3838
#include "hagl/surface.h"
3939

4040
void
41-
hagl_put_pixel(void const *_surface, int16_t x0, int16_t y0, hagl_color_t color)
42-
{
41+
hagl_put_pixel(void const *_surface, int16_t x0, int16_t y0, hagl_color_t color) {
4342
const hagl_surface_t *surface = _surface;
4443

4544
/* x0 or y0 is before the edge, nothing to do. */
@@ -57,8 +56,7 @@ hagl_put_pixel(void const *_surface, int16_t x0, int16_t y0, hagl_color_t color)
5756
}
5857

5958
hagl_color_t
60-
hagl_get_pixel(void const *_surface, int16_t x0, int16_t y0)
61-
{
59+
hagl_get_pixel(void const *_surface, int16_t x0, int16_t y0) {
6260
const hagl_surface_t *surface = _surface;
6361
/* x0 or y0 is before the edge, nothing to do. */
6462
if ((x0 < surface->clip.x0) || (y0 < surface->clip.y0)) {

0 commit comments

Comments
 (0)