Skip to content

Commit 2555bbe

Browse files
committed
Add missing documentation
1 parent f14894e commit 2555bbe

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

sxbp/refine_figure_shrink_from_end.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
* This source file forms part of sxbp, a library which generates experimental
33
* 2D spiral-like shapes based on input binary data.
44
*
5-
* This compilation unit provides the definition of `sxbp_refine_figure`, a
6-
* public function used to shorten the lines of an SXBP figure to something less
7-
* space-consuming, while still maintaining a pattern that has no collisions
8-
* between lines.
5+
* This compilation unit provides the definition of
6+
* `sxbp_refine_figure_shrink_from_end`, a public function providing a specific
7+
* algorithm for refining a figure by attemptin to shrink all the lines from
8+
* their safe 'default' lengths (as plotted by `sxbp_begin_figure`) to the
9+
* shortest length possible, starting from the end and working backwards.
910
*
1011
* Copyright (C) Joshua Saxby <[email protected]> 2016-2017, 2018
1112
*

sxbp/sxbp.h

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,7 @@ sxbp_result_t sxbp_render_figure_to_bitmap(
625625
* callback.
626626
* @returns `SXBP_RESULT_OK` if the figure could be rendered successfully
627627
* @returns `SXBP_RESULT_FAIL_PRECONDITION` if `figure`, `buffer` or
628-
* `render_callback` is `NULL`
628+
* `render_callback` are `NULL`
629629
* @returns Any other valid value for type `sxbp_result_t`, according to all
630630
* the possible error codes that can be returned by the given render callback.
631631
* @since v0.54.0
@@ -641,6 +641,9 @@ sxbp_result_t sxbp_render_figure(
641641
/**
642642
* @brief A dummy renderer function that does nothing
643643
* @details This exists for testing purposes only
644+
* @warn This function is currently unusable because it always returns the
645+
* "not implemented" failure error code
646+
* @returns `SXBP_RESULT_FAIL_UNIMPLEMENTED`
644647
*/
645648
sxbp_result_t sxbp_render_figure_to_null(
646649
const sxbp_figure_t* const figure,
@@ -651,6 +654,11 @@ sxbp_result_t sxbp_render_figure_to_null(
651654

652655
/**
653656
* @brief Renders figures to PBM images
657+
* @details If successful, the buffer will be filled with data which represents
658+
* a binary format PBM image (P4 format).
659+
* @returns `SXBP_RESULT_OK` if the figure could be rendered successfully
660+
* @returns `SXBP_RESULT_FAIL_PRECONDITION` if `figure` or `buffer` are `NULL`
661+
* @returns `SXBP_RESULT_FAIL_MEMORY` if a memory allocation error occurred
654662
*/
655663
sxbp_result_t sxbp_render_figure_to_pbm(
656664
const sxbp_figure_t* const figure,

0 commit comments

Comments
 (0)