Skip to main content

OH_Drawing_PathAddRect

Function OH_Drawing_PathAddRect 

Source
pub unsafe extern "C" fn OH_Drawing_PathAddRect(
    path: *mut OH_Drawing_Path,
    left: f32,
    top: f32,
    right: f32,
    bottom: f32,
    pathDirection: OH_Drawing_PathDirection,
)
Expand description

@brief Adds a rectangle to a path in the specified direction. The start point is the upper left corner of the rectangle. This API may return an error code. For details, call {@link OH_Drawing_ErrorCodeGet}. If path is NULL, OH_DRAWING_ERROR_INVALID_PARAMETER is returned. If pathDirection is not set to one of the enumerated values, OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE is returned.

@param path Pointer to the {@link OH_Drawing_Path} object. @param left X coordinate of the upper left corner of the rectangle. @param top Y coordinate of the upper left corner of the rectangle. @param right X coordinate of the lower right corner of the rectangle. @param bottom Y coordinate of the lower right corner of the rectangle. @param pathDirection {@link OH_Drawing_PathDirection} object. @since 12 @version 1.0