doc: polish up the doxygen.

- applied @retval for those const values.
- applied @return for return value description.
This commit is contained in:
Hermet Park 2023-12-18 18:33:45 +09:00
parent a6378fc673
commit 83e3cb24ff

View file

@ -292,7 +292,7 @@ public:
*
* @param[in] degree The value of the angle in degrees.
*
* @return Result::Success when succeed, Result::FailedAllocation otherwise.
* @retval Result::Success when succeed, Result::FailedAllocation otherwise.
*/
Result rotate(float degree) noexcept;
@ -301,7 +301,7 @@ public:
*
* @param[in] factor The value of the scaling factor. The default value is 1.
*
* @return Result::Success when succeed, Result::FailedAllocation otherwise.
* @retval Result::Success when succeed, Result::FailedAllocation otherwise.
*/
Result scale(float factor) noexcept;
@ -314,7 +314,7 @@ public:
* @param[in] x The value of the horizontal shift.
* @param[in] y The value of the vertical shift.
*
* @return Result::Success when succeed, Result::FailedAllocation otherwise.
* @retval Result::Success when succeed, Result::FailedAllocation otherwise.
*/
Result translate(float x, float y) noexcept;
@ -325,7 +325,7 @@ public:
*
* @param[in] m The 3x3 augmented matrix.
*
* @return Result::Success when succeed, Result::FailedAllocation otherwise.
* @retval Result::Success when succeed, Result::FailedAllocation otherwise.
*/
Result transform(const Matrix& m) noexcept;
@ -346,7 +346,7 @@ public:
*
* @param[in] o The opacity value in the range [0 ~ 255], where 0 is completely transparent and 255 is opaque.
*
* @return Result::Success when succeed.
* @retval Result::Success when succeed.
*
* @note Setting the opacity with this API may require multiple render pass for composition. It is recommended to avoid changing the opacity if possible.
* @note ClipPath won't use the opacity value. (see: enum class CompositeMethod::ClipPath)
@ -359,7 +359,7 @@ public:
* @param[in] target The paint of the target object.
* @param[in] method The method used to composite the source object with the target.
*
* @return Result::Success when succeed, Result::InvalidArguments otherwise.
* @retval Result::Success when succeed, Result::InvalidArguments otherwise.
*/
Result composite(std::unique_ptr<Paint> target, CompositeMethod method) noexcept;
@ -372,7 +372,7 @@ public:
*
* @param[in] method The blending method to be set.
*
* @return Result::Success when the blending method is successfully set.
* @retval Result::Success when the blending method is successfully set.
*
* @note Experimental API
*/
@ -405,7 +405,7 @@ public:
* @param[out] h The height of the object.
* @param[in] transformed If @c true, the paint's transformations are taken into account, otherwise they aren't.
*
* @return Result::Success when succeed, Result::InsufficientCondition otherwise.
* @retval Result::Success when succeed, Result::InsufficientCondition otherwise.
*
* @note The bounding box doesn't indicate the actual drawing region. It's the smallest rectangle that encloses the object.
*/
@ -494,7 +494,7 @@ public:
* @param[in] colorStops An array of ColorStop data structure.
* @param[in] cnt The count of the @p colorStops array equal to the colors number used in the gradient.
*
* @return Result::Success when succeed.
* @retval Result::Success when succeed.
*/
Result colorStops(const ColorStop* colorStops, uint32_t cnt) noexcept;
@ -503,7 +503,7 @@ public:
*
* @param[in] s The FillSpread value.
*
* @return Result::Success when succeed.
* @retval Result::Success when succeed.
*/
Result spread(FillSpread s) noexcept;
@ -514,7 +514,7 @@ public:
*
* @param[in] m The 3x3 augmented matrix.
*
* @return Result::Success when succeed, Result::FailedAllocation otherwise.
* @retval Result::Success when succeed, Result::FailedAllocation otherwise.
*/
Result transform(const Matrix& m) noexcept;
@ -539,7 +539,7 @@ public:
*
* In case no transformation was applied, the identity matrix is returned.
*
* @retval The augmented transformation matrix.
* @return The augmented transformation matrix.
*/
Matrix transform() const noexcept;
@ -632,7 +632,7 @@ public:
*
* @param[in] free If @c true, the memory occupied by paints is deallocated, otherwise it is not.
*
* @return Result::Success when succeed, Result::InsufficientCondition otherwise.
* @retval Result::Success when succeed, Result::InsufficientCondition otherwise.
*
* @see Canvas::push()
* @see Canvas::paints()
@ -647,7 +647,7 @@ public:
*
* @param[in] paint A pointer to the Paint object or @c nullptr.
*
* @return Result::Success when succeed, Result::InsufficientCondition otherwise.
* @retval Result::Success when succeed, Result::InsufficientCondition otherwise.
*
* @note The Update behavior can be asynchronous if the assigned thread number is greater than zero.
*/
@ -656,7 +656,7 @@ public:
/**
* @brief Requests the canvas to draw the Paint objects.
*
* @return Result::Success when succeed, Result::InsufficientCondition otherwise.
* @retval Result::Success when succeed, Result::InsufficientCondition otherwise.
*
* @note Drawing can be asynchronous if the assigned thread number is greater than zero. To guarantee the drawing is done, call sync() afterwards.
* @see Canvas::sync()
@ -669,7 +669,7 @@ public:
* The Canvas rendering can be performed asynchronously. To make sure that rendering is finished,
* the sync() must be called after the draw() regardless of threading.
*
* @return Result::Success when succeed, Result::InsufficientCondition otherwise.
* @retval Result::Success when succeed, Result::InsufficientCondition otherwise.
* @see Canvas::draw()
*/
virtual Result sync() noexcept;
@ -703,7 +703,7 @@ public:
* @param[in] x2 The horizontal coordinate of the second point used to determine the gradient bounds.
* @param[in] y2 The vertical coordinate of the second point used to determine the gradient bounds.
*
* @return Result::Success when succeed.
* @retval Result::Success when succeed.
*
* @note In case the first and the second points are equal, an object filled with such a gradient fill is not rendered.
*/
@ -721,7 +721,7 @@ public:
* @param[out] x2 The horizontal coordinate of the second point used to determine the gradient bounds.
* @param[out] y2 The vertical coordinate of the second point used to determine the gradient bounds.
*
* @return Result::Success when succeed.
* @retval Result::Success when succeed.
*/
Result linear(float* x1, float* y1, float* x2, float* y2) const noexcept;
@ -765,7 +765,7 @@ public:
* @param[in] cy The vertical coordinate of the center of the bounding circle.
* @param[in] radius The radius of the bounding circle.
*
* @return Result::Success when succeed, Result::InvalidArguments in case the @p radius value is zero or less.
* @retval Result::Success when succeed, Result::InvalidArguments in case the @p radius value is zero or less.
*/
Result radial(float cx, float cy, float radius) noexcept;
@ -778,7 +778,7 @@ public:
* @param[out] cy The vertical coordinate of the center of the bounding circle.
* @param[out] radius The radius of the bounding circle.
*
* @return Result::Success when succeed.
* @retval Result::Success when succeed.
*/
Result radial(float* cx, float* cy, float* radius) const noexcept;
@ -824,7 +824,7 @@ public:
*
* The transformation matrix, the color, the fill and the stroke properties are retained.
*
* @return Result::Success when succeed.
* @retval Result::Success when succeed.
*
* @note The memory, where the path data is stored, is not deallocated at this stage for caching effect.
*/
@ -838,7 +838,7 @@ public:
* @param[in] x The horizontal coordinate of the initial point of the sub-path.
* @param[in] y The vertical coordinate of the initial point of the sub-path.
*
* @return Result::Success when succeed.
* @retval Result::Success when succeed.
*/
Result moveTo(float x, float y) noexcept;
@ -850,7 +850,7 @@ public:
* @param[in] x The horizontal coordinate of the end-point of the line.
* @param[in] y The vertical coordinate of the end-point of the line.
*
* @return Result::Success when succeed.
* @retval Result::Success when succeed.
*
* @note In case this is the first command in the path, it corresponds to the moveTo() call.
*/
@ -869,7 +869,7 @@ public:
* @param[in] x The horizontal coordinate of the end-point of the curve.
* @param[in] y The vertical coordinate of the end-point of the curve.
*
* @return Result::Success when succeed.
* @retval Result::Success when succeed.
*
* @note In case this is the first command in the path, no data from the path are rendered.
*/
@ -880,7 +880,7 @@ public:
*
* The value of the current point is set to the initial point of the closed sub-path.
*
* @return Result::Success when succeed.
* @retval Result::Success when succeed.
*
* @note In case the sub-path does not contain any points, this function has no effect.
*/
@ -906,7 +906,7 @@ public:
* @param[in] rx The x-axis radius of the ellipse defining the rounded corners of the rectangle.
* @param[in] ry The y-axis radius of the ellipse defining the rounded corners of the rectangle.
*
* @return Result::Success when succeed.
* @retval Result::Success when succeed.
*
* @note For @p rx and @p ry greater than or equal to the half of @p w and the half of @p h, respectively, the shape become an ellipse.
*/
@ -926,7 +926,7 @@ public:
* @param[in] rx The x-axis radius of the ellipse.
* @param[in] ry The y-axis radius of the ellipse.
*
* @return Result::Success when succeed.
* @retval Result::Success when succeed.
*/
Result appendCircle(float cx, float cy, float rx, float ry) noexcept;
@ -943,7 +943,7 @@ public:
* @param[in] sweep The central angle of the arc given in degrees, measured counter-clockwise from @p startAngle.
* @param[in] pie Specifies whether to draw radii from the arc's center to both of its end-point - drawn if @c true.
*
* @return Result::Success when succeed.
* @retval Result::Success when succeed.
*
* @note Setting @p sweep value greater than 360 degrees, is equivalent to calling appendCircle(cx, cy, radius, radius).
*/
@ -961,7 +961,7 @@ public:
* @param[in] pts The array of the two-dimensional points.
* @param[in] ptsCnt The number of the points in the @p pts array.
*
* @return Result::Success when succeed, Result::InvalidArguments otherwise.
* @retval Result::Success when succeed, Result::InvalidArguments otherwise.
*
* @note The interface is designed for optimal path setting if the caller has a completed path commands already.
*/
@ -972,7 +972,7 @@ public:
*
* @param[in] width The width of the stroke. The default value is 0.
*
* @return Result::Success when succeed, Result::FailedAllocation otherwise.
* @retval Result::Success when succeed, Result::FailedAllocation otherwise.
*/
Result stroke(float width) noexcept;
@ -984,7 +984,7 @@ public:
* @param[in] b The blue color channel value in the range [0 ~ 255]. The default value is 0.
* @param[in] a The alpha channel value in the range [0 ~ 255], where 0 is completely transparent and 255 is opaque. The default value is 0.
*
* @return Result::Success when succeed, Result::FailedAllocation otherwise.
* @retval Result::Success when succeed, Result::FailedAllocation otherwise.
*/
Result stroke(uint8_t r, uint8_t g, uint8_t b, uint8_t a = 255) noexcept;
@ -1019,7 +1019,7 @@ public:
*
* @param[in] cap The cap style value. The default value is @c StrokeCap::Square.
*
* @return Result::Success when succeed, Result::FailedAllocation otherwise.
* @retval Result::Success when succeed, Result::FailedAllocation otherwise.
*/
Result stroke(StrokeCap cap) noexcept;
@ -1030,7 +1030,7 @@ public:
*
* @param[in] join The join style value. The default value is @c StrokeJoin::Bevel.
*
* @return Result::Success when succeed, Result::FailedAllocation otherwise.
* @retval Result::Success when succeed, Result::FailedAllocation otherwise.
*/
Result stroke(StrokeJoin join) noexcept;
@ -1040,7 +1040,7 @@ public:
*
* @param[in] miterlimit The miterlimit imposes a limit on the extent of the stroke join, when the @c StrokeJoin::Miter join style is set. The default value is 4.
*
* @return Result::Success when succeed, Result::NonSupport unsupported value, Result::FailedAllocation otherwise.
* @retval Result::Success when succeed, Result::NonSupport unsupported value, Result::FailedAllocation otherwise.
*
* @since 0.11
*/
@ -1056,7 +1056,7 @@ public:
* @param[in] b The blue color channel value in the range [0 ~ 255]. The default value is 0.
* @param[in] a The alpha channel value in the range [0 ~ 255], where 0 is completely transparent and 255 is opaque. The default value is 0.
*
* @return Result::Success when succeed.
* @retval Result::Success when succeed.
*
* @note Either a solid color or a gradient fill is applied, depending on what was set as last.
* @note ClipPath won't use the fill values. (see: enum class CompositeMethod::ClipPath)
@ -1070,7 +1070,7 @@ public:
*
* @param[in] f The unique pointer to the gradient fill.
*
* @return Result::Success when succeed, Result::MemoryCorruption otherwise.
* @retval Result::Success when succeed, Result::MemoryCorruption otherwise.
*
* @note Either a solid color or a gradient fill is applied, depending on what was set as last.
*/
@ -1081,7 +1081,7 @@ public:
*
* @param[in] r The fill rule value. The default value is @c FillRule::Winding.
*
* @return Result::Success when succeed.
* @retval Result::Success when succeed.
*/
Result fill(FillRule r) noexcept;
@ -1091,7 +1091,7 @@ public:
*
* @param[in] strokeFirst If @c true the stroke is rendered before the fill, otherwise the stroke is rendered as the second one (the default option).
*
* @return Result::Success when succeed, Result::FailedAllocation otherwise.
* @retval Result::Success when succeed, Result::FailedAllocation otherwise.
*
* @since 0.10
*/
@ -1157,7 +1157,7 @@ public:
* @param[out] b The blue color channel value in the range [0 ~ 255].
* @param[out] a The alpha channel value in the range [0 ~ 255], where 0 is completely transparent and 255 is opaque.
*
* @return Result::Success when succeed, Result::InsufficientCondition otherwise.
* @retval Result::Success when succeed, Result::InsufficientCondition otherwise.
*/
Result strokeColor(uint8_t* r, uint8_t* g, uint8_t* b, uint8_t* a = nullptr) const noexcept;
@ -1296,7 +1296,7 @@ public:
* @param[in] w A new width of the image in pixels.
* @param[in] h A new height of the image in pixels.
*
* @return Result::Success when succeed, Result::InsufficientCondition otherwise.
* @retval Result::Success when succeed, Result::InsufficientCondition otherwise.
*/
Result size(float w, float h) noexcept;
@ -1306,7 +1306,7 @@ public:
* @param[out] w The width of the image in pixels.
* @param[out] h The height of the image in pixels.
*
* @return Result::Success when succeed.
* @retval Result::Success when succeed.
*/
Result size(float* w, float* h) const noexcept;
@ -1356,7 +1356,7 @@ public:
*
* @param[out] triangles Optional. A pointer to the array of Polygons used by this mesh.
*
* @return uint32_t The number of polygons in the array.
* @return The number of polygons in the array.
*
* @note Modifying the triangles returned by this method will modify them directly within the mesh.
* @warning Please do not use it, this API is not official one. It could be modified in the next version.
@ -1410,7 +1410,7 @@ public:
*
* @param[in] paint A Paint object to be drawn.
*
* @return Result::Success when succeed, Result::MemoryCorruption otherwise.
* @retval Result::Success when succeed, Result::MemoryCorruption otherwise.
*
* @note The rendering order of the paints is the same as the order as they were pushed. Consider sorting the paints before pushing them if you intend to use layering.
* @see Scene::paints()
@ -1450,7 +1450,7 @@ public:
*
* @param[in] free If @c true, the memory occupied by paints is deallocated, otherwise it is not.
*
* @return Result::Success when succeed
* @retval Result::Success when succeed
*
* @warning If you don't free the paints they become dangled. They are supposed to be reused, otherwise you are responsible for their lives. Thus please use the @p free argument only when you know how it works, otherwise it's not recommended.
*
@ -1847,11 +1847,11 @@ public:
* @param[in] quality The encoded quality level. @c 0 is the minimum, @c 100 is the maximum value(recommended).
* @param[in] fps The desired frames per second (FPS). For example, to encode data at 60 FPS, pass 60. Pass 0 to keep the original frame data.
*
* @return Result::Success if the export succeeds.
* @return Result::InsufficientCondition if there are ongoing resource-saving operations.
* @return Result::NonSupport if an attempt is made to save the file with an unknown extension or in an unsupported format.
* @return Result::MemoryCorruption in case of an internal error.
* @return Result::Unknown if attempting to save an empty paint.
* @retval Result::Success if the export succeeds.
* @retval Result::InsufficientCondition if there are ongoing resource-saving operations.
* @retval Result::NonSupport if an attempt is made to save the file with an unknown extension or in an unsupported format.
* @retval Result::MemoryCorruption in case of an internal error.
* @retval Result::Unknown if attempting to save an empty paint.
*
* @note A higher frames per second (FPS) would result in a larger file size. It is recommended to use the default value.
* @note Saving can be asynchronous if the assigned thread number is greater than zero. To guarantee the saving is done, call sync() afterwards.