mirror of
https://gitee.com/openharmony/interface_sdk_c
synced 2024-11-23 06:39:54 +00:00
commit
99452ae1a2
@ -13,9 +13,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef C_INCLUDE_DRAWING_BITMAP_H
|
||||
#define C_INCLUDE_DRAWING_BITMAP_H
|
||||
|
||||
/**
|
||||
* @addtogroup Drawing
|
||||
* @{
|
||||
@ -40,6 +37,9 @@
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
#ifndef C_INCLUDE_DRAWING_BITMAP_H
|
||||
#define C_INCLUDE_DRAWING_BITMAP_H
|
||||
|
||||
#include "drawing_types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
@ -73,114 +73,114 @@ OH_Drawing_Bitmap* OH_Drawing_BitmapCreate(void);
|
||||
* @brief Destroys an <b>OH_Drawing_Bitmap</b> object and reclaims the memory occupied by the object.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Bitmap Indicates the pointer to an <b>OH_Drawing_Bitmap</b> object.
|
||||
* @param bitmap Indicates the pointer to an <b>OH_Drawing_Bitmap</b> object.
|
||||
* @since 8
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_BitmapDestroy(OH_Drawing_Bitmap*);
|
||||
void OH_Drawing_BitmapDestroy(OH_Drawing_Bitmap* bitmap);
|
||||
|
||||
/**
|
||||
* @brief Creates an <b>OH_Drawing_Bitmap</b> object with <b>OH_Drawing_Image_Info</b> object
|
||||
* and sets the mem address or pixel storage.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Image_Info Indicates the pointer to an <b>OH_Drawing_Image_Info</b> object.
|
||||
* @param imageInfo Indicates the pointer to an <b>OH_Drawing_Image_Info</b> object.
|
||||
* @param pixels the pointer to memory address or pixel storage.
|
||||
* @param rowBytes size of pixel row or larger.
|
||||
* @return Returns the pointer to the <b>OH_Drawing_Bitmap</b> object created.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
OH_Drawing_Bitmap* OH_Drawing_BitmapCreateFromPixels(OH_Drawing_Image_Info*, void* pixels, uint32_t rowBytes);
|
||||
OH_Drawing_Bitmap* OH_Drawing_BitmapCreateFromPixels(OH_Drawing_Image_Info* imageInfo, void* pixels, uint32_t rowBytes);
|
||||
|
||||
/**
|
||||
* @brief Initializes the width and height of an <b>OH_Drawing_Bitmap</b> object
|
||||
* and sets the pixel format for the bitmap.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Bitmap Indicates the pointer to an <b>OH_Drawing_Bitmap</b> object.
|
||||
* @param bitmap Indicates the pointer to an <b>OH_Drawing_Bitmap</b> object.
|
||||
* @param width Indicates the width of the bitmap to be initialized.
|
||||
* @param height Indicates the height of the bitmap to be initialized.
|
||||
* @param OH_Drawing_BitmapFormat Indicates the pixel format of the bitmap to be initialized,
|
||||
* @param bitmapFormat Indicates the pixel format of the bitmap to be initialized,
|
||||
* including the pixel color type and alpha type.
|
||||
* @since 8
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_BitmapBuild(
|
||||
OH_Drawing_Bitmap*, const uint32_t width, const uint32_t height, const OH_Drawing_BitmapFormat*);
|
||||
void OH_Drawing_BitmapBuild(OH_Drawing_Bitmap* bitmap,
|
||||
const uint32_t width, const uint32_t height, const OH_Drawing_BitmapFormat* bitmapFormat);
|
||||
|
||||
/**
|
||||
* @brief Obtains the width of a bitmap.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Bitmap Indicates the pointer to an <b>OH_Drawing_Bitmap</b> object.
|
||||
* @param bitmap Indicates the pointer to an <b>OH_Drawing_Bitmap</b> object.
|
||||
* @return Returns the width.
|
||||
* @since 8
|
||||
* @version 1.0
|
||||
*/
|
||||
uint32_t OH_Drawing_BitmapGetWidth(OH_Drawing_Bitmap*);
|
||||
uint32_t OH_Drawing_BitmapGetWidth(OH_Drawing_Bitmap* bitmap);
|
||||
|
||||
/**
|
||||
* @brief Obtains the height of a bitmap.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Bitmap Indicates the pointer to an <b>OH_Drawing_Bitmap</b> object.
|
||||
* @param bitmap Indicates the pointer to an <b>OH_Drawing_Bitmap</b> object.
|
||||
* @return Returns the height.
|
||||
* @since 8
|
||||
* @version 1.0
|
||||
*/
|
||||
uint32_t OH_Drawing_BitmapGetHeight(OH_Drawing_Bitmap*);
|
||||
uint32_t OH_Drawing_BitmapGetHeight(OH_Drawing_Bitmap* bitmap);
|
||||
|
||||
/**
|
||||
* @brief Obtains the color format of a bitmap.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Bitmap Indicates the pointer to an <b>OH_Drawing_Bitmap</b> object.
|
||||
* @param bitmap Indicates the pointer to an <b>OH_Drawing_Bitmap</b> object.
|
||||
* @return Returns the bitmap color format.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
OH_Drawing_ColorFormat OH_Drawing_BitmapGetColorFormat(OH_Drawing_Bitmap*);
|
||||
OH_Drawing_ColorFormat OH_Drawing_BitmapGetColorFormat(OH_Drawing_Bitmap* bitmap);
|
||||
|
||||
/**
|
||||
* @brief Obtains the alpha format of a bitmap.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Bitmap Indicates the pointer to an <b>OH_Drawing_Bitmap</b> object.
|
||||
* @param bitmap Indicates the pointer to an <b>OH_Drawing_Bitmap</b> object.
|
||||
* @return Returns the bitmap alpha format.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
OH_Drawing_AlphaFormat OH_Drawing_BitmapGetAlphaFormat(OH_Drawing_Bitmap*);
|
||||
OH_Drawing_AlphaFormat OH_Drawing_BitmapGetAlphaFormat(OH_Drawing_Bitmap* bitmap);
|
||||
|
||||
/**
|
||||
* @brief Obtains the pixel address of a bitmap. You can use this address to obtain the pixel data of the bitmap.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Bitmap Indicates the pointer to an <b>OH_Drawing_Bitmap</b> object.
|
||||
* @param bitmap Indicates the pointer to an <b>OH_Drawing_Bitmap</b> object.
|
||||
* @return Returns the pixel address.
|
||||
* @since 8
|
||||
* @version 1.0
|
||||
*/
|
||||
void* OH_Drawing_BitmapGetPixels(OH_Drawing_Bitmap*);
|
||||
void* OH_Drawing_BitmapGetPixels(OH_Drawing_Bitmap* bitmap);
|
||||
|
||||
/**
|
||||
* @brief Gets the image info.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Bitmap Indicates the pointer to an <b>OH_Drawing_Bitmap</b> object.
|
||||
* @param OH_Drawing_Image_Info Indicates the pointer to an <b>OH_Drawing_Image_Info</b> object.
|
||||
* @param bitmap Indicates the pointer to an <b>OH_Drawing_Bitmap</b> object.
|
||||
* @param imageInfo Indicates the pointer to an <b>OH_Drawing_Image_Info</b> object.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_BitmapGetImageInfo(OH_Drawing_Bitmap*, OH_Drawing_Image_Info*);
|
||||
void OH_Drawing_BitmapGetImageInfo(OH_Drawing_Bitmap* bitmap, OH_Drawing_Image_Info* imageInfo);
|
||||
|
||||
/**
|
||||
* @brief Copies a rect of pixels from bitmap to dstPixels. Copy starts at (srcX, srcY),
|
||||
* and does not exceed bitmap width and height.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Bitmap Indicates the pointer to an <b>OH_Drawing_Bitmap</b> object.
|
||||
* @param bitmap Indicates the pointer to an <b>OH_Drawing_Bitmap</b> object.
|
||||
* @param dstInfo Indicates the pointer to an <b>OH_Drawing_Image_Info</b> object.
|
||||
* @param dstPixels Destination pixel storage.
|
||||
* @param dstRowBytes Destination row length.
|
||||
@ -190,7 +190,7 @@ void OH_Drawing_BitmapGetImageInfo(OH_Drawing_Bitmap*, OH_Drawing_Image_Info*);
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
bool OH_Drawing_BitmapReadPixels(OH_Drawing_Bitmap*, const OH_Drawing_Image_Info* dstInfo,
|
||||
bool OH_Drawing_BitmapReadPixels(OH_Drawing_Bitmap* bitmap, const OH_Drawing_Image_Info* dstInfo,
|
||||
void* dstPixels, size_t dstRowBytes, int32_t srcX, int32_t srcY);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -13,9 +13,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef C_INCLUDE_DRAWING_BRUSH_H
|
||||
#define C_INCLUDE_DRAWING_BRUSH_H
|
||||
|
||||
/**
|
||||
* @addtogroup Drawing
|
||||
* @{
|
||||
@ -40,6 +37,9 @@
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
#ifndef C_INCLUDE_DRAWING_BRUSH_H
|
||||
#define C_INCLUDE_DRAWING_BRUSH_H
|
||||
|
||||
#include "drawing_types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
@ -60,158 +60,158 @@ OH_Drawing_Brush* OH_Drawing_BrushCreate(void);
|
||||
* @brief Creates an <b>OH_Drawing_Brush</b> copy object.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Brush Indicates the pointer to an <b>OH_Drawing_Brush</b> object.
|
||||
* @param brush Indicates the pointer to an <b>OH_Drawing_Brush</b> object.
|
||||
* @return Returns the pointer to the <b>OH_Drawing_Brush</b> object created.
|
||||
* If nullptr is returned, the creation fails.
|
||||
* The possible cause of the failure is that the available memory is empty or a nullptr is passed.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
OH_Drawing_Brush* OH_Drawing_BrushCopy(OH_Drawing_Brush*);
|
||||
OH_Drawing_Brush* OH_Drawing_BrushCopy(OH_Drawing_Brush* brush);
|
||||
|
||||
/**
|
||||
* @brief Destroys an <b>OH_Drawing_Brush</b> object and reclaims the memory occupied by the object.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Brush Indicates the pointer to an <b>OH_Drawing_Brush</b> object.
|
||||
* @param brush Indicates the pointer to an <b>OH_Drawing_Brush</b> object.
|
||||
* @since 8
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_BrushDestroy(OH_Drawing_Brush*);
|
||||
void OH_Drawing_BrushDestroy(OH_Drawing_Brush* brush);
|
||||
|
||||
/**
|
||||
* @brief Checks whether anti-aliasing is enabled for a brush. If anti-aliasing is enabled,
|
||||
* edges will be drawn with partial transparency.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Brush Indicates the pointer to an <b>OH_Drawing_Brush</b> object.
|
||||
* @param brush Indicates the pointer to an <b>OH_Drawing_Brush</b> object.
|
||||
* @return Returns <b>true</b> if anti-aliasing is enabled; returns <b>false</b> otherwise.
|
||||
* @since 8
|
||||
* @version 1.0
|
||||
*/
|
||||
bool OH_Drawing_BrushIsAntiAlias(const OH_Drawing_Brush*);
|
||||
bool OH_Drawing_BrushIsAntiAlias(const OH_Drawing_Brush* brush);
|
||||
|
||||
/**
|
||||
* @brief Enables or disables anti-aliasing for a brush. If anti-aliasing is enabled,
|
||||
* edges will be drawn with partial transparency.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Brush Indicates the pointer to an <b>OH_Drawing_Brush</b> object.
|
||||
* @param bool Specifies whether to enable anti-aliasing. The value <b>true</b> means
|
||||
* @param brush Indicates the pointer to an <b>OH_Drawing_Brush</b> object.
|
||||
* @param antiAlias Specifies whether to enable anti-aliasing. The value <b>true</b> means
|
||||
* to enable anti-aliasing, and <b>false</b> means the opposite.
|
||||
* @since 8
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_BrushSetAntiAlias(OH_Drawing_Brush*, bool);
|
||||
void OH_Drawing_BrushSetAntiAlias(OH_Drawing_Brush* brush, bool antiAlias);
|
||||
|
||||
/**
|
||||
* @brief Obtains the color of a brush. The color is used by the brush to fill in a shape.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Brush Indicates the pointer to an <b>OH_Drawing_Brush</b> object.
|
||||
* @param brush Indicates the pointer to an <b>OH_Drawing_Brush</b> object.
|
||||
* @return Returns a 32-bit (ARGB) variable that describes the color.
|
||||
* @since 8
|
||||
* @version 1.0
|
||||
*/
|
||||
uint32_t OH_Drawing_BrushGetColor(const OH_Drawing_Brush*);
|
||||
uint32_t OH_Drawing_BrushGetColor(const OH_Drawing_Brush* brush);
|
||||
|
||||
/**
|
||||
* @brief Sets the color for a brush. The color will be used by the brush to fill in a shape.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Brush Indicates the pointer to an <b>OH_Drawing_Brush</b> object.
|
||||
* @param brush Indicates the pointer to an <b>OH_Drawing_Brush</b> object.
|
||||
* @param color Indicates the color to set, which is a 32-bit (ARGB) variable.
|
||||
* @since 8
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_BrushSetColor(OH_Drawing_Brush*, uint32_t color);
|
||||
void OH_Drawing_BrushSetColor(OH_Drawing_Brush* brush, uint32_t color);
|
||||
|
||||
/**
|
||||
* @brief Obtains the alpha of a brush. The alpha is used by the brush to fill in a shape.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Brush Indicates the pointer to an <b>OH_Drawing_Brush</b> object.
|
||||
* @param brush Indicates the pointer to an <b>OH_Drawing_Brush</b> object.
|
||||
* @return Returns a 8-bit variable that describes the alpha.
|
||||
* @since 11
|
||||
* @version 1.0
|
||||
*/
|
||||
uint8_t OH_Drawing_BrushGetAlpha(const OH_Drawing_Brush*);
|
||||
uint8_t OH_Drawing_BrushGetAlpha(const OH_Drawing_Brush* brush);
|
||||
|
||||
/**
|
||||
* @brief Sets the alpha for a brush. The alpha will be used by the brush to fill in a shape.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Brush Indicates the pointer to an <b>OH_Drawing_Brush</b> object.
|
||||
* @param brush Indicates the pointer to an <b>OH_Drawing_Brush</b> object.
|
||||
* @param alpha Indicates the alpha to set, which is a 8-bit variable.
|
||||
* @since 11
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_BrushSetAlpha(OH_Drawing_Brush*, uint8_t alpha);
|
||||
void OH_Drawing_BrushSetAlpha(OH_Drawing_Brush* brush, uint8_t alpha);
|
||||
|
||||
/**
|
||||
* @brief Sets the shaderEffect for a brush.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Brush Indicates the pointer to an <b>OH_Drawing_Brush</b> object.
|
||||
* @param OH_Drawing_ShaderEffect Indicates the pointer to an <b>OH_Drawing_ShaderEffect</b> object.
|
||||
* @param brush Indicates the pointer to an <b>OH_Drawing_Brush</b> object.
|
||||
* @param shaderEffect Indicates the pointer to an <b>OH_Drawing_ShaderEffect</b> object.
|
||||
* @since 11
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_BrushSetShaderEffect(OH_Drawing_Brush*, OH_Drawing_ShaderEffect*);
|
||||
void OH_Drawing_BrushSetShaderEffect(OH_Drawing_Brush* brush, OH_Drawing_ShaderEffect* shaderEffect);
|
||||
|
||||
/**
|
||||
* @brief Sets the shadowLayer for a brush.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Brush Indicates the pointer to an <b>OH_Drawing_Brush</b> object.
|
||||
* @param OH_Drawing_ShadowLayer Indicates the pointer to an <b>OH_Drawing_ShadowLayer</b> object.
|
||||
* @param brush Indicates the pointer to an <b>OH_Drawing_Brush</b> object.
|
||||
* @param shadowLayer Indicates the pointer to an <b>OH_Drawing_ShadowLayer</b> object.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_BrushSetShadowLayer(OH_Drawing_Brush*, OH_Drawing_ShadowLayer*);
|
||||
void OH_Drawing_BrushSetShadowLayer(OH_Drawing_Brush* brush, OH_Drawing_ShadowLayer* shadowLayer);
|
||||
|
||||
/**
|
||||
* @brief Sets the filter for a brush.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Brush Indicates the pointer to an <b>OH_Drawing_Brush</b> object.
|
||||
* @param OH_Drawing_Filter Indicates the pointer to an <b>OH_Drawing_Filter</b> object.
|
||||
* @param brush Indicates the pointer to an <b>OH_Drawing_Brush</b> object.
|
||||
* @param filter Indicates the pointer to an <b>OH_Drawing_Filter</b> object.
|
||||
* @since 11
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_BrushSetFilter(OH_Drawing_Brush*, OH_Drawing_Filter*);
|
||||
void OH_Drawing_BrushSetFilter(OH_Drawing_Brush* brush, OH_Drawing_Filter* filter);
|
||||
|
||||
/**
|
||||
* @brief Gets the filter from a brush.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Brush Indicates the pointer to an <b>OH_Drawing_Brush</b> object.
|
||||
* @param OH_Drawing_Filter Indicates the pointer to an <b>OH_Drawing_Filter</b> object.
|
||||
* @param brush Indicates the pointer to an <b>OH_Drawing_Brush</b> object.
|
||||
* @param filter Indicates the pointer to an <b>OH_Drawing_Filter</b> object.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_BrushGetFilter(OH_Drawing_Brush*, OH_Drawing_Filter*);
|
||||
void OH_Drawing_BrushGetFilter(OH_Drawing_Brush* brush, OH_Drawing_Filter* filter);
|
||||
|
||||
/**
|
||||
* @brief Sets a blender that implements the specified blendmode enum for a brush.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Pen Indicates the pointer to an <b>OH_Drawing_Brush</b> object.
|
||||
* @param OH_Drawing_BlendMode Indicates the blend mode.
|
||||
* @param brush Indicates the pointer to an <b>OH_Drawing_Brush</b> object.
|
||||
* @param blendMode Indicates the blend mode.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_BrushSetBlendMode(OH_Drawing_Brush*, OH_Drawing_BlendMode);
|
||||
void OH_Drawing_BrushSetBlendMode(OH_Drawing_Brush* brush, OH_Drawing_BlendMode blendMode);
|
||||
|
||||
/**
|
||||
* @brief Resets all brush contents to their initial values.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Brush Indicates the pointer to an <b>OH_Drawing_Brush</b> object.
|
||||
* @param brush Indicates the pointer to an <b>OH_Drawing_Brush</b> object.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_BrushReset(OH_Drawing_Brush*);
|
||||
void OH_Drawing_BrushReset(OH_Drawing_Brush* brush);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -13,9 +13,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef C_INCLUDE_DRAWING_H
|
||||
#define C_INCLUDE_DRAWING_H
|
||||
|
||||
/**
|
||||
* @addtogroup Drawing
|
||||
* @{
|
||||
@ -40,6 +37,9 @@
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
#ifndef C_INCLUDE_DRAWING_H
|
||||
#define C_INCLUDE_DRAWING_H
|
||||
|
||||
#include "drawing_error_code.h"
|
||||
#include "drawing_types.h"
|
||||
|
||||
@ -78,128 +78,128 @@ OH_Drawing_Canvas* OH_Drawing_CanvasCreate(void);
|
||||
* @brief Destroys an <b>OH_Drawing_Canvas</b> object and reclaims the memory occupied by the object.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @since 8
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_CanvasDestroy(OH_Drawing_Canvas*);
|
||||
void OH_Drawing_CanvasDestroy(OH_Drawing_Canvas* canvas);
|
||||
|
||||
/**
|
||||
* @brief Binds a bitmap to a canvas so that the content drawn on the canvas
|
||||
* is output to the bitmap (this process is called CPU rendering).
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @param OH_Drawing_Bitmap Indicates the pointer to an <b>OH_Drawing_Bitmap</b> object.
|
||||
* @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @param bitmap Indicates the pointer to an <b>OH_Drawing_Bitmap</b> object.
|
||||
* @since 8
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_CanvasBind(OH_Drawing_Canvas*, OH_Drawing_Bitmap*);
|
||||
void OH_Drawing_CanvasBind(OH_Drawing_Canvas* canvas, OH_Drawing_Bitmap* bitmap);
|
||||
|
||||
/**
|
||||
* @brief Attaches a pen to a canvas so that the canvas will use the style and color of the pen to outline a shape.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @param OH_Drawing_Pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.
|
||||
* @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.
|
||||
* @since 8
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_CanvasAttachPen(OH_Drawing_Canvas*, const OH_Drawing_Pen*);
|
||||
void OH_Drawing_CanvasAttachPen(OH_Drawing_Canvas* canvas, const OH_Drawing_Pen* pen);
|
||||
|
||||
/**
|
||||
* @brief Detaches the pen from a canvas so that the canvas will not use the style
|
||||
* and color of the pen to outline a shape.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @since 8
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_CanvasDetachPen(OH_Drawing_Canvas*);
|
||||
void OH_Drawing_CanvasDetachPen(OH_Drawing_Canvas* canvas);
|
||||
|
||||
/**
|
||||
* @brief Attaches a brush to a canvas so that the canvas will use the style and color of the brush to fill in a shape.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @param OH_Drawing_Brush Indicates the pointer to an <b>OH_Drawing_Brush</b> object.
|
||||
* @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @param brush Indicates the pointer to an <b>OH_Drawing_Brush</b> object.
|
||||
* @since 8
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_CanvasAttachBrush(OH_Drawing_Canvas*, const OH_Drawing_Brush*);
|
||||
void OH_Drawing_CanvasAttachBrush(OH_Drawing_Canvas* canvas, const OH_Drawing_Brush* brush);
|
||||
|
||||
/**
|
||||
* @brief Detaches the brush from a canvas so that the canvas will not use the style
|
||||
* and color of the brush to fill in a shape.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @since 8
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_CanvasDetachBrush(OH_Drawing_Canvas*);
|
||||
void OH_Drawing_CanvasDetachBrush(OH_Drawing_Canvas* canvas);
|
||||
|
||||
/**
|
||||
* @brief Saves the current canvas status (canvas matrix) to the top of the stack.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @since 8
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_CanvasSave(OH_Drawing_Canvas*);
|
||||
void OH_Drawing_CanvasSave(OH_Drawing_Canvas* canvas);
|
||||
|
||||
/**
|
||||
* @brief Saves matrix and clip, and allocates a bitmap for subsequent drawing.
|
||||
* Calling restore discards changes to matrix and clip, and draws the bitmap.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @param OH_Drawing_Rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.
|
||||
* @param OH_Drawing_Brush Indicates the pointer to an <b>OH_Drawing_Brush</b> object.
|
||||
* @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.
|
||||
* @param brush Indicates the pointer to an <b>OH_Drawing_Brush</b> object.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_CanvasSaveLayer(OH_Drawing_Canvas*, const OH_Drawing_Rect*, const OH_Drawing_Brush*);
|
||||
void OH_Drawing_CanvasSaveLayer(OH_Drawing_Canvas* canvas, const OH_Drawing_Rect* rect, const OH_Drawing_Brush* brush);
|
||||
|
||||
/**
|
||||
* @brief Restores the canvas status (canvas matrix) saved on the top of the stack.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @since 8
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_CanvasRestore(OH_Drawing_Canvas*);
|
||||
void OH_Drawing_CanvasRestore(OH_Drawing_Canvas* canvas);
|
||||
|
||||
/**
|
||||
* @brief Gets the number of the canvas status (canvas matrix) saved in the stack.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @return Returns a 32-bit variable that describes the number of canvas status.
|
||||
* @since 11
|
||||
* @version 1.0
|
||||
*/
|
||||
uint32_t OH_Drawing_CanvasGetSaveCount(OH_Drawing_Canvas*);
|
||||
uint32_t OH_Drawing_CanvasGetSaveCount(OH_Drawing_Canvas* canvas);
|
||||
|
||||
/**
|
||||
* @brief Restores the specific number of the canvas status (canvas matrix) saved in the stack.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @param saveCount Indicates the specific number of canvas status.
|
||||
* @since 11
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_CanvasRestoreToCount(OH_Drawing_Canvas*, uint32_t saveCount);
|
||||
void OH_Drawing_CanvasRestoreToCount(OH_Drawing_Canvas* canvas, uint32_t saveCount);
|
||||
|
||||
/**
|
||||
* @brief Draws a line segment.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @param x1 Indicates the x coordinate of the start point of the line segment.
|
||||
* @param y1 Indicates the y coordinate of the start point of the line segment.
|
||||
* @param x2 Indicates the x coordinate of the end point of the line segment.
|
||||
@ -207,55 +207,55 @@ void OH_Drawing_CanvasRestoreToCount(OH_Drawing_Canvas*, uint32_t saveCount);
|
||||
* @since 8
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_CanvasDrawLine(OH_Drawing_Canvas*, float x1, float y1, float x2, float y2);
|
||||
void OH_Drawing_CanvasDrawLine(OH_Drawing_Canvas* canvas, float x1, float y1, float x2, float y2);
|
||||
|
||||
/**
|
||||
* @brief Draws a path.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @param OH_Drawing_Path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
|
||||
* @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
|
||||
* @since 8
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_CanvasDrawPath(OH_Drawing_Canvas*, const OH_Drawing_Path*);
|
||||
void OH_Drawing_CanvasDrawPath(OH_Drawing_Canvas* canvas, const OH_Drawing_Path* path);
|
||||
|
||||
/**
|
||||
* @brief Draw the specified area of the Media::PixelMap to the specified area of the canvas.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @param OH_Drawing_PixelMap Indicates the pointer to an <b>OH_Drawing_PixelMap</b> object.
|
||||
* @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @param pixelMap Indicates the pointer to an <b>OH_Drawing_PixelMap</b> object.
|
||||
* @param src the area of source pixelmap.
|
||||
* @param dst the area of destination canvas.
|
||||
* @param OH_Drawing_SamplingOptions the sampling mode.
|
||||
* @param samplingOptions the sampling mode.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_CanvasDrawPixelMapRect(OH_Drawing_Canvas*, OH_Drawing_PixelMap*, const OH_Drawing_Rect* src,
|
||||
const OH_Drawing_Rect* dst, const OH_Drawing_SamplingOptions*);
|
||||
void OH_Drawing_CanvasDrawPixelMapRect(OH_Drawing_Canvas* canvas, OH_Drawing_PixelMap* pixelMap,
|
||||
const OH_Drawing_Rect* src, const OH_Drawing_Rect* dst, const OH_Drawing_SamplingOptions* samplingOptions);
|
||||
|
||||
/**
|
||||
* @brief Fills clipped canvas area with brush.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @param OH_Drawing_Brush Indicates the pointer to an <b>OH_Drawing_Brush</b> object.
|
||||
* @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @param brush Indicates the pointer to an <b>OH_Drawing_Brush</b> object.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_CanvasDrawBackground(OH_Drawing_Canvas*, const OH_Drawing_Brush*);
|
||||
void OH_Drawing_CanvasDrawBackground(OH_Drawing_Canvas* canvas, const OH_Drawing_Brush* brush);
|
||||
|
||||
/**
|
||||
* @brief Draws region using clip, matrix and paint.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @param OH_Drawing_Region Indicates the pointer to an <b>OH_Drawing_Region</b> object.
|
||||
* @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @param region Indicates the pointer to an <b>OH_Drawing_Region</b> object.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_CanvasDrawRegion(OH_Drawing_Canvas*, const OH_Drawing_Region*);
|
||||
void OH_Drawing_CanvasDrawRegion(OH_Drawing_Canvas* canvas, const OH_Drawing_Region* region);
|
||||
|
||||
/**
|
||||
* @brief Enumerates of scale to fit flags, selects if an array of points are drawn as discrete points, as lines,
|
||||
@ -297,66 +297,66 @@ OH_Drawing_ErrorCode OH_Drawing_CanvasDrawPoint(OH_Drawing_Canvas* canvas, const
|
||||
* @brief Draws point array as separate point, line segment or open polygon according to given point mode.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @param mode Draw points enum.
|
||||
* @param count The point count.
|
||||
* @param OH_Drawing_Point2D Point struct array.
|
||||
* @param point2D Point struct array.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_CanvasDrawPoints(OH_Drawing_Canvas*, OH_Drawing_PointMode mode,
|
||||
uint32_t count, const OH_Drawing_Point2D*);
|
||||
void OH_Drawing_CanvasDrawPoints(OH_Drawing_Canvas* canvas, OH_Drawing_PointMode mode,
|
||||
uint32_t count, const OH_Drawing_Point2D* point2D);
|
||||
|
||||
/**
|
||||
* @brief Draws a bitmap.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @param OH_Drawing_Bitmap Indicates the pointer to an <b>OH_Drawing_Bitmap</b> object.
|
||||
* @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @param bitmap Indicates the pointer to an <b>OH_Drawing_Bitmap</b> object.
|
||||
* @param left Indicates the left position of the <b>OH_Drawing_Bitmap</b>.
|
||||
* @param top Indicates the top position of the <b>OH_Drawing_Bitmap</b>.
|
||||
* @since 11
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_CanvasDrawBitmap(OH_Drawing_Canvas*, const OH_Drawing_Bitmap*, float left, float top);
|
||||
void OH_Drawing_CanvasDrawBitmap(OH_Drawing_Canvas* canvas, const OH_Drawing_Bitmap* bitmap, float left, float top);
|
||||
|
||||
/**
|
||||
* @brief Draw the specified area of the bitmap to the specified area of the canvas.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @param OH_Drawing_Bitmap Indicates the pointer to an <b>OH_Drawing_Bitmap</b> object.
|
||||
* @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @param bitmap Indicates the pointer to an <b>OH_Drawing_Bitmap</b> object.
|
||||
* @param src the area of source bitmap, can be nullptr.
|
||||
* @param dst the area of destination canvas.
|
||||
* @param OH_Drawing_SamplingOptions the sampling mode.
|
||||
* @param samplingOptions the sampling mode.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_CanvasDrawBitmapRect(OH_Drawing_Canvas*, const OH_Drawing_Bitmap*, const OH_Drawing_Rect* src,
|
||||
const OH_Drawing_Rect* dst, const OH_Drawing_SamplingOptions*);
|
||||
void OH_Drawing_CanvasDrawBitmapRect(OH_Drawing_Canvas* canvas, const OH_Drawing_Bitmap* bitmap,
|
||||
const OH_Drawing_Rect* src, const OH_Drawing_Rect* dst, const OH_Drawing_SamplingOptions* samplingOptions);
|
||||
|
||||
/**
|
||||
* @brief Draws a rect.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @param OH_Drawing_Rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.
|
||||
* @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.
|
||||
* @since 11
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_CanvasDrawRect(OH_Drawing_Canvas*, const OH_Drawing_Rect*);
|
||||
void OH_Drawing_CanvasDrawRect(OH_Drawing_Canvas* canvas, const OH_Drawing_Rect* rect);
|
||||
|
||||
/**
|
||||
* @brief Draws a circle.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @param OH_Drawing_Point Indicates the pointer to an <b>OH_Drawing_Point</b> object.
|
||||
* @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @param point Indicates the pointer to an <b>OH_Drawing_Point</b> object.
|
||||
* @param radius Indicates the radius of the circle.
|
||||
* @since 11
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_CanvasDrawCircle(OH_Drawing_Canvas*, const OH_Drawing_Point*, float radius);
|
||||
void OH_Drawing_CanvasDrawCircle(OH_Drawing_Canvas* canvas, const OH_Drawing_Point* point, float radius);
|
||||
|
||||
/**
|
||||
* @brief Fills the entire canvas with the specified color and blend mode.
|
||||
@ -378,44 +378,45 @@ OH_Drawing_ErrorCode OH_Drawing_CanvasDrawColor(OH_Drawing_Canvas* canvas, uint3
|
||||
* @brief Draws an oval.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @param OH_Drawing_Rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.
|
||||
* @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.
|
||||
* @since 11
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_CanvasDrawOval(OH_Drawing_Canvas*, const OH_Drawing_Rect*);
|
||||
void OH_Drawing_CanvasDrawOval(OH_Drawing_Canvas* canvas, const OH_Drawing_Rect* rect);
|
||||
|
||||
/**
|
||||
* @brief Draws an arc.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @param OH_Drawing_Rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.
|
||||
* @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.
|
||||
* @param startAngle Indicates the startAngle of the arc.
|
||||
* @param sweepAngle Indicates the sweepAngle of the arc.
|
||||
* @since 11
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_CanvasDrawArc(OH_Drawing_Canvas*, const OH_Drawing_Rect*, float startAngle, float sweepAngle);
|
||||
void OH_Drawing_CanvasDrawArc(OH_Drawing_Canvas* canvas,
|
||||
const OH_Drawing_Rect* rect, float startAngle, float sweepAngle);
|
||||
|
||||
/**
|
||||
* @brief Draws a roundrect.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @param OH_Drawing_RoundRect Indicates the pointer to an <b>OH_Drawing_RoundRect</b> object.
|
||||
* @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @param roundRect Indicates the pointer to an <b>OH_Drawing_RoundRect</b> object.
|
||||
* @since 11
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_CanvasDrawRoundRect(OH_Drawing_Canvas*, const OH_Drawing_RoundRect*);
|
||||
void OH_Drawing_CanvasDrawRoundRect(OH_Drawing_Canvas* canvas, const OH_Drawing_RoundRect* roundRect);
|
||||
|
||||
/**
|
||||
* @brief Draws a single character.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @param str Indicates the single character encoded in UTF-8.
|
||||
* @param OH_Drawing_Font Indicates the pointer to an <b>OH_Drawing_Font</b> object.
|
||||
* @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.
|
||||
* @param x Indicates the horizontal offset applied to the single character.
|
||||
* @param y Indicates the vertical offset applied to the single character.
|
||||
* @return Returns the error code.
|
||||
@ -432,14 +433,14 @@ OH_Drawing_ErrorCode OH_Drawing_CanvasDrawSingleCharacter(OH_Drawing_Canvas* can
|
||||
* @brief Draws a textblob.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @param OH_Drawing_TextBlob Indicates the pointer to an <b>OH_Drawing_TextBlob</b> object.
|
||||
* @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @param textBlob Indicates the pointer to an <b>OH_Drawing_TextBlob</b> object.
|
||||
* @param x Indicates the horizontal offset applied to blob.
|
||||
* @param y Indicates the vertical offset applied to blob.
|
||||
* @since 11
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_CanvasDrawTextBlob(OH_Drawing_Canvas*, const OH_Drawing_TextBlob*, float x, float y);
|
||||
void OH_Drawing_CanvasDrawTextBlob(OH_Drawing_Canvas* canvas, const OH_Drawing_TextBlob* textBlob, float x, float y);
|
||||
|
||||
/**
|
||||
* @brief Enumerates clip op.
|
||||
@ -462,42 +463,42 @@ typedef enum {
|
||||
* @brief Clip a rect.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @param OH_Drawing_Rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.
|
||||
* @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.
|
||||
* @param clipOp Indicates the operation to apply to clip.
|
||||
* @param doAntiAlias Indicates whether clip operation requires anti-aliased.
|
||||
* @since 11
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_CanvasClipRect(OH_Drawing_Canvas*, const OH_Drawing_Rect*,
|
||||
void OH_Drawing_CanvasClipRect(OH_Drawing_Canvas* canvas, const OH_Drawing_Rect* rect,
|
||||
OH_Drawing_CanvasClipOp clipOp, bool doAntiAlias);
|
||||
|
||||
/**
|
||||
* @brief Clip a round rect.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @param OH_Drawing_RoundRect Indicates the pointer to an <b>OH_Drawing_RoundRect</b> object.
|
||||
* @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @param roundRect Indicates the pointer to an <b>OH_Drawing_RoundRect</b> object.
|
||||
* @param clipOp Indicates the operation to apply to clip.
|
||||
* @param doAntiAlias Indicates whether clip operation requires anti-aliased.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_CanvasClipRoundRect(OH_Drawing_Canvas*, const OH_Drawing_RoundRect*,
|
||||
void OH_Drawing_CanvasClipRoundRect(OH_Drawing_Canvas* canvas, const OH_Drawing_RoundRect* roundRect,
|
||||
OH_Drawing_CanvasClipOp clipOp, bool doAntiAlias);
|
||||
|
||||
/**
|
||||
* @brief Clip a path.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @param OH_Drawing_Path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
|
||||
* @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
|
||||
* @param clipOp Indicates the operation to apply to clip.
|
||||
* @param doAntiAlias Indicates whether clip operation requires anti-aliased.
|
||||
* @since 11
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_CanvasClipPath(OH_Drawing_Canvas*, const OH_Drawing_Path*,
|
||||
void OH_Drawing_CanvasClipPath(OH_Drawing_Canvas* canvas, const OH_Drawing_Path* path,
|
||||
OH_Drawing_CanvasClipOp clipOp, bool doAntiAlias);
|
||||
|
||||
/**
|
||||
@ -520,104 +521,104 @@ OH_Drawing_ErrorCode OH_Drawing_CanvasClipRegion(OH_Drawing_Canvas* canvas, cons
|
||||
* @brief Rotates by degrees. Positive degrees rotates clockwise.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @param degrees Indicates the amount to rotate, in degrees.
|
||||
* @param px Indicates the x-axis value of the point to rotate about.
|
||||
* @param py Indicates the y-axis value of the point to rotate about.
|
||||
* @since 11
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_CanvasRotate(OH_Drawing_Canvas*, float degrees, float px, float py);
|
||||
void OH_Drawing_CanvasRotate(OH_Drawing_Canvas* canvas, float degrees, float px, float py);
|
||||
|
||||
/**
|
||||
* @brief Translates by dx along the x-axis and dy along the y-axis.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @param dx Indicates the distance to translate on x-axis.
|
||||
* @param dy Indicates the distance to translate on y-axis.
|
||||
* @since 11
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_CanvasTranslate(OH_Drawing_Canvas*, float dx, float dy);
|
||||
void OH_Drawing_CanvasTranslate(OH_Drawing_Canvas* canvas, float dx, float dy);
|
||||
|
||||
/**
|
||||
* @brief Scales by sx on the x-axis and sy on the y-axis.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @param sx Indicates the amount to scale on x-axis.
|
||||
* @param sy Indicates the amount to scale on y-axis.
|
||||
* @since 11
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_CanvasScale(OH_Drawing_Canvas*, float sx, float sy);
|
||||
void OH_Drawing_CanvasScale(OH_Drawing_Canvas* canvas, float sx, float sy);
|
||||
|
||||
/**
|
||||
* @brief Skew by sx on the x-axis and sy on the y-axis.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @param sx Indicates the amount to skew on x-axis.
|
||||
* @param sy Indicates the amount to skew on y-axis.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_CanvasSkew(OH_Drawing_Canvas*, float sx, float sy);
|
||||
void OH_Drawing_CanvasSkew(OH_Drawing_Canvas* canvas, float sx, float sy);
|
||||
|
||||
/**
|
||||
* @brief Get the width of a canvas.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
int32_t OH_Drawing_CanvasGetWidth(OH_Drawing_Canvas*);
|
||||
int32_t OH_Drawing_CanvasGetWidth(OH_Drawing_Canvas* canvas);
|
||||
|
||||
/**
|
||||
* @brief Get the height of a canvas.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
int32_t OH_Drawing_CanvasGetHeight(OH_Drawing_Canvas*);
|
||||
int32_t OH_Drawing_CanvasGetHeight(OH_Drawing_Canvas* canvas);
|
||||
|
||||
/**
|
||||
* @brief Get the bounds of clip of a canvas.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @param OH_Drawing_Rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.
|
||||
* @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_CanvasGetLocalClipBounds(OH_Drawing_Canvas*, OH_Drawing_Rect*);
|
||||
void OH_Drawing_CanvasGetLocalClipBounds(OH_Drawing_Canvas* canvas, OH_Drawing_Rect* rect);
|
||||
|
||||
/**
|
||||
* @brief Get a 3x3 matrix of the transform from local coordinates to 'device'.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @param OH_Drawing_Matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.
|
||||
* @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_CanvasGetTotalMatrix(OH_Drawing_Canvas*, OH_Drawing_Matrix*);
|
||||
void OH_Drawing_CanvasGetTotalMatrix(OH_Drawing_Canvas* canvas, OH_Drawing_Matrix* matrix);
|
||||
|
||||
/**
|
||||
* @brief Use the passed matrix to transforming the geometry, then use existing matrix.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @param OH_Drawing_Matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object,
|
||||
* @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object,
|
||||
* represents the matrix which is passed.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_CanvasConcatMatrix(OH_Drawing_Canvas*, OH_Drawing_Matrix*);
|
||||
void OH_Drawing_CanvasConcatMatrix(OH_Drawing_Canvas* canvas, OH_Drawing_Matrix* matrix);
|
||||
|
||||
/**
|
||||
* @brief Enumerates of shadow flags.
|
||||
@ -648,8 +649,8 @@ typedef enum {
|
||||
* @brief Use circular light to draw an offset spot shadow and outlining ambient shadow for the given path.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @param OH_Drawing_Path Indicates the pointer to an <b>OH_Drawing_Path</b> object, use to generate shadows.
|
||||
* @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object, use to generate shadows.
|
||||
* @param planeParams Represents the value of the function which returns Z offset of the occluder from the
|
||||
* canvas based on x and y.
|
||||
* @param devLightPos Represents the position of the light relative to the canvas.
|
||||
@ -660,7 +661,7 @@ typedef enum {
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_CanvasDrawShadow(OH_Drawing_Canvas*, OH_Drawing_Path*, OH_Drawing_Point3D planeParams,
|
||||
void OH_Drawing_CanvasDrawShadow(OH_Drawing_Canvas* canvas, OH_Drawing_Path* path, OH_Drawing_Point3D planeParams,
|
||||
OH_Drawing_Point3D devLightPos, float lightRadius, uint32_t ambientColor, uint32_t spotColor,
|
||||
OH_Drawing_CanvasShadowFlags flag);
|
||||
|
||||
@ -668,66 +669,66 @@ void OH_Drawing_CanvasDrawShadow(OH_Drawing_Canvas*, OH_Drawing_Path*, OH_Drawin
|
||||
* @brief Clears a canvas by using a specified color.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @param color Indicates the color, which is a 32-bit (ARGB) variable.
|
||||
* @since 8
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_CanvasClear(OH_Drawing_Canvas*, uint32_t color);
|
||||
void OH_Drawing_CanvasClear(OH_Drawing_Canvas* canvas, uint32_t color);
|
||||
|
||||
/**
|
||||
* @brief Sets matrix of canvas.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @param OH_Drawing_Matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.
|
||||
* @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_CanvasSetMatrix(OH_Drawing_Canvas*, OH_Drawing_Matrix*);
|
||||
void OH_Drawing_CanvasSetMatrix(OH_Drawing_Canvas* canvas, OH_Drawing_Matrix* matrix);
|
||||
|
||||
/**
|
||||
* @brief Reset matrix to the idenmtity matrix, any prior matrix state is overwritten.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_CanvasResetMatrix(OH_Drawing_Canvas*);
|
||||
void OH_Drawing_CanvasResetMatrix(OH_Drawing_Canvas* canvas);
|
||||
|
||||
/**
|
||||
* @brief Draws the specified source rectangle of the image onto the canvas,
|
||||
* scaled and translated to the destination rectangle.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @param OH_Drawing_Image Indicates the pointer to an <b>OH_Drawing_Image</b> object.
|
||||
* @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @param image Indicates the pointer to an <b>OH_Drawing_Image</b> object.
|
||||
* @param src The area of source image.
|
||||
* @param dst The area of destination canvas.
|
||||
* @param OH_Drawing_SamplingOptions Indicates the pointer to an <b>OH_Drawing_SamplingOptions</b> object.
|
||||
* @param OH_Drawing_SrcRectConstraint Constraint type.
|
||||
* @param samplingOptions Indicates the pointer to an <b>OH_Drawing_SamplingOptions</b> object.
|
||||
* @param srcRectConstraint Constraint type.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_CanvasDrawImageRectWithSrc(OH_Drawing_Canvas*, const OH_Drawing_Image*,
|
||||
const OH_Drawing_Rect* src, const OH_Drawing_Rect* dst, const OH_Drawing_SamplingOptions*,
|
||||
OH_Drawing_SrcRectConstraint);
|
||||
void OH_Drawing_CanvasDrawImageRectWithSrc(OH_Drawing_Canvas* canvas, const OH_Drawing_Image* image,
|
||||
const OH_Drawing_Rect* src, const OH_Drawing_Rect* dst, const OH_Drawing_SamplingOptions* samplingOptions,
|
||||
OH_Drawing_SrcRectConstraint srcRectConstraint);
|
||||
|
||||
/**
|
||||
* @brief Draws the specified source rectangle of the image onto the canvas,
|
||||
* scaled and translated to the destination rectangle.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @param OH_Drawing_Image Indicates the pointer to an <b>OH_Drawing_Image</b> object.
|
||||
* @param OH_Drawing_Rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.
|
||||
* @param OH_Drawing_SamplingOptions Indicates the pointer to an <b>OH_Drawing_SamplingOptions</b> object.
|
||||
* @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @param image Indicates the pointer to an <b>OH_Drawing_Image</b> object.
|
||||
* @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.
|
||||
* @param samplingOptions Indicates the pointer to an <b>OH_Drawing_SamplingOptions</b> object.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_CanvasDrawImageRect(OH_Drawing_Canvas*, OH_Drawing_Image*,
|
||||
OH_Drawing_Rect* dst, OH_Drawing_SamplingOptions*);
|
||||
void OH_Drawing_CanvasDrawImageRect(OH_Drawing_Canvas* canvas, OH_Drawing_Image* image,
|
||||
OH_Drawing_Rect* rect, OH_Drawing_SamplingOptions* samplingOptions);
|
||||
|
||||
/**
|
||||
* @brief Enumerates of vertices flags.
|
||||
@ -754,7 +755,7 @@ typedef enum {
|
||||
* @brief Draw a triangular mesh with vertex descriptions.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @param vertexMmode Draw a set of vertices.
|
||||
* @param vertexCount Vertex count.
|
||||
* @param positions Positions data pointer.
|
||||
@ -762,10 +763,11 @@ typedef enum {
|
||||
* @param colors Color data pointer.
|
||||
* @param indexCount Index count.
|
||||
* @param indices Index data pointer.
|
||||
* @param mode Blend mode used for drawing.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_CanvasDrawVertices(OH_Drawing_Canvas*, OH_Drawing_VertexMode vertexMmode,
|
||||
void OH_Drawing_CanvasDrawVertices(OH_Drawing_Canvas* canvas, OH_Drawing_VertexMode vertexMmode,
|
||||
int32_t vertexCount, const OH_Drawing_Point2D* positions, const OH_Drawing_Point2D* texs,
|
||||
const uint32_t* colors, int32_t indexCount, const uint16_t* indices, OH_Drawing_BlendMode mode);
|
||||
|
||||
@ -773,8 +775,8 @@ void OH_Drawing_CanvasDrawVertices(OH_Drawing_Canvas*, OH_Drawing_VertexMode ver
|
||||
* @brief Read pixels data from canvas.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @param OH_Drawing_Image_Info width, height, colorType, and alphaType of dstPixels.
|
||||
* @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @param imageInfo width, height, colorType, and alphaType of dstPixels.
|
||||
* @param dstPixels destination pixel storage.
|
||||
* @param dstRowBytes size of one row of pixels.
|
||||
* @param srcX offset into canvas writable pixels on x-axis.
|
||||
@ -783,22 +785,23 @@ void OH_Drawing_CanvasDrawVertices(OH_Drawing_Canvas*, OH_Drawing_VertexMode ver
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
bool OH_Drawing_CanvasReadPixels(OH_Drawing_Canvas*, OH_Drawing_Image_Info*,
|
||||
bool OH_Drawing_CanvasReadPixels(OH_Drawing_Canvas* canvas, OH_Drawing_Image_Info* imageInfo,
|
||||
void* dstPixels, uint32_t dstRowBytes, int32_t srcX, int32_t srcY);
|
||||
|
||||
/**
|
||||
* @brief Read pixels data to a bitmap from canvas.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @param OH_Drawing_Bitmap Indicates the pointer to an <b>OH_Drawing_Bitmap</b> object.
|
||||
* @param canvas Indicates the pointer to an <b>OH_Drawing_Canvas</b> object.
|
||||
* @param bitmap Indicates the pointer to an <b>OH_Drawing_Bitmap</b> object.
|
||||
* @param srcX offset into canvas writable pixels on x-axis.
|
||||
* @param srcY offset into canvas writable pixels on y-axis.
|
||||
* @return true if pixels are copied to dstBitmap.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
bool OH_Drawing_CanvasReadPixelsToBitmap(OH_Drawing_Canvas*, OH_Drawing_Bitmap*, int32_t srcX, int32_t srcY);
|
||||
bool OH_Drawing_CanvasReadPixelsToBitmap(OH_Drawing_Canvas* canvas,
|
||||
OH_Drawing_Bitmap* bitmap, int32_t srcX, int32_t srcY);
|
||||
|
||||
/**
|
||||
* @brief Checks whether the drawable area is empty.
|
||||
|
@ -13,9 +13,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef C_INCLUDE_DRAWING_COLOR_H
|
||||
#define C_INCLUDE_DRAWING_COLOR_H
|
||||
|
||||
/**
|
||||
* @addtogroup Drawing
|
||||
* @{
|
||||
@ -40,6 +37,9 @@
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
#ifndef C_INCLUDE_DRAWING_COLOR_H
|
||||
#define C_INCLUDE_DRAWING_COLOR_H
|
||||
|
||||
#include "drawing_types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -13,9 +13,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef C_INCLUDE_DRAWING_COLOR_FILTER_H
|
||||
#define C_INCLUDE_DRAWING_COLOR_FILTER_H
|
||||
|
||||
/**
|
||||
* @addtogroup Drawing
|
||||
* @{
|
||||
@ -40,6 +37,9 @@
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
#ifndef C_INCLUDE_DRAWING_COLOR_FILTER_H
|
||||
#define C_INCLUDE_DRAWING_COLOR_FILTER_H
|
||||
|
||||
#include "drawing_types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
@ -51,25 +51,25 @@ extern "C" {
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param color Indicates the color, which is a 32-bit (ARGB) variable.
|
||||
* @param OH_Drawing_BlendMode Indicates the blend mode.
|
||||
* @param blendMode Indicates the blend mode.
|
||||
* @return Returns the pointer to the <b>OH_Drawing_ColorFilter</b> object created.
|
||||
* @since 11
|
||||
* @version 1.0
|
||||
*/
|
||||
OH_Drawing_ColorFilter* OH_Drawing_ColorFilterCreateBlendMode(uint32_t color, OH_Drawing_BlendMode);
|
||||
OH_Drawing_ColorFilter* OH_Drawing_ColorFilterCreateBlendMode(uint32_t color, OH_Drawing_BlendMode blendMode);
|
||||
|
||||
/**
|
||||
* @brief Creates an <b>OH_Drawing_ColorFilter</b> applies the colorFilter1 and then applies colorFilter2.
|
||||
* @brief Creates an <b>OH_Drawing_ColorFilter</b> applies the outerColorFilter and then applies innerColorFilter.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_ColorFilter Indicates the pointer to an <b>OH_Drawing_ColorFilter</b> object.
|
||||
* @param OH_Drawing_ColorFilter Indicates the pointer to an <b>OH_Drawing_ColorFilter</b> object.
|
||||
* @param outerColorFilter Indicates the pointer to an <b>OH_Drawing_ColorFilter</b> object.
|
||||
* @param innerColorFilter Indicates the pointer to an <b>OH_Drawing_ColorFilter</b> object.
|
||||
* @return Returns the pointer to the <b>OH_Drawing_ColorFilter</b> object created.
|
||||
* @since 11
|
||||
* @version 1.0
|
||||
*/
|
||||
OH_Drawing_ColorFilter* OH_Drawing_ColorFilterCreateCompose(OH_Drawing_ColorFilter* colorFilter1,
|
||||
OH_Drawing_ColorFilter* colorFilter2);
|
||||
OH_Drawing_ColorFilter* OH_Drawing_ColorFilterCreateCompose(OH_Drawing_ColorFilter* outerColorFilter,
|
||||
OH_Drawing_ColorFilter* innerColorFilter);
|
||||
|
||||
/**
|
||||
* @brief Creates an <b>OH_Drawing_ColorFilter</b> with a 5x4 color matrix.
|
||||
@ -117,11 +117,11 @@ OH_Drawing_ColorFilter* OH_Drawing_ColorFilterCreateLuma(void);
|
||||
* @brief Destroys an <b>OH_Drawing_ColorFilter</b> object and reclaims the memory occupied by the object.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_ColorFilter Indicates the pointer to an <b>OH_Drawing_ColorFilter</b> object.
|
||||
* @param colorFilter Indicates the pointer to an <b>OH_Drawing_ColorFilter</b> object.
|
||||
* @since 11
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_ColorFilterDestroy(OH_Drawing_ColorFilter*);
|
||||
void OH_Drawing_ColorFilterDestroy(OH_Drawing_ColorFilter* colorFilter);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -13,9 +13,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef C_INCLUDE_DRAWING_COLOR_SPACE_H
|
||||
#define C_INCLUDE_DRAWING_COLOR_SPACE_H
|
||||
|
||||
/**
|
||||
* @addtogroup Drawing
|
||||
* @{
|
||||
@ -40,6 +37,9 @@
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
#ifndef C_INCLUDE_DRAWING_COLOR_SPACE_H
|
||||
#define C_INCLUDE_DRAWING_COLOR_SPACE_H
|
||||
|
||||
#include "drawing_types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
@ -70,11 +70,11 @@ OH_Drawing_ColorSpace* OH_Drawing_ColorSpaceCreateSrgbLinear(void);
|
||||
* @brief Destroy an <b>OH_Drawing_ColorSpace</b> object.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_ColorSpace Indicates the pointer to an <b>OH_Drawing_ColorSpace</b> object.
|
||||
* @param colorSpace Indicates the pointer to an <b>OH_Drawing_ColorSpace</b> object.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_ColorSpaceDestroy(OH_Drawing_ColorSpace*);
|
||||
void OH_Drawing_ColorSpaceDestroy(OH_Drawing_ColorSpace* colorSpace);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -13,9 +13,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef C_INCLUDE_DRAWING_ERROR_CODE_H
|
||||
#define C_INCLUDE_DRAWING_ERROR_CODE_H
|
||||
|
||||
/**
|
||||
* @addtogroup Drawing
|
||||
* @{
|
||||
@ -40,6 +37,9 @@
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
#ifndef C_INCLUDE_DRAWING_ERROR_CODE_H
|
||||
#define C_INCLUDE_DRAWING_ERROR_CODE_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
@ -13,9 +13,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef C_INCLUDE_DRAWING_FILTER_H
|
||||
#define C_INCLUDE_DRAWING_FILTER_H
|
||||
|
||||
/**
|
||||
* @addtogroup Drawing
|
||||
* @{
|
||||
@ -40,6 +37,9 @@
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
#ifndef C_INCLUDE_DRAWING_FILTER_H
|
||||
#define C_INCLUDE_DRAWING_FILTER_H
|
||||
|
||||
#include "drawing_types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
@ -60,55 +60,55 @@ OH_Drawing_Filter* OH_Drawing_FilterCreate(void);
|
||||
* @brief Sets an <b>OH_Drawing_ImageFilter</b> object for an <b>OH_Drawing_Filter</b> object.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Filter Indicates the pointer to an <b>OH_Drawing_Filter</b> object.
|
||||
* @param OH_Drawing_ImageFilter Indicates the pointer to an <b>OH_Drawing_ImageFilter</b> object.
|
||||
* @param filter Indicates the pointer to an <b>OH_Drawing_Filter</b> object.
|
||||
* @param imageFilter Indicates the pointer to an <b>OH_Drawing_ImageFilter</b> object.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_FilterSetImageFilter(OH_Drawing_Filter*, OH_Drawing_ImageFilter*);
|
||||
void OH_Drawing_FilterSetImageFilter(OH_Drawing_Filter* filter, OH_Drawing_ImageFilter* imageFilter);
|
||||
|
||||
/**
|
||||
* @brief Sets an <b>OH_Drawing_MaskFilter</b> object for an <b>OH_Drawing_Filter</b> object.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Filter Indicates the pointer to an <b>OH_Drawing_Filter</b> object.
|
||||
* @param OH_Drawing_MaskFilter Indicates the pointer to an <b>OH_Drawing_MaskFilter</b> object.
|
||||
* @param filter Indicates the pointer to an <b>OH_Drawing_Filter</b> object.
|
||||
* @param maskFilter Indicates the pointer to an <b>OH_Drawing_MaskFilter</b> object.
|
||||
* @since 11
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_FilterSetMaskFilter(OH_Drawing_Filter*, OH_Drawing_MaskFilter*);
|
||||
void OH_Drawing_FilterSetMaskFilter(OH_Drawing_Filter* filter, OH_Drawing_MaskFilter* maskFilter);
|
||||
|
||||
/**
|
||||
* @brief Sets an <b>OH_Drawing_ColorFilter</b> object for an <b>OH_Drawing_Filter</b> object.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Filter Indicates the pointer to an <b>OH_Drawing_Filter</b> object.
|
||||
* @param OH_Drawing_ColorFilter Indicates the pointer to an <b>OH_Drawing_ColorFilter</b> object.
|
||||
* @param filter Indicates the pointer to an <b>OH_Drawing_Filter</b> object.
|
||||
* @param colorFilter Indicates the pointer to an <b>OH_Drawing_ColorFilter</b> object.
|
||||
* @since 11
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_FilterSetColorFilter(OH_Drawing_Filter*, OH_Drawing_ColorFilter*);
|
||||
void OH_Drawing_FilterSetColorFilter(OH_Drawing_Filter* filter, OH_Drawing_ColorFilter* colorFilter);
|
||||
|
||||
/**
|
||||
* @brief Gets an <b>OH_Drawing_ColorFilter</b> object from an <b>OH_Drawing_Filter</b> object.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Filter Indicates the pointer to an <b>OH_Drawing_Filter</b> object.
|
||||
* @param OH_Drawing_ColorFilter Indicates the pointer to an <b>OH_Drawing_ColorFilter</b> object.
|
||||
* @param filter Indicates the pointer to an <b>OH_Drawing_Filter</b> object.
|
||||
* @param colorFilter Indicates the pointer to an <b>OH_Drawing_ColorFilter</b> object.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_FilterGetColorFilter(OH_Drawing_Filter*, OH_Drawing_ColorFilter*);
|
||||
void OH_Drawing_FilterGetColorFilter(OH_Drawing_Filter* filter, OH_Drawing_ColorFilter* colorFilter);
|
||||
|
||||
/**
|
||||
* @brief Destroys an <b>OH_Drawing_Filter</b> object and reclaims the memory occupied by the object.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Filter Indicates the pointer to an <b>OH_Drawing_Filter</b> object.
|
||||
* @param filter Indicates the pointer to an <b>OH_Drawing_Filter</b> object.
|
||||
* @since 11
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_FilterDestroy(OH_Drawing_Filter*);
|
||||
void OH_Drawing_FilterDestroy(OH_Drawing_Filter* filter);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -13,9 +13,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef C_INCLUDE_DRAWING_FONT_H
|
||||
#define C_INCLUDE_DRAWING_FONT_H
|
||||
|
||||
/**
|
||||
* @addtogroup Drawing
|
||||
* @{
|
||||
@ -40,6 +37,9 @@
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
#ifndef C_INCLUDE_DRAWING_FONT_H
|
||||
#define C_INCLUDE_DRAWING_FONT_H
|
||||
|
||||
#include "drawing_error_code.h"
|
||||
#include "drawing_types.h"
|
||||
|
||||
@ -93,131 +93,131 @@ typedef enum {
|
||||
* @brief Sets whether the font baselines and pixels alignment when the transformation matrix is axis aligned.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Font Indicates the pointer to an <b>OH_Drawing_Font</b> object.
|
||||
* @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.
|
||||
* @param baselineSnap Indicates whether the font baselines and pixels alignment.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_FontSetBaselineSnap(OH_Drawing_Font*, bool baselineSnap);
|
||||
void OH_Drawing_FontSetBaselineSnap(OH_Drawing_Font* font, bool baselineSnap);
|
||||
|
||||
/**
|
||||
* @brief Gets whether the font baselines and pixels alignment when the transformation matrix is axis aligned.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Font Indicates the pointer to an <b>OH_Drawing_Font</b> object.
|
||||
* @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.
|
||||
* @return Returns <b>true</b> if the font baselines and pixels alignment; returns <b>false</b> otherwise.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
bool OH_Drawing_FontIsBaselineSnap(const OH_Drawing_Font*);
|
||||
bool OH_Drawing_FontIsBaselineSnap(const OH_Drawing_Font* font);
|
||||
|
||||
/**
|
||||
* @brief Sets whether the font uses sub-pixel rendering.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Font Indicates the pointer to an <b>OH_Drawing_Font</b> object.
|
||||
* @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.
|
||||
* @param isSubpixel Indicates whether the font uses sub-pixel rendering.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_FontSetSubpixel(OH_Drawing_Font*, bool isSubpixel);
|
||||
void OH_Drawing_FontSetSubpixel(OH_Drawing_Font* font, bool isSubpixel);
|
||||
|
||||
/**
|
||||
* @brief Gets whether the font uses sub-pixel rendering.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Font Indicates the pointer to an <b>OH_Drawing_Font</b> object.
|
||||
* @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.
|
||||
* @return Returns <b>true</b> if the font uses sub-pixel rendering; returns <b>false</b> otherwise.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
bool OH_Drawing_FontIsSubpixel(const OH_Drawing_Font*);
|
||||
bool OH_Drawing_FontIsSubpixel(const OH_Drawing_Font* font);
|
||||
|
||||
/**
|
||||
* @brief Sets whether the font outline is automatically adjusted.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Font Indicates the pointer to an <b>OH_Drawing_Font</b> object.
|
||||
* @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.
|
||||
* @param isForceAutoHinting Indicates whether the font outline is automatically adjusted.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_FontSetForceAutoHinting(OH_Drawing_Font*, bool isForceAutoHinting);
|
||||
void OH_Drawing_FontSetForceAutoHinting(OH_Drawing_Font* font, bool isForceAutoHinting);
|
||||
|
||||
/**
|
||||
* @brief Gets whether the font outline is automatically adjusted.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Font Indicates the pointer to an <b>OH_Drawing_Font</b> object.
|
||||
* @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.
|
||||
* @return Returns <b>true</b> if the font outline is automatically adjusted; returns <b>false</b> otherwise.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
bool OH_Drawing_FontIsForceAutoHinting(const OH_Drawing_Font*);
|
||||
bool OH_Drawing_FontIsForceAutoHinting(const OH_Drawing_Font* font);
|
||||
|
||||
/**
|
||||
* @brief Sets an <b>OH_Drawing_Typeface</b> object for an <b>OH_Drawing_Font</b> object.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Font Indicates the pointer to an <b>OH_Drawing_Font</b> object.
|
||||
* @param OH_Drawing_Typeface Indicates the pointer to an <b>OH_Drawing_Typeface</b> object.
|
||||
* @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.
|
||||
* @param typeface Indicates the pointer to an <b>OH_Drawing_Typeface</b> object.
|
||||
* @since 11
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_FontSetTypeface(OH_Drawing_Font*, OH_Drawing_Typeface*);
|
||||
void OH_Drawing_FontSetTypeface(OH_Drawing_Font* font, OH_Drawing_Typeface* typeface);
|
||||
|
||||
/**
|
||||
* @brief Gets an <b>OH_Drawing_Typeface</b> object from the <b>OH_Drawing_Typeface</b> object.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Font Indicates the pointer to an <b>OH_Drawing_Font</b> object.
|
||||
* @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.
|
||||
* @return OH_Drawing_Typeface Indicates the pointer to an <b>OH_Drawing_Typeface</b> object.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
OH_Drawing_Typeface* OH_Drawing_FontGetTypeface(OH_Drawing_Font*);
|
||||
OH_Drawing_Typeface* OH_Drawing_FontGetTypeface(OH_Drawing_Font* font);
|
||||
|
||||
/**
|
||||
* @brief Sets text size for an <b>OH_Drawing_Font</b> object.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Font Indicates the pointer to an <b>OH_Drawing_Font</b> object.
|
||||
* @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.
|
||||
* @param textSize Indicates the text size.
|
||||
* @since 11
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_FontSetTextSize(OH_Drawing_Font*, float textSize);
|
||||
void OH_Drawing_FontSetTextSize(OH_Drawing_Font* font, float textSize);
|
||||
|
||||
/**
|
||||
* @brief Gets text size for an <b>OH_Drawing_Font</b> object.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Font Indicates the pointer to an <b>OH_Drawing_Font</b> object.
|
||||
* @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.
|
||||
* @return Returns the size of text.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
float OH_Drawing_FontGetTextSize(const OH_Drawing_Font*);
|
||||
float OH_Drawing_FontGetTextSize(const OH_Drawing_Font* font);
|
||||
|
||||
/**
|
||||
* @brief Calculate number of glyphs represented by text.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Font Indicates the pointer to an <b>OH_Drawing_Font</b> object.
|
||||
* @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.
|
||||
* @param text Indicates the character storage encoded with text encoding.
|
||||
* @param byteLength Indicates the text length in bytes.
|
||||
* @param encoding Indicates the text encoding.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
int OH_Drawing_FontCountText(OH_Drawing_Font*, const void* text, size_t byteLength,
|
||||
int OH_Drawing_FontCountText(OH_Drawing_Font* font, const void* text, size_t byteLength,
|
||||
OH_Drawing_TextEncoding encoding);
|
||||
|
||||
/**
|
||||
* @brief Converts text into glyph indices.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Font Indicates the pointer to an <b>OH_Drawing_Font</b> object.
|
||||
* @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.
|
||||
* @param text Indicates the character storage encoded with text encoding.
|
||||
* @param byteLength Indicates the text length in bytes.
|
||||
* @param encoding Indicates the text encoding.
|
||||
@ -227,21 +227,21 @@ int OH_Drawing_FontCountText(OH_Drawing_Font*, const void* text, size_t byteLeng
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
uint32_t OH_Drawing_FontTextToGlyphs(const OH_Drawing_Font*, const void* text, uint32_t byteLength,
|
||||
uint32_t OH_Drawing_FontTextToGlyphs(const OH_Drawing_Font* font, const void* text, uint32_t byteLength,
|
||||
OH_Drawing_TextEncoding encoding, uint16_t* glyphs, int maxGlyphCount);
|
||||
|
||||
/**
|
||||
* @brief Retrieves the advance for each glyph in glyphs.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Font Indicates the pointer to an <b>OH_Drawing_Font</b> object.
|
||||
* @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.
|
||||
* @param glyphs Indicates the array of glyph indices to be measured.
|
||||
* @param count Indicates the number of glyphs.
|
||||
* @param widths Indicates the text advances for each glyph returned to the caller.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_FontGetWidths(const OH_Drawing_Font*, const uint16_t* glyphs, int count, float* widths);
|
||||
void OH_Drawing_FontGetWidths(const OH_Drawing_Font* font, const uint16_t* glyphs, int count, float* widths);
|
||||
|
||||
/**
|
||||
* @brief Measures the width of a single character.
|
||||
@ -284,165 +284,165 @@ OH_Drawing_ErrorCode OH_Drawing_FontMeasureText(const OH_Drawing_Font* font, con
|
||||
* @brief Enables or disables linearly scalable font for an <b>OH_Drawing_Font</b> object.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Font Indicates the pointer to an <b>OH_Drawing_Font</b> object.
|
||||
* @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.
|
||||
* @param isLinearText Indicates whether to enable linearly scalable font.
|
||||
* @since 11
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_FontSetLinearText(OH_Drawing_Font*, bool isLinearText);
|
||||
void OH_Drawing_FontSetLinearText(OH_Drawing_Font* font, bool isLinearText);
|
||||
|
||||
/**
|
||||
* @brief Gets whether the font is linearly scalable.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Font Indicates the pointer to an <b>OH_Drawing_Font</b> object.
|
||||
* @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.
|
||||
* @return Returns <b>true</b> if the font is linearly scalable; returns <b>false</b> otherwise.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
bool OH_Drawing_FontIsLinearText(const OH_Drawing_Font*);
|
||||
bool OH_Drawing_FontIsLinearText(const OH_Drawing_Font* font);
|
||||
|
||||
/**
|
||||
* @brief Sets text skew on x-axis for an <b>OH_Drawing_Font</b> object.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Font Indicates the pointer to an <b>OH_Drawing_Font</b> object.
|
||||
* @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.
|
||||
* @param skewX Indicates the additional shear on x-axis relative to y-axis.
|
||||
* @since 11
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_FontSetTextSkewX(OH_Drawing_Font*, float skewX);
|
||||
void OH_Drawing_FontSetTextSkewX(OH_Drawing_Font* font, float skewX);
|
||||
|
||||
/**
|
||||
* @brief Gets text skew on x-axis for an <b>OH_Drawing_Font</b> object.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Font Indicates the pointer to an <b>OH_Drawing_Font</b> object.
|
||||
* @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.
|
||||
* @return Returns additional skew on x-axis relative to y-axis.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
float OH_Drawing_FontGetTextSkewX(const OH_Drawing_Font*);
|
||||
float OH_Drawing_FontGetTextSkewX(const OH_Drawing_Font* font);
|
||||
|
||||
/**
|
||||
* @brief Enables or disables to increase stroke width to approximate bold fonts for an <b>OH_Drawing_Font</b> object.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Font Indicates the pointer to an <b>OH_Drawing_Font</b> object.
|
||||
* @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.
|
||||
* @param isFakeBoldText Indicates whether to enable to increase stroke width.
|
||||
* @since 11
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_FontSetFakeBoldText(OH_Drawing_Font*, bool isFakeBoldText);
|
||||
void OH_Drawing_FontSetFakeBoldText(OH_Drawing_Font* font, bool isFakeBoldText);
|
||||
|
||||
/**
|
||||
* @brief Gets whether to increase the stroke width to approximate bold fonts.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Font Indicates the pointer to an <b>OH_Drawing_Font</b> object.
|
||||
* @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.
|
||||
* @return Returns <b>true</b> to increase the stroke width to approximate bold fonts; returns <b>false</b> otherwise.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
bool OH_Drawing_FontIsFakeBoldText(const OH_Drawing_Font*);
|
||||
bool OH_Drawing_FontIsFakeBoldText(const OH_Drawing_Font* font);
|
||||
|
||||
/**
|
||||
* @brief Sets text scale on x-axis for an <b>OH_Drawing_Font</b> object.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Font Indicates the pointer to an <b>OH_Drawing_Font</b> object.
|
||||
* @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.
|
||||
* @param scaleX Indicates the text horizontal scale.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_FontSetScaleX(OH_Drawing_Font*, float scaleX);
|
||||
void OH_Drawing_FontSetScaleX(OH_Drawing_Font* font, float scaleX);
|
||||
|
||||
/**
|
||||
* @brief Gets text scale on x-axis from an <b>OH_Drawing_Font</b> object.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Font Indicates the pointer to an <b>OH_Drawing_Font</b> object.
|
||||
* @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.
|
||||
* @return Returns text horizontal scale on x-axis.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
float OH_Drawing_FontGetScaleX(const OH_Drawing_Font*);
|
||||
float OH_Drawing_FontGetScaleX(const OH_Drawing_Font* font);
|
||||
|
||||
/**
|
||||
* @brief Sets hinting pattern for an <b>OH_Drawing_Font</b> object.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Font Indicates the pointer to an <b>OH_Drawing_Font</b> object.
|
||||
* @param OH_Drawing_FontHinting Indicates the font hinting pattern.
|
||||
* @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.
|
||||
* @param fontHinting Indicates the font hinting pattern.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_FontSetHinting(OH_Drawing_Font*, OH_Drawing_FontHinting);
|
||||
void OH_Drawing_FontSetHinting(OH_Drawing_Font* font, OH_Drawing_FontHinting fontHinting);
|
||||
|
||||
/**
|
||||
* @brief Gets hinting pattern from an <b>OH_Drawing_Font</b> object.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Font Indicates the pointer to an <b>OH_Drawing_Font</b> object.
|
||||
* @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.
|
||||
* @return Returns the font hinting pattern.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
OH_Drawing_FontHinting OH_Drawing_FontGetHinting(const OH_Drawing_Font*);
|
||||
OH_Drawing_FontHinting OH_Drawing_FontGetHinting(const OH_Drawing_Font* font);
|
||||
|
||||
/**
|
||||
* @brief Sets whether to use bitmaps instead of outlines in the <b>OH_Drawing_Font</b> object.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Font Indicates the pointer to an <b>OH_Drawing_Font</b> object.
|
||||
* @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.
|
||||
* @param isEmbeddedBitmaps Indicates whether to use bitmaps instead of outlines.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_FontSetEmbeddedBitmaps(OH_Drawing_Font*, bool isEmbeddedBitmaps);
|
||||
void OH_Drawing_FontSetEmbeddedBitmaps(OH_Drawing_Font* font, bool isEmbeddedBitmaps);
|
||||
|
||||
/**
|
||||
* @brief Gets whether to use bitmaps instead of outlines in the <b>OH_Drawing_Font</b> object.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Font Indicates the pointer to an <b>OH_Drawing_Font</b> object.
|
||||
* @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.
|
||||
* @return Returns <b>true</b> if using bitmaps instead of outlines; returns <b>false</b> otherwise.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
bool OH_Drawing_FontIsEmbeddedBitmaps(const OH_Drawing_Font*);
|
||||
bool OH_Drawing_FontIsEmbeddedBitmaps(const OH_Drawing_Font* font);
|
||||
|
||||
/**
|
||||
* @brief Sets the font edging effect for an <b>OH_Drawing_Font</b> object.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Font Indicates the pointer to an <b>OH_Drawing_Font</b> object.
|
||||
* @param OH_Drawing_FontEdging Indicates the font edging effect.
|
||||
* @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.
|
||||
* @param fontEdging Indicates the font edging effect.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_FontSetEdging(OH_Drawing_Font*, OH_Drawing_FontEdging);
|
||||
void OH_Drawing_FontSetEdging(OH_Drawing_Font* font, OH_Drawing_FontEdging fontEdging);
|
||||
|
||||
/**
|
||||
* @brief Gets the font edging effect from an <b>OH_Drawing_Font</b> object.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Font Indicates the pointer to an <b>OH_Drawing_Font</b> object.
|
||||
* @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.
|
||||
* @return Returns the font edging effect.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
OH_Drawing_FontEdging OH_Drawing_FontGetEdging(const OH_Drawing_Font*);
|
||||
OH_Drawing_FontEdging OH_Drawing_FontGetEdging(const OH_Drawing_Font* font);
|
||||
|
||||
/**
|
||||
* @brief Destroys an <b>OH_Drawing_Font</b> object and reclaims the memory occupied by the object.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Font Indicates the pointer to an <b>OH_Drawing_Font</b> object.
|
||||
* @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.
|
||||
* @since 11
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_FontDestroy(OH_Drawing_Font*);
|
||||
void OH_Drawing_FontDestroy(OH_Drawing_Font* font);
|
||||
|
||||
/**
|
||||
* @brief Defines a run, supplies storage for the metrics of an <b>OH_Drawing_Font</b>.
|
||||
@ -489,13 +489,13 @@ typedef struct OH_Drawing_Font_Metrics {
|
||||
* @brief Obtains the metrics of a font.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Font Indicates the pointer to an <b>OH_Drawing_Font</b> object.
|
||||
* @param OH_Drawing_Font_Metrics Indicates the pointer to an <b>OH_Drawing_Font_Metrics</b> object.
|
||||
* @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.
|
||||
* @param fontMetrics Indicates the pointer to an <b>OH_Drawing_Font_Metrics</b> object.
|
||||
* @return Returns a float variable that recommended spacing between lines.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
float OH_Drawing_FontGetMetrics(OH_Drawing_Font*, OH_Drawing_Font_Metrics*);
|
||||
float OH_Drawing_FontGetMetrics(OH_Drawing_Font* font, OH_Drawing_Font_Metrics* fontMetrics);
|
||||
|
||||
/**
|
||||
* @brief Retrieves the bound rect for each glyph in glyph array.
|
||||
|
@ -13,9 +13,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef C_INCLUDE_DRAWING_GPU_CONTEXT_H
|
||||
#define C_INCLUDE_DRAWING_GPU_CONTEXT_H
|
||||
|
||||
/**
|
||||
* @addtogroup Drawing
|
||||
* @{
|
||||
@ -40,6 +37,9 @@
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
#ifndef C_INCLUDE_DRAWING_GPU_CONTEXT_H
|
||||
#define C_INCLUDE_DRAWING_GPU_CONTEXT_H
|
||||
|
||||
#include "drawing_types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
@ -61,22 +61,22 @@ typedef struct {
|
||||
* @brief Creates an <b>OH_Drawing_GpuContext</b> object, whose GPU backend context is GL.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_GpuContextOptions Indicates the GPU context options.
|
||||
* @param gpuContextOptions Indicates the GPU context options.
|
||||
* @return Returns the pointer to the <b>OH_Drawing_GpuContext</b> object created.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
OH_Drawing_GpuContext* OH_Drawing_GpuContextCreateFromGL(OH_Drawing_GpuContextOptions);
|
||||
OH_Drawing_GpuContext* OH_Drawing_GpuContextCreateFromGL(OH_Drawing_GpuContextOptions gpuContextOptions);
|
||||
|
||||
/**
|
||||
* @brief Destroys an <b>OH_Drawing_GpuContext</b> object and reclaims the memory occupied by the object.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_GpuContext Indicates the pointer to an <b>OH_Drawing_GpuContext</b> object.
|
||||
* @param gpuContext Indicates the pointer to an <b>OH_Drawing_GpuContext</b> object.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_GpuContextDestroy(OH_Drawing_GpuContext*);
|
||||
void OH_Drawing_GpuContextDestroy(OH_Drawing_GpuContext* gpuContext);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -13,9 +13,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef C_INCLUDE_DRAWING_IMAGE_H
|
||||
#define C_INCLUDE_DRAWING_IMAGE_H
|
||||
|
||||
/**
|
||||
* @addtogroup Drawing
|
||||
* @{
|
||||
@ -40,6 +37,9 @@
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
#ifndef C_INCLUDE_DRAWING_IMAGE_H
|
||||
#define C_INCLUDE_DRAWING_IMAGE_H
|
||||
|
||||
#include "drawing_types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
@ -60,56 +60,56 @@ OH_Drawing_Image* OH_Drawing_ImageCreate(void);
|
||||
* @brief Destroys an <b>OH_Drawing_Image</b> object and reclaims the memory occupied by the object.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Image Indicates the pointer to an <b>OH_Drawing_Image</b> object.
|
||||
* @param image Indicates the pointer to an <b>OH_Drawing_Image</b> object.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_ImageDestroy(OH_Drawing_Image*);
|
||||
void OH_Drawing_ImageDestroy(OH_Drawing_Image* image);
|
||||
|
||||
/**
|
||||
* @brief Rebuilds an <b>OH_Drawing_Image</b> object, sharing or copying bitmap pixels.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Image Indicates the pointer to an <b>OH_Drawing_Image</b> object.
|
||||
* @param OH_Drawing_Bitmap Indicates the pointer to an <b>OH_Drawing_Bitmap</b> object.
|
||||
* @param image Indicates the pointer to an <b>OH_Drawing_Image</b> object.
|
||||
* @param bitmap Indicates the pointer to an <b>OH_Drawing_Bitmap</b> object.
|
||||
* @return Returns true if successed.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
bool OH_Drawing_ImageBuildFromBitmap(OH_Drawing_Image*, OH_Drawing_Bitmap*);
|
||||
bool OH_Drawing_ImageBuildFromBitmap(OH_Drawing_Image* image, OH_Drawing_Bitmap* bitmap);
|
||||
|
||||
/**
|
||||
* @brief Gets pixel count in each row of image.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Image Indicates the pointer to an <b>OH_Drawing_Image</b> object.
|
||||
* @param image Indicates the pointer to an <b>OH_Drawing_Image</b> object.
|
||||
* @return Returns the width.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
int32_t OH_Drawing_ImageGetWidth(OH_Drawing_Image*);
|
||||
int32_t OH_Drawing_ImageGetWidth(OH_Drawing_Image* image);
|
||||
|
||||
/**
|
||||
* @brief Gets pixel row count of image.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Image Indicates the pointer to an <b>OH_Drawing_Image</b> object.
|
||||
* @param image Indicates the pointer to an <b>OH_Drawing_Image</b> object.
|
||||
* @return Returns the height.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
int32_t OH_Drawing_ImageGetHeight(OH_Drawing_Image*);
|
||||
int32_t OH_Drawing_ImageGetHeight(OH_Drawing_Image* image);
|
||||
|
||||
/**
|
||||
* @brief Gets the image info.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Image Indicates the pointer to an <b>OH_Drawing_Image</b> object.
|
||||
* @param OH_Drawing_Image_Info Indicates the pointer to an <b>OH_Drawing_Image_Info</b> object.
|
||||
* @param image Indicates the pointer to an <b>OH_Drawing_Image</b> object.
|
||||
* @param imageInfo Indicates the pointer to an <b>OH_Drawing_Image_Info</b> object.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_ImageGetImageInfo(OH_Drawing_Image*, OH_Drawing_Image_Info*);
|
||||
void OH_Drawing_ImageGetImageInfo(OH_Drawing_Image* image, OH_Drawing_Image_Info* imageInfo);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -13,9 +13,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef C_INCLUDE_DRAWING_IMAGE_FILTER_H
|
||||
#define C_INCLUDE_DRAWING_IMAGE_FILTER_H
|
||||
|
||||
/**
|
||||
* @addtogroup Drawing
|
||||
* @{
|
||||
@ -40,6 +37,9 @@
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
#ifndef C_INCLUDE_DRAWING_IMAGE_FILTER_H
|
||||
#define C_INCLUDE_DRAWING_IMAGE_FILTER_H
|
||||
|
||||
#include "drawing_shader_effect.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
@ -52,23 +52,23 @@ extern "C" {
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param sigmaX Indicates the Gaussian sigma value for blurring along the x axis.
|
||||
* @param sigmaY Indicates the Gaussian sigma value for blurring along the y axis.
|
||||
* @param OH_Drawing_TileMode Indicates the tile mode applied at edges.
|
||||
* @param OH_Drawing_ImageFilter Indicates the input filter that is blurred, uses source bitmap if this is null.
|
||||
* @param tileMode Indicates the tile mode applied at edges.
|
||||
* @param imageFilter Indicates the input filter that is blurred, uses source bitmap if this is null.
|
||||
* @return Returns the pointer to the <b>OH_Drawing_ImageFilter</b> object created.
|
||||
* If nullptr is returned, the creation fails.
|
||||
* The possible cause of the failure is that the available memory is empty.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
OH_Drawing_ImageFilter* OH_Drawing_ImageFilterCreateBlur(float sigmaX, float sigmaY, OH_Drawing_TileMode,
|
||||
OH_Drawing_ImageFilter*);
|
||||
OH_Drawing_ImageFilter* OH_Drawing_ImageFilterCreateBlur(float sigmaX, float sigmaY, OH_Drawing_TileMode tileMode,
|
||||
OH_Drawing_ImageFilter* imageFilter);
|
||||
|
||||
/**
|
||||
* @brief Creates an <b>OH_Drawing_ImageFilter</b> object that applies the color filter to the input.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_ColorFilter Indicates the color filter that transforms the input image.
|
||||
* @param OH_Drawing_ImageFilter Indicates the input filter, or uses the source bitmap if this is null.
|
||||
* @param colorFilter Indicates the color filter that transforms the input image.
|
||||
* @param imageFilter Indicates the input filter, or uses the source bitmap if this is null.
|
||||
* @return Returns the pointer to the <b>OH_Drawing_ImageFilter</b> object created.
|
||||
* If nullptr is returned, the creation fails.
|
||||
* The possible cause of the failure is that the available memory is empty or
|
||||
@ -76,17 +76,18 @@ OH_Drawing_ImageFilter* OH_Drawing_ImageFilterCreateBlur(float sigmaX, float sig
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
OH_Drawing_ImageFilter* OH_Drawing_ImageFilterCreateFromColorFilter(OH_Drawing_ColorFilter*, OH_Drawing_ImageFilter*);
|
||||
OH_Drawing_ImageFilter* OH_Drawing_ImageFilterCreateFromColorFilter(OH_Drawing_ColorFilter* colorFilter,
|
||||
OH_Drawing_ImageFilter* imageFilter);
|
||||
|
||||
/**
|
||||
* @brief Destroys an <b>OH_Drawing_ImageFilter</b> object and reclaims the memory occupied by the object.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_ImageFilter Indicates the pointer to an <b>OH_Drawing_ImageFilter</b> object.
|
||||
* @param imageFilter Indicates the pointer to an <b>OH_Drawing_ImageFilter</b> object.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_ImageFilterDestroy(OH_Drawing_ImageFilter*);
|
||||
void OH_Drawing_ImageFilterDestroy(OH_Drawing_ImageFilter* imageFilter);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -13,9 +13,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef C_INCLUDE_DRAWING_MASK_FILTER_H
|
||||
#define C_INCLUDE_DRAWING_MASK_FILTER_H
|
||||
|
||||
/**
|
||||
* @addtogroup Drawing
|
||||
* @{
|
||||
@ -40,6 +37,9 @@
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
#ifndef C_INCLUDE_DRAWING_MASK_FILTER_H
|
||||
#define C_INCLUDE_DRAWING_MASK_FILTER_H
|
||||
|
||||
#include "drawing_types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
@ -88,11 +88,11 @@ OH_Drawing_MaskFilter* OH_Drawing_MaskFilterCreateBlur(OH_Drawing_BlurType blurT
|
||||
* @brief Destroys an <b>OH_Drawing_MaskFilter</b> object and reclaims the memory occupied by the object.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_MaskFilter Indicates the pointer to an <b>OH_Drawing_MaskFilter</b> object.
|
||||
* @param maskFilter Indicates the pointer to an <b>OH_Drawing_MaskFilter</b> object.
|
||||
* @since 11
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_MaskFilterDestroy(OH_Drawing_MaskFilter*);
|
||||
void OH_Drawing_MaskFilterDestroy(OH_Drawing_MaskFilter* maskFilter);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -13,9 +13,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef C_INCLUDE_DRAWING_MATRIX_H
|
||||
#define C_INCLUDE_DRAWING_MATRIX_H
|
||||
|
||||
/**
|
||||
* @addtogroup Drawing
|
||||
* @{
|
||||
@ -40,6 +37,9 @@
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
#ifndef C_INCLUDE_DRAWING_MATRIX_H
|
||||
#define C_INCLUDE_DRAWING_MATRIX_H
|
||||
|
||||
#include "drawing_error_code.h"
|
||||
#include "drawing_types.h"
|
||||
|
||||
@ -62,7 +62,6 @@ OH_Drawing_Matrix* OH_Drawing_MatrixCreate(void);
|
||||
* rotate by degrees about a pivot point at (px, py).
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.
|
||||
* @param deg angle of axes relative to upright axes
|
||||
* @param x pivot on x-axis.
|
||||
* @param y pivot on y-axis.
|
||||
@ -76,7 +75,6 @@ OH_Drawing_Matrix* OH_Drawing_MatrixCreateRotation(float deg, float x, float y);
|
||||
* by sx and sy, about a pivot point at (px, py).
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.
|
||||
* @param sx horizontal scale factor.
|
||||
* @param sy vertical scale factor.
|
||||
* @param px pivot on x-axis.
|
||||
@ -91,7 +89,6 @@ OH_Drawing_Matrix* OH_Drawing_MatrixCreateScale(float sx, float sy, float px, fl
|
||||
* @brief Creates an <b>OH_Drawing_Matrix</b> object with translation.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.
|
||||
* @param dx horizontal translation.
|
||||
* @param dy vertical translation.
|
||||
* @return Returns the pointer to the <b>OH_Drawing_Matrix</b> object created.
|
||||
@ -104,7 +101,7 @@ OH_Drawing_Matrix* OH_Drawing_MatrixCreateTranslation(float dx, float dy);
|
||||
* @brief Sets the params for a matrix.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.
|
||||
* @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.
|
||||
* @param scaleX horizontal scale factor to store
|
||||
* @param skewX horizontal skew factor to store
|
||||
* @param transX horizontal translation to store
|
||||
@ -117,7 +114,7 @@ OH_Drawing_Matrix* OH_Drawing_MatrixCreateTranslation(float dx, float dy);
|
||||
* @since 11
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_MatrixSetMatrix(OH_Drawing_Matrix*, float scaleX, float skewX, float transX,
|
||||
void OH_Drawing_MatrixSetMatrix(OH_Drawing_Matrix* matrix, float scaleX, float skewX, float transX,
|
||||
float skewY, float scaleY, float transY, float persp0, float persp1, float persp2);
|
||||
|
||||
/**
|
||||
@ -149,7 +146,7 @@ typedef enum {
|
||||
* @brief Sets matrix to scale and translate src rect to dst rect.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.
|
||||
* @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.
|
||||
* @param src Indicates the pointer to an <b>OH_Drawing_Rect</b> object rect to map from.
|
||||
* @param dst Indicates the pointer to an <b>OH_Drawing_Rect</b> object rect to map to.
|
||||
* @param stf Scales to fit enum method.
|
||||
@ -161,7 +158,7 @@ typedef enum {
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
bool OH_Drawing_MatrixSetRectToRect(OH_Drawing_Matrix*, const OH_Drawing_Rect* src,
|
||||
bool OH_Drawing_MatrixSetRectToRect(OH_Drawing_Matrix* matrix, const OH_Drawing_Rect* src,
|
||||
const OH_Drawing_Rect* dst, OH_Drawing_ScaleToFit stf);
|
||||
|
||||
/**
|
||||
@ -187,14 +184,14 @@ bool OH_Drawing_MatrixSetRectToRect(OH_Drawing_Matrix*, const OH_Drawing_Rect* s
|
||||
* | G H I | | 0 0 1 | | Gc+Hs -Gs+Hc G*dx+H*dy+I |
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.
|
||||
* @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.
|
||||
* @param degree Indicates the angle of axes relative to upright axes.
|
||||
* @param px Indicates the pivot on x-axis.
|
||||
* @param py Indicates the pivot on y-axis.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_MatrixPreRotate(OH_Drawing_Matrix*, float degree, float px, float py);
|
||||
void OH_Drawing_MatrixPreRotate(OH_Drawing_Matrix* matrix, float degree, float px, float py);
|
||||
|
||||
/**
|
||||
* @brief Sets matrix to forward scale by sx and sy, about a pivot point at (px, py).
|
||||
@ -216,7 +213,7 @@ void OH_Drawing_MatrixPreRotate(OH_Drawing_Matrix*, float degree, float px, floa
|
||||
* | G H I | | 0 0 1 | | G*sx H*sy G*dx+H*dy+I |
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.
|
||||
* @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.
|
||||
* @param sx Horizontal scale factor.
|
||||
* @param sy Vertical scale factor.
|
||||
* @param px Pivot on x-axis.
|
||||
@ -224,7 +221,7 @@ void OH_Drawing_MatrixPreRotate(OH_Drawing_Matrix*, float degree, float px, floa
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_MatrixPreScale(OH_Drawing_Matrix*, float sx, float sy, float px, float py);
|
||||
void OH_Drawing_MatrixPreScale(OH_Drawing_Matrix* matrix, float sx, float sy, float px, float py);
|
||||
|
||||
/**
|
||||
* @brief Sets forward matrix to translate by dx and dy.
|
||||
@ -238,13 +235,13 @@ void OH_Drawing_MatrixPreScale(OH_Drawing_Matrix*, float sx, float sy, float px,
|
||||
* | G H I | | 0 0 1 | | G H G*dx+H*dy+I |
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.
|
||||
* @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.
|
||||
* @param dx Indicates the horizontal translation.
|
||||
* @param dy Indicates the vertical translation.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_MatrixPreTranslate(OH_Drawing_Matrix*, float dx, float dy);
|
||||
void OH_Drawing_MatrixPreTranslate(OH_Drawing_Matrix* matrix, float dx, float dy);
|
||||
|
||||
/**
|
||||
* @brief Sets matrix to matrix constructed from rotating by degrees about pivot point(px, py),
|
||||
@ -269,14 +266,14 @@ void OH_Drawing_MatrixPreTranslate(OH_Drawing_Matrix*, float dx, float dy);
|
||||
* |0 0 1| |P Q R| | P Q R|
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.
|
||||
* @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.
|
||||
* @param degree Indicates the angle of axes relative to upright axes.
|
||||
* @param px Indicates the pivot on x-axis.
|
||||
* @param py Indicates the pivot on y-axis.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_MatrixPostRotate(OH_Drawing_Matrix*, float degree, float px, float py);
|
||||
void OH_Drawing_MatrixPostRotate(OH_Drawing_Matrix* matrix, float degree, float px, float py);
|
||||
|
||||
/**
|
||||
* @brief Sets matrix to backward scale by sx and sy, about a pivot point at (px, py).
|
||||
@ -293,7 +290,7 @@ void OH_Drawing_MatrixPostRotate(OH_Drawing_Matrix*, float degree, float px, flo
|
||||
* | 0 0 1 | | P Q R | | P Q R |
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.
|
||||
* @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.
|
||||
* @param sx Horizontal scale factor.
|
||||
* @param sy Vertical scale factor.
|
||||
* @param px Pivot on x-axis.
|
||||
@ -301,7 +298,7 @@ void OH_Drawing_MatrixPostRotate(OH_Drawing_Matrix*, float degree, float px, flo
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_MatrixPostScale(OH_Drawing_Matrix*, float sx, float sy, float px, float py);
|
||||
void OH_Drawing_MatrixPostScale(OH_Drawing_Matrix* matrix, float sx, float sy, float px, float py);
|
||||
|
||||
/**
|
||||
* @brief Sets backward matrix to translate by (dx, dy).
|
||||
@ -318,13 +315,13 @@ void OH_Drawing_MatrixPostScale(OH_Drawing_Matrix*, float sx, float sy, float px
|
||||
* | 0 0 1 | | P Q R | | P Q R |
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.
|
||||
* @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.
|
||||
* @param dx Indicates the horizontal translation.
|
||||
* @param dy Indicates the vertical translation.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_MatrixPostTranslate(OH_Drawing_Matrix*, float dx, float dy);
|
||||
void OH_Drawing_MatrixPostTranslate(OH_Drawing_Matrix* matrix, float dx, float dy);
|
||||
|
||||
/**
|
||||
* @brief Reset matrix to identity, which has no effect on mapped point, sets matrix to:
|
||||
@ -333,11 +330,11 @@ void OH_Drawing_MatrixPostTranslate(OH_Drawing_Matrix*, float dx, float dy);
|
||||
* | 0 0 1 |
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.
|
||||
* @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_MatrixReset(OH_Drawing_Matrix*);
|
||||
void OH_Drawing_MatrixReset(OH_Drawing_Matrix* matrix);
|
||||
|
||||
/**
|
||||
* @brief Sets matrix total to matrix a multiplied by matrix b.
|
||||
@ -376,45 +373,45 @@ OH_Drawing_ErrorCode OH_Drawing_MatrixGetAll(OH_Drawing_Matrix* matrix, float va
|
||||
/**
|
||||
* @brief Get one matrix value. Index is between the range of 0-8.
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.
|
||||
* @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.
|
||||
* @param index one of 0-8.
|
||||
* @return Returns value corresponding to index.Returns 0 if out of range.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
float OH_Drawing_MatrixGetValue(OH_Drawing_Matrix*, int index);
|
||||
float OH_Drawing_MatrixGetValue(OH_Drawing_Matrix* matrix, int index);
|
||||
|
||||
/**
|
||||
* @brief Sets matrix to rotate by degrees about a pivot point at (px, py). The pivot point is unchanged
|
||||
* when mapped with matrix. Positive degrees rotates clockwise.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.
|
||||
* @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.
|
||||
* @param degree Indicates the angle of axes relative to upright axes.
|
||||
* @param px Indicates the pivot on x-axis.
|
||||
* @param py Indicates the pivot on y-axis.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_MatrixRotate(OH_Drawing_Matrix*, float degree, float px, float py);
|
||||
void OH_Drawing_MatrixRotate(OH_Drawing_Matrix* matrix, float degree, float px, float py);
|
||||
|
||||
/**
|
||||
* @brief Sets matrix to translate by (dx, dy)
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.
|
||||
* @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.
|
||||
* @param dx Indicates the horizontal translation.
|
||||
* @param dy Indicates the vertical translation.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_MatrixTranslate(OH_Drawing_Matrix*, float dx, float dy);
|
||||
void OH_Drawing_MatrixTranslate(OH_Drawing_Matrix* matrix, float dx, float dy);
|
||||
|
||||
/**
|
||||
* @brief Sets matrix to scale by sx and sy, about a pivot point at (px, py).
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.
|
||||
* @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.
|
||||
* @param sx Indicates the horizontal scale factor.
|
||||
* @param sy Indicates the vertical scale factor.
|
||||
* @param px Indicates the pivot on x-axis.
|
||||
@ -422,27 +419,27 @@ void OH_Drawing_MatrixTranslate(OH_Drawing_Matrix*, float dx, float dy);
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_MatrixScale(OH_Drawing_Matrix*, float sx, float sy, float px, float py);
|
||||
void OH_Drawing_MatrixScale(OH_Drawing_Matrix* matrix, float sx, float sy, float px, float py);
|
||||
|
||||
/**
|
||||
* @brief Sets inverse to reciprocal matrix, returning true if matrix can be inverted.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.
|
||||
* @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.
|
||||
* @param inverse Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.
|
||||
* @return Returns true if the matrix is not nullptr and can be inverted;
|
||||
* returns false if the matrix is nullptr or cannot be inverted.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
bool OH_Drawing_MatrixInvert(OH_Drawing_Matrix*, OH_Drawing_Matrix* inverse);
|
||||
bool OH_Drawing_MatrixInvert(OH_Drawing_Matrix* matrix, OH_Drawing_Matrix* inverse);
|
||||
|
||||
/**
|
||||
* @brief Sets the params of matrix to map src to dst.
|
||||
* Count must greater than or equal to zero, and less than or equal to four.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.
|
||||
* @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.
|
||||
* @param src Points to map from.
|
||||
* @param dst Points to map to.
|
||||
* @param count Number of point in src and dst.
|
||||
@ -450,47 +447,47 @@ bool OH_Drawing_MatrixInvert(OH_Drawing_Matrix*, OH_Drawing_Matrix* inverse);
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
bool OH_Drawing_MatrixSetPolyToPoly(OH_Drawing_Matrix*, const OH_Drawing_Point2D* src,
|
||||
bool OH_Drawing_MatrixSetPolyToPoly(OH_Drawing_Matrix* matrix, const OH_Drawing_Point2D* src,
|
||||
const OH_Drawing_Point2D* dst, uint32_t count);
|
||||
|
||||
/**
|
||||
* @brief Maps the src point array to the dst point array by matrix transformation.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.
|
||||
* @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.
|
||||
* @param src Points to map from.
|
||||
* @param dst Points to map to.
|
||||
* @param count Number of point in src and dst.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_MatrixMapPoints(const OH_Drawing_Matrix*, const OH_Drawing_Point2D* src,
|
||||
void OH_Drawing_MatrixMapPoints(const OH_Drawing_Matrix* matrix, const OH_Drawing_Point2D* src,
|
||||
OH_Drawing_Point2D* dst, int count);
|
||||
|
||||
/**
|
||||
* @brief Sets dst to bounds of src corners mapped by matrix transformation.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.
|
||||
* @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.
|
||||
* @param src Rect to map from.
|
||||
* @param dst Rect to map to.
|
||||
* @return Returns true if the mapped src is equal to the dst; returns false is not equal.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
bool OH_Drawing_MatrixMapRect(const OH_Drawing_Matrix*, const OH_Drawing_Rect* src, OH_Drawing_Rect* dst);
|
||||
bool OH_Drawing_MatrixMapRect(const OH_Drawing_Matrix* matrix, const OH_Drawing_Rect* src, OH_Drawing_Rect* dst);
|
||||
|
||||
/**
|
||||
* @brief Returns true if the first matrix equals the second matrix.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.
|
||||
* @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.
|
||||
* @param other Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.
|
||||
* @return Returns true if the two matrices are equal; returns false if not equal.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
bool OH_Drawing_MatrixIsEqual(OH_Drawing_Matrix*, OH_Drawing_Matrix* other);
|
||||
bool OH_Drawing_MatrixIsEqual(OH_Drawing_Matrix* matrix, OH_Drawing_Matrix* other);
|
||||
|
||||
/**
|
||||
* @brief Returns true if matrix is identity.
|
||||
@ -499,22 +496,22 @@ bool OH_Drawing_MatrixIsEqual(OH_Drawing_Matrix*, OH_Drawing_Matrix* other);
|
||||
* | 0 0 1 |
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.
|
||||
* @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.
|
||||
* @return Returns true if matrix is identity; returns false if not identity.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
bool OH_Drawing_MatrixIsIdentity(OH_Drawing_Matrix*);
|
||||
bool OH_Drawing_MatrixIsIdentity(OH_Drawing_Matrix* matrix);
|
||||
|
||||
/**
|
||||
* @brief Destroys an <b>OH_Drawing_Matrix</b> object and reclaims the memory occupied by the object.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.
|
||||
* @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.
|
||||
* @since 11
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_MatrixDestroy(OH_Drawing_Matrix*);
|
||||
void OH_Drawing_MatrixDestroy(OH_Drawing_Matrix* matrix);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -13,9 +13,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef C_INCLUDE_DRAWING_MEMORY_STREAM_H
|
||||
#define C_INCLUDE_DRAWING_MEMORY_STREAM_H
|
||||
|
||||
/**
|
||||
* @addtogroup Drawing
|
||||
* @{
|
||||
@ -40,6 +37,9 @@
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
#ifndef C_INCLUDE_DRAWING_MEMORY_STREAM_H
|
||||
#define C_INCLUDE_DRAWING_MEMORY_STREAM_H
|
||||
|
||||
#include "drawing_types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
@ -63,11 +63,11 @@ OH_Drawing_MemoryStream* OH_Drawing_MemoryStreamCreate(const void* data, size_t
|
||||
* @brief Destroys an <b>OH_Drawing_MemoryStream</b> object and reclaims the memory occupied by the object.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_MemoryStream Indicates the pointer to an <b>OH_Drawing_MemoryStream</b> object.
|
||||
* @param memoryStream Indicates the pointer to an <b>OH_Drawing_MemoryStream</b> object.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_MemoryStreamDestroy(OH_Drawing_MemoryStream*);
|
||||
void OH_Drawing_MemoryStreamDestroy(OH_Drawing_MemoryStream* memoryStream);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -13,9 +13,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef C_INCLUDE_DRAWING_PATH_H
|
||||
#define C_INCLUDE_DRAWING_PATH_H
|
||||
|
||||
/**
|
||||
* @addtogroup Drawing
|
||||
* @{
|
||||
@ -40,6 +37,9 @@
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
#ifndef C_INCLUDE_DRAWING_PATH_H
|
||||
#define C_INCLUDE_DRAWING_PATH_H
|
||||
|
||||
#include "drawing_types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
@ -153,46 +153,46 @@ OH_Drawing_Path* OH_Drawing_PathCreate(void);
|
||||
* @brief Creates an <b>OH_Drawing_Path</b> copy object.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Path Indicates the pointer to an <b>OH_Drawing_Rect</b> object.
|
||||
* @param path Indicates the pointer to an <b>OH_Drawing_Rect</b> object.
|
||||
* @return Returns the pointer to the <b>OH_Drawing_Path</b> object created.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
OH_Drawing_Path* OH_Drawing_PathCopy(OH_Drawing_Path*);
|
||||
OH_Drawing_Path* OH_Drawing_PathCopy(OH_Drawing_Path* path);
|
||||
|
||||
/**
|
||||
* @brief Destroys an <b>OH_Drawing_Path</b> object and reclaims the memory occupied by the object.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
|
||||
* @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
|
||||
* @since 8
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_PathDestroy(OH_Drawing_Path*);
|
||||
void OH_Drawing_PathDestroy(OH_Drawing_Path* path);
|
||||
|
||||
/**
|
||||
* @brief Sets the start point of a path.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
|
||||
* @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
|
||||
* @param x Indicates the x coordinate of the start point.
|
||||
* @param y Indicates the y coordinate of the start point.
|
||||
* @since 8
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_PathMoveTo(OH_Drawing_Path*, float x, float y);
|
||||
void OH_Drawing_PathMoveTo(OH_Drawing_Path* path, float x, float y);
|
||||
|
||||
/**
|
||||
* @brief Draws a line segment from the last point of a path to the target point.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
|
||||
* @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
|
||||
* @param x Indicates the x coordinate of the target point.
|
||||
* @param y Indicates the y coordinate of the target point.
|
||||
* @since 8
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_PathLineTo(OH_Drawing_Path*, float x, float y);
|
||||
void OH_Drawing_PathLineTo(OH_Drawing_Path* path, float x, float y);
|
||||
|
||||
/**
|
||||
* @brief Draws an arc to a path.
|
||||
@ -203,7 +203,7 @@ void OH_Drawing_PathLineTo(OH_Drawing_Path*, float x, float y);
|
||||
* By default, a line segment from the last point of the path to the start point of the arc is also added.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
|
||||
* @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
|
||||
* @param x1 Indicates the x coordinate of the upper left corner of the rectangle.
|
||||
* @param y1 Indicates the y coordinate of the upper left corner of the rectangle.
|
||||
* @param x2 Indicates the x coordinate of the lower right corner of the rectangle.
|
||||
@ -213,13 +213,14 @@ void OH_Drawing_PathLineTo(OH_Drawing_Path*, float x, float y);
|
||||
* @since 8
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_PathArcTo(OH_Drawing_Path*, float x1, float y1, float x2, float y2, float startDeg, float sweepDeg);
|
||||
void OH_Drawing_PathArcTo(OH_Drawing_Path* path,
|
||||
float x1, float y1, float x2, float y2, float startDeg, float sweepDeg);
|
||||
|
||||
/**
|
||||
* @brief Draws a quadratic Bezier curve from the last point of a path to the target point.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
|
||||
* @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
|
||||
* @param ctrlX Indicates the x coordinate of the control point.
|
||||
* @param ctrlY Indicates the y coordinate of the control point.
|
||||
* @param endX Indicates the x coordinate of the target point.
|
||||
@ -227,13 +228,13 @@ void OH_Drawing_PathArcTo(OH_Drawing_Path*, float x1, float y1, float x2, float
|
||||
* @since 8
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_PathQuadTo(OH_Drawing_Path*, float ctrlX, float ctrlY, float endX, float endY);
|
||||
void OH_Drawing_PathQuadTo(OH_Drawing_Path* path, float ctrlX, float ctrlY, float endX, float endY);
|
||||
|
||||
/**
|
||||
* @brief Draws a conic from the last point of a path to the target point.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
|
||||
* @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
|
||||
* @param ctrlX Indicates the x coordinate of the control point.
|
||||
* @param ctrlY Indicates the y coordinate of the control point.
|
||||
* @param endX Indicates the x coordinate of the target point.
|
||||
@ -242,13 +243,13 @@ void OH_Drawing_PathQuadTo(OH_Drawing_Path*, float ctrlX, float ctrlY, float end
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_PathConicTo(OH_Drawing_Path*, float ctrlX, float ctrlY, float endX, float endY, float weight);
|
||||
void OH_Drawing_PathConicTo(OH_Drawing_Path* path, float ctrlX, float ctrlY, float endX, float endY, float weight);
|
||||
|
||||
/**
|
||||
* @brief Draws a cubic Bezier curve from the last point of a path to the target point.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
|
||||
* @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
|
||||
* @param ctrlX1 Indicates the x coordinate of the first control point.
|
||||
* @param ctrlY1 Indicates the y coordinate of the first control point.
|
||||
* @param ctrlX2 Indicates the x coordinate of the second control point.
|
||||
@ -259,37 +260,37 @@ void OH_Drawing_PathConicTo(OH_Drawing_Path*, float ctrlX, float ctrlY, float en
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_PathCubicTo(
|
||||
OH_Drawing_Path*, float ctrlX1, float ctrlY1, float ctrlX2, float ctrlY2, float endX, float endY);
|
||||
OH_Drawing_Path* path, float ctrlX1, float ctrlY1, float ctrlX2, float ctrlY2, float endX, float endY);
|
||||
|
||||
/**
|
||||
* @brief Sets the relative starting point of a path.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
|
||||
* @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
|
||||
* @param x Indicates the x coordinate of the relative starting point.
|
||||
* @param y Indicates the y coordinate of the relative starting point.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_PathRMoveTo(OH_Drawing_Path*, float x, float y);
|
||||
void OH_Drawing_PathRMoveTo(OH_Drawing_Path* path, float x, float y);
|
||||
|
||||
/**
|
||||
* @brief Draws a line segment from the last point of a path to the relative target point.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
|
||||
* @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
|
||||
* @param x Indicates the x coordinate of the relative target point.
|
||||
* @param y Indicates the y coordinate of the relative target point.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_PathRLineTo(OH_Drawing_Path*, float x, float y);
|
||||
void OH_Drawing_PathRLineTo(OH_Drawing_Path* path, float x, float y);
|
||||
|
||||
/**
|
||||
* @brief Draws a quadratic bezier curve from the last point of a path to the relative target point.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
|
||||
* @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
|
||||
* @param ctrlX Indicates the x coordinate of the relative control point.
|
||||
* @param ctrlY Indicates the y coordinate of the relative control point.
|
||||
* @param endX Indicates the x coordinate of the relative target point.
|
||||
@ -297,13 +298,13 @@ void OH_Drawing_PathRLineTo(OH_Drawing_Path*, float x, float y);
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_PathRQuadTo(OH_Drawing_Path*, float ctrlX, float ctrlY, float endX, float endY);
|
||||
void OH_Drawing_PathRQuadTo(OH_Drawing_Path* path, float ctrlX, float ctrlY, float endX, float endY);
|
||||
|
||||
/**
|
||||
* @brief Draws a conic from the last point of a path to the relative target point.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
|
||||
* @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
|
||||
* @param ctrlX Indicates the x coordinate of the relative control point.
|
||||
* @param ctrlY Indicates the y coordinate of the relative control point.
|
||||
* @param endX Indicates the x coordinate of the relative target point.
|
||||
@ -312,13 +313,13 @@ void OH_Drawing_PathRQuadTo(OH_Drawing_Path*, float ctrlX, float ctrlY, float en
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_PathRConicTo(OH_Drawing_Path*, float ctrlX, float ctrlY, float endX, float endY, float weight);
|
||||
void OH_Drawing_PathRConicTo(OH_Drawing_Path* path, float ctrlX, float ctrlY, float endX, float endY, float weight);
|
||||
|
||||
/**
|
||||
* @brief Draws a cubic bezier curve from the last point of a path to the relative target point.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
|
||||
* @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
|
||||
* @param ctrlX1 Indicates the x coordinate of the first relative control point.
|
||||
* @param ctrlY1 Indicates the y coordinate of the first relative control point.
|
||||
* @param ctrlX2 Indicates the x coordinate of the second relative control point.
|
||||
@ -328,76 +329,78 @@ void OH_Drawing_PathRConicTo(OH_Drawing_Path*, float ctrlX, float ctrlY, float e
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_PathRCubicTo(OH_Drawing_Path*, float ctrlX1, float ctrlY1, float ctrlX2, float ctrlY2,
|
||||
void OH_Drawing_PathRCubicTo(OH_Drawing_Path* path, float ctrlX1, float ctrlY1, float ctrlX2, float ctrlY2,
|
||||
float endX, float endY);
|
||||
|
||||
/**
|
||||
* @brief Adds a new contour to the path, defined by the rect, and wound in the specified direction.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
|
||||
* @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
|
||||
* @param left Indicates the left coordinate of the upper left corner of the rectangle.
|
||||
* @param top Indicates the top coordinate of the upper top corner of the rectangle.
|
||||
* @param right Indicates the right coordinate of the lower right corner of the rectangle.
|
||||
* @param bottom Indicates the bottom coordinate of the lower bottom corner of the rectangle.
|
||||
* @param OH_Drawing_PathDirection Indicates the path direction.
|
||||
* @param pathDirection Indicates the path direction.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_PathAddRect(OH_Drawing_Path*, float left, float top, float right, float bottom,
|
||||
OH_Drawing_PathDirection);
|
||||
void OH_Drawing_PathAddRect(OH_Drawing_Path* path, float left, float top, float right, float bottom,
|
||||
OH_Drawing_PathDirection pathDirection);
|
||||
|
||||
/**
|
||||
* @brief Adds a new contour to the path, defined by the rect, and wound in the specified direction.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
|
||||
* @param OH_Drawing_Rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.
|
||||
* @param OH_Drawing_PathDirection Indicates the path direction.
|
||||
* @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
|
||||
* @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.
|
||||
* @param pathDirection Indicates the path direction.
|
||||
* @param start Indicates initial corner of rect to add.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_PathAddRectWithInitialCorner(OH_Drawing_Path*, const OH_Drawing_Rect*,
|
||||
OH_Drawing_PathDirection, uint32_t start);
|
||||
void OH_Drawing_PathAddRectWithInitialCorner(OH_Drawing_Path* path, const OH_Drawing_Rect* rect,
|
||||
OH_Drawing_PathDirection pathDirection, uint32_t start);
|
||||
|
||||
/**
|
||||
* @brief Adds a new contour to the path, defined by the round rect, and wound in the specified direction.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
|
||||
* @param OH_Drawing_RoundRect Indicates the pointer to an <b>OH_Drawing_RoundRect</b> object.
|
||||
* @param OH_Drawing_PathDirection Indicates the path direction.
|
||||
* @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
|
||||
* @param roundRect Indicates the pointer to an <b>OH_Drawing_RoundRect</b> object.
|
||||
* @param pathDirection Indicates the path direction.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_PathAddRoundRect(OH_Drawing_Path*, const OH_Drawing_RoundRect* roundRect, OH_Drawing_PathDirection);
|
||||
void OH_Drawing_PathAddRoundRect(OH_Drawing_Path* path,
|
||||
const OH_Drawing_RoundRect* roundRect, OH_Drawing_PathDirection pathDirection);
|
||||
|
||||
/**
|
||||
* @brief Adds a oval to the path, defined by the rect, and wound in the specified direction.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
|
||||
* @param OH_Drawing_Rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.
|
||||
* @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
|
||||
* @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.
|
||||
* @param start Index of initial point of ellipse.
|
||||
* @param OH_Drawing_PathDirection Indicates the path direction.
|
||||
* @param pathDirection Indicates the path direction.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_PathAddOvalWithInitialPoint(OH_Drawing_Path*, const OH_Drawing_Rect*,
|
||||
uint32_t start, OH_Drawing_PathDirection);
|
||||
void OH_Drawing_PathAddOvalWithInitialPoint(OH_Drawing_Path* path, const OH_Drawing_Rect* rect,
|
||||
uint32_t start, OH_Drawing_PathDirection pathDirection);
|
||||
|
||||
/**
|
||||
* @brief Adds a oval to the path, defined by the rect, and wound in the specified direction.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
|
||||
* @param OH_Drawing_Rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.
|
||||
* @param OH_Drawing_PathDirection Indicates the path direction.
|
||||
* @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
|
||||
* @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.
|
||||
* @param pathDirection Indicates the path direction.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_PathAddOval(OH_Drawing_Path*, const OH_Drawing_Rect*, OH_Drawing_PathDirection);
|
||||
void OH_Drawing_PathAddOval(OH_Drawing_Path* path,
|
||||
const OH_Drawing_Rect* rect, OH_Drawing_PathDirection pathDirection);
|
||||
|
||||
/**
|
||||
* @brief Appends arc to path, as the start of new contour.Arc added is part of ellipse bounded by oval,
|
||||
@ -407,27 +410,27 @@ void OH_Drawing_PathAddOval(OH_Drawing_Path*, const OH_Drawing_Rect*, OH_Drawing
|
||||
* values are treated modulo 360, and arc may or may not draw depending on numeric rounding.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
|
||||
* @param OH_Drawing_Rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.
|
||||
* @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
|
||||
* @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.
|
||||
* @param startAngle Indicates the starting angle of arc in degrees.
|
||||
* @param sweepAngle Indicates the sweep, in degrees. Positive is clockwise.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_PathAddArc(OH_Drawing_Path*, const OH_Drawing_Rect*, float startAngle, float sweepAngle);
|
||||
void OH_Drawing_PathAddArc(OH_Drawing_Path* path, const OH_Drawing_Rect* rect, float startAngle, float sweepAngle);
|
||||
|
||||
/**
|
||||
* @brief Appends src path to path, transformed by matrix. Transformed curves may have different verbs,
|
||||
* point, and conic weights.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
|
||||
* @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
|
||||
* @param src Indicates the pointer to an <b>OH_Drawing_Path</b> object.
|
||||
* @param OH_Drawing_Matrix Indicates the length of the <b>OH_Drawing_Matrix</b> object.
|
||||
* @param matrix Indicates the length of the <b>OH_Drawing_Matrix</b> object.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_PathAddPath(OH_Drawing_Path*, const OH_Drawing_Path* src, const OH_Drawing_Matrix*);
|
||||
void OH_Drawing_PathAddPath(OH_Drawing_Path* path, const OH_Drawing_Path* src, const OH_Drawing_Matrix* matrix);
|
||||
|
||||
/**
|
||||
* @brief Appends src path to path, transformed by matrix and mode. Transformed curves may have different verbs,
|
||||
@ -436,13 +439,13 @@ void OH_Drawing_PathAddPath(OH_Drawing_Path*, const OH_Drawing_Path* src, const
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
|
||||
* @param src Indicates the pointer to an <b>OH_Drawing_Path</b> object.
|
||||
* @param OH_Drawing_Matrix Indicates the length of the <b>OH_Drawing_Matrix</b> object.
|
||||
* @param OH_Drawing_PathAddMode Indicates the add path's add mode.
|
||||
* @param matrix Indicates the length of the <b>OH_Drawing_Matrix</b> object.
|
||||
* @param pathAddMode Indicates the add path's add mode.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_PathAddPathWithMatrixAndMode(OH_Drawing_Path* path, const OH_Drawing_Path* src,
|
||||
const OH_Drawing_Matrix*, OH_Drawing_PathAddMode);
|
||||
const OH_Drawing_Matrix* matrix, OH_Drawing_PathAddMode pathAddMode);
|
||||
|
||||
/**
|
||||
* @brief Appends src path to path, transformed by mode. Transformed curves may have different verbs,
|
||||
@ -451,11 +454,12 @@ void OH_Drawing_PathAddPathWithMatrixAndMode(OH_Drawing_Path* path, const OH_Dra
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
|
||||
* @param src Indicates the pointer to an <b>OH_Drawing_Path</b> object, which is Appends src path to path.
|
||||
* @param OH_Drawing_PathAddMode Indicates the add path's add mode.
|
||||
* @param pathAddMode Indicates the add path's add mode.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_PathAddPathWithMode(OH_Drawing_Path* path, const OH_Drawing_Path* src, OH_Drawing_PathAddMode);
|
||||
void OH_Drawing_PathAddPathWithMode(OH_Drawing_Path* path,
|
||||
const OH_Drawing_Path* src, OH_Drawing_PathAddMode pathAddMode);
|
||||
|
||||
/**
|
||||
* @brief Appends src path to path, transformed by offset and mode. Transformed curves may have different verbs,
|
||||
@ -466,12 +470,12 @@ void OH_Drawing_PathAddPathWithMode(OH_Drawing_Path* path, const OH_Drawing_Path
|
||||
* @param src Indicates the pointer to an <b>OH_Drawing_Path</b> object.
|
||||
* @param dx Indicates offset added to src path x-axis coordinates.
|
||||
* @param dy Indicates offset added to src path y-axis coordinates.
|
||||
* @param OH_Drawing_PathAddMode Indicates the add path's add mode.
|
||||
* @param pathAddMode Indicates the add path's add mode.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_PathAddPathWithOffsetAndMode(OH_Drawing_Path* path, const OH_Drawing_Path* src, float dx, float dy,
|
||||
OH_Drawing_PathAddMode);
|
||||
OH_Drawing_PathAddMode pathAddMode);
|
||||
|
||||
/**
|
||||
* @brief Adds contour created from point array, adding (count - 1) line segments.
|
||||
@ -494,11 +498,12 @@ void OH_Drawing_PathAddPolygon(OH_Drawing_Path* path, const OH_Drawing_Point2D*
|
||||
* @param x Indicates the x coordinate of the center of the circle.
|
||||
* @param y Indicates the y coordinate of the center of the circle.
|
||||
* @param radius Indicates the radius of the circle.
|
||||
* @param OH_Drawing_PathDirection Indicates the path direction.
|
||||
* @param pathDirection Indicates the path direction.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_PathAddCircle(OH_Drawing_Path* path, float x, float y, float radius, OH_Drawing_PathDirection);
|
||||
void OH_Drawing_PathAddCircle(OH_Drawing_Path* path,
|
||||
float x, float y, float radius, OH_Drawing_PathDirection pathDirection);
|
||||
|
||||
/**
|
||||
* @brief Parses the svg path from the string.
|
||||
@ -516,26 +521,26 @@ bool OH_Drawing_PathBuildFromSvgString(OH_Drawing_Path* path, const char* str);
|
||||
* @brief Return the status that point (x, y) is contained by path.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
|
||||
* @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
|
||||
* @param x Indicates the x-axis value of containment test.
|
||||
* @param y Indicates the y-axis value of containment test.
|
||||
* @return Returns true if the point (x, y) is contained by path.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
bool OH_Drawing_PathContains(OH_Drawing_Path*, float x, float y);
|
||||
bool OH_Drawing_PathContains(OH_Drawing_Path* path, float x, float y);
|
||||
|
||||
/**
|
||||
* @brief Transforms verb array, point array, and weight by matrix. transform may change verbs
|
||||
* and increase their number. path is replaced by transformed data.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
|
||||
* @param OH_Drawing_Matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.
|
||||
* @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
|
||||
* @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_PathTransform(OH_Drawing_Path*, const OH_Drawing_Matrix*);
|
||||
void OH_Drawing_PathTransform(OH_Drawing_Path* path, const OH_Drawing_Matrix* matrix);
|
||||
|
||||
/**
|
||||
* @brief Transforms verb array, point array, and weight by matrix.
|
||||
@ -543,58 +548,58 @@ void OH_Drawing_PathTransform(OH_Drawing_Path*, const OH_Drawing_Matrix*);
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param src Indicates the pointer to an <b>OH_Drawing_Path</b> object.
|
||||
* @param OH_Drawing_Matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.
|
||||
* @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.
|
||||
* @param dst Indicates the pointer to an <b>OH_Drawing_Path</b> object.
|
||||
* @param applyPerspectiveClip Indicates whether to apply perspective clip.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_PathTransformWithPerspectiveClip(OH_Drawing_Path* src, const OH_Drawing_Matrix*,
|
||||
void OH_Drawing_PathTransformWithPerspectiveClip(OH_Drawing_Path* src, const OH_Drawing_Matrix* matrix,
|
||||
OH_Drawing_Path* dst, bool applyPerspectiveClip);
|
||||
|
||||
/**
|
||||
* @brief Sets FillType, the rule used to fill path.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
|
||||
* @param OH_Drawing_PathFillType Indicates the add path's fill type.
|
||||
* @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
|
||||
* @param pathFillType Indicates the add path's fill type.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_PathSetFillType(OH_Drawing_Path*, OH_Drawing_PathFillType);
|
||||
void OH_Drawing_PathSetFillType(OH_Drawing_Path* path, OH_Drawing_PathFillType pathFillType);
|
||||
|
||||
/**
|
||||
* @brief Gets the length of the current path object.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
|
||||
* @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
|
||||
* @param forceClosed Indicates whether free to modify/delete the path after this call.
|
||||
* @return Returns the length of the current path object.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
float OH_Drawing_PathGetLength(OH_Drawing_Path*, bool forceClosed);
|
||||
float OH_Drawing_PathGetLength(OH_Drawing_Path* path, bool forceClosed);
|
||||
|
||||
/**
|
||||
* @brief Gets the smallest bounding box that contains the path.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
|
||||
* @param OH_Drawing_Rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.
|
||||
* @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
|
||||
* @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_PathGetBounds(OH_Drawing_Path*, OH_Drawing_Rect*);
|
||||
void OH_Drawing_PathGetBounds(OH_Drawing_Path* path, OH_Drawing_Rect* rect);
|
||||
|
||||
/**
|
||||
* @brief Closes a path. A line segment from the start point to the last point of the path is added.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
|
||||
* @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
|
||||
* @since 8
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_PathClose(OH_Drawing_Path*);
|
||||
void OH_Drawing_PathClose(OH_Drawing_Path* path);
|
||||
|
||||
/**
|
||||
* @brief Offset path replaces dst.
|
||||
@ -613,11 +618,11 @@ void OH_Drawing_PathOffset(OH_Drawing_Path* path, OH_Drawing_Path* dst, float dx
|
||||
* @brief Resets path data.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
|
||||
* @param path Indicates the pointer to an <b>OH_Drawing_Path</b> object.
|
||||
* @since 8
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_PathReset(OH_Drawing_Path*);
|
||||
void OH_Drawing_PathReset(OH_Drawing_Path* path);
|
||||
|
||||
/**
|
||||
* @brief Determines whether the path current contour is closed.
|
||||
|
@ -13,9 +13,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef C_INCLUDE_DRAWING_PATH_EFFECT_H
|
||||
#define C_INCLUDE_DRAWING_PATH_EFFECT_H
|
||||
|
||||
/**
|
||||
* @addtogroup Drawing
|
||||
* @{
|
||||
@ -40,6 +37,9 @@
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
#ifndef C_INCLUDE_DRAWING_PATH_EFFECT_H
|
||||
#define C_INCLUDE_DRAWING_PATH_EFFECT_H
|
||||
|
||||
#include "drawing_types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
@ -63,11 +63,11 @@ OH_Drawing_PathEffect* OH_Drawing_CreateDashPathEffect(float* intervals, int cou
|
||||
* @brief Destroys an <b>OH_Drawing_PathEffect</b> object and reclaims the memory occupied by the object.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_PathEffect Indicates the pointer to an <b>OH_Drawing_PathEffect</b> object.
|
||||
* @param pathEffect Indicates the pointer to an <b>OH_Drawing_PathEffect</b> object.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_PathEffectDestroy(OH_Drawing_PathEffect*);
|
||||
void OH_Drawing_PathEffectDestroy(OH_Drawing_PathEffect* pathEffect);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -13,9 +13,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef C_INCLUDE_DRAWING_PEN_H
|
||||
#define C_INCLUDE_DRAWING_PEN_H
|
||||
|
||||
/**
|
||||
* @addtogroup Drawing
|
||||
* @{
|
||||
@ -40,6 +37,9 @@
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
#ifndef C_INCLUDE_DRAWING_PEN_H
|
||||
#define C_INCLUDE_DRAWING_PEN_H
|
||||
|
||||
#include "drawing_types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
@ -60,115 +60,115 @@ OH_Drawing_Pen* OH_Drawing_PenCreate(void);
|
||||
* @brief Creates an <b>OH_Drawing_Pen</b> copy object.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.
|
||||
* @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.
|
||||
* @return Returns the pointer to the <b>OH_Drawing_Pen</b> object created.
|
||||
* If nullptr is returned, the creation fails.
|
||||
* The possible cause of the failure is that the available memory is empty or a nullptr is passed.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
OH_Drawing_Pen* OH_Drawing_PenCopy(OH_Drawing_Pen*);
|
||||
OH_Drawing_Pen* OH_Drawing_PenCopy(OH_Drawing_Pen* pen);
|
||||
|
||||
/**
|
||||
* @brief Destroys an <b>OH_Drawing_Pen</b> object and reclaims the memory occupied by the object.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.
|
||||
* @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.
|
||||
* @since 8
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_PenDestroy(OH_Drawing_Pen*);
|
||||
void OH_Drawing_PenDestroy(OH_Drawing_Pen* pen);
|
||||
|
||||
/**
|
||||
* @brief Checks whether anti-aliasing is enabled for a pen. If anti-aliasing is enabled,
|
||||
* edges will be drawn with partial transparency.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.
|
||||
* @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.
|
||||
* @return Returns <b>true</b> if anti-aliasing is enabled; returns <b>false</b> otherwise.
|
||||
* @since 8
|
||||
* @version 1.0
|
||||
*/
|
||||
bool OH_Drawing_PenIsAntiAlias(const OH_Drawing_Pen*);
|
||||
bool OH_Drawing_PenIsAntiAlias(const OH_Drawing_Pen* pen);
|
||||
|
||||
/**
|
||||
* @brief Enables or disables anti-aliasing for a pen. If anti-aliasing is enabled,
|
||||
* edges will be drawn with partial transparency.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.
|
||||
* @param bool Specifies whether to enable anti-aliasing. The value <b>true</b> means
|
||||
* @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.
|
||||
* @param antiAlias Specifies whether to enable anti-aliasing. The value <b>true</b> means
|
||||
* to enable anti-aliasing, and <b>false</b> means the opposite.
|
||||
* @since 8
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_PenSetAntiAlias(OH_Drawing_Pen*, bool);
|
||||
void OH_Drawing_PenSetAntiAlias(OH_Drawing_Pen* pen, bool antiAlias);
|
||||
|
||||
/**
|
||||
* @brief Obtains the color of a pen. The color is used by the pen to outline a shape.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.
|
||||
* @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.
|
||||
* @return Returns a 32-bit (ARGB) variable that describes the color.
|
||||
* @since 8
|
||||
* @version 1.0
|
||||
*/
|
||||
uint32_t OH_Drawing_PenGetColor(const OH_Drawing_Pen*);
|
||||
uint32_t OH_Drawing_PenGetColor(const OH_Drawing_Pen* pen);
|
||||
|
||||
/**
|
||||
* @brief Sets the color for a pen. The color is used by the pen to outline a shape.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.
|
||||
* @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.
|
||||
* @param color Indicates the color to set, which is a 32-bit (ARGB) variable.
|
||||
* @since 8
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_PenSetColor(OH_Drawing_Pen*, uint32_t color);
|
||||
void OH_Drawing_PenSetColor(OH_Drawing_Pen* pen, uint32_t color);
|
||||
|
||||
/**
|
||||
* @brief Obtains the alpha of a pen. The alpha is used by the pen to outline a shape.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.
|
||||
* @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.
|
||||
* @return Returns a 8-bit variable that describes the alpha.
|
||||
* @since 11
|
||||
* @version 1.0
|
||||
*/
|
||||
uint8_t OH_Drawing_PenGetAlpha(const OH_Drawing_Pen*);
|
||||
uint8_t OH_Drawing_PenGetAlpha(const OH_Drawing_Pen* pen);
|
||||
|
||||
/**
|
||||
* @brief Sets the alpha for a pen. The alpha is used by the pen to outline a shape.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.
|
||||
* @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.
|
||||
* @param alpha Indicates the alpha to set, which is a 8-bit variable.
|
||||
* @since 11
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_PenSetAlpha(OH_Drawing_Pen*, uint8_t alpha);
|
||||
void OH_Drawing_PenSetAlpha(OH_Drawing_Pen* pen, uint8_t alpha);
|
||||
|
||||
/**
|
||||
* @brief Obtains the thickness of a pen. This thickness determines the width of the outline of a shape.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.
|
||||
* @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.
|
||||
* @return Returns the thickness.
|
||||
* @since 8
|
||||
* @version 1.0
|
||||
*/
|
||||
float OH_Drawing_PenGetWidth(const OH_Drawing_Pen*);
|
||||
float OH_Drawing_PenGetWidth(const OH_Drawing_Pen* pen);
|
||||
|
||||
/**
|
||||
* @brief Sets the thickness for a pen. This thickness determines the width of the outline of a shape.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.
|
||||
* @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.
|
||||
* @param width Indicates the thickness to set, which is a variable.
|
||||
* @since 8
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_PenSetWidth(OH_Drawing_Pen*, float width);
|
||||
void OH_Drawing_PenSetWidth(OH_Drawing_Pen* pen, float width);
|
||||
|
||||
/**
|
||||
* @brief Obtains the stroke miter limit of a polyline drawn by a pen.
|
||||
@ -177,12 +177,12 @@ void OH_Drawing_PenSetWidth(OH_Drawing_Pen*, float width);
|
||||
* and a mitered corner is displayed if the miter limit is not exceeded.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.
|
||||
* @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.
|
||||
* @return Returns the miter limit.
|
||||
* @since 8
|
||||
* @version 1.0
|
||||
*/
|
||||
float OH_Drawing_PenGetMiterLimit(const OH_Drawing_Pen*);
|
||||
float OH_Drawing_PenGetMiterLimit(const OH_Drawing_Pen* pen);
|
||||
|
||||
/**
|
||||
* @brief Sets the stroke miter limit for a polyline drawn by a pen.
|
||||
@ -191,12 +191,12 @@ float OH_Drawing_PenGetMiterLimit(const OH_Drawing_Pen*);
|
||||
* and a mitered corner is displayed if the miter limit is not exceeded.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.
|
||||
* @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.
|
||||
* @param miter Indicates a variable that describes the miter limit.
|
||||
* @since 8
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_PenSetMiterLimit(OH_Drawing_Pen*, float miter);
|
||||
void OH_Drawing_PenSetMiterLimit(OH_Drawing_Pen* pen, float miter);
|
||||
|
||||
/**
|
||||
* @brief Enumerates line cap styles of a pen. The line cap style defines
|
||||
@ -226,23 +226,23 @@ typedef enum {
|
||||
* @brief Obtains the line cap style of a pen.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.
|
||||
* @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.
|
||||
* @return Returns the line cap style.
|
||||
* @since 8
|
||||
* @version 1.0
|
||||
*/
|
||||
OH_Drawing_PenLineCapStyle OH_Drawing_PenGetCap(const OH_Drawing_Pen*);
|
||||
OH_Drawing_PenLineCapStyle OH_Drawing_PenGetCap(const OH_Drawing_Pen* pen);
|
||||
|
||||
/**
|
||||
* @brief Sets the line cap style for a pen.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.
|
||||
* @param OH_Drawing_PenLineCapStyle Indicates a variable that describes the line cap style.
|
||||
* @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.
|
||||
* @param capStyle Indicates a variable that describes the line cap style.
|
||||
* @since 8
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_PenSetCap(OH_Drawing_Pen*, OH_Drawing_PenLineCapStyle);
|
||||
void OH_Drawing_PenSetCap(OH_Drawing_Pen* pen, OH_Drawing_PenLineCapStyle capStyle);
|
||||
|
||||
/**
|
||||
* @brief Enumerates pen line join styles. The line join style defines
|
||||
@ -267,117 +267,117 @@ typedef enum {
|
||||
* @brief Obtains the line join style of a pen.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.
|
||||
* @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.
|
||||
* @return Returns the line join style.
|
||||
* @since 8
|
||||
* @version 1.0
|
||||
*/
|
||||
OH_Drawing_PenLineJoinStyle OH_Drawing_PenGetJoin(const OH_Drawing_Pen*);
|
||||
OH_Drawing_PenLineJoinStyle OH_Drawing_PenGetJoin(const OH_Drawing_Pen* pen);
|
||||
|
||||
/**
|
||||
* @brief Sets the line join style for a pen.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.
|
||||
* @param OH_Drawing_PenLineJoinStyle Indicates a variable that describes the line join style.
|
||||
* @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.
|
||||
* @param joinStyle Indicates a variable that describes the line join style.
|
||||
* @since 8
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_PenSetJoin(OH_Drawing_Pen*, OH_Drawing_PenLineJoinStyle);
|
||||
void OH_Drawing_PenSetJoin(OH_Drawing_Pen* pen, OH_Drawing_PenLineJoinStyle joinStyle);
|
||||
|
||||
/**
|
||||
* @brief Sets the shaderEffect for a pen.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.
|
||||
* @param OH_Drawing_ShaderEffect Indicates the pointer to an <b>OH_Drawing_ShaderEffect</b> object.
|
||||
* @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.
|
||||
* @param shaderEffect Indicates the pointer to an <b>OH_Drawing_ShaderEffect</b> object.
|
||||
* @since 11
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_PenSetShaderEffect(OH_Drawing_Pen*, OH_Drawing_ShaderEffect*);
|
||||
void OH_Drawing_PenSetShaderEffect(OH_Drawing_Pen* pen, OH_Drawing_ShaderEffect* shaderEffect);
|
||||
|
||||
/**
|
||||
* @brief Sets the shadowLayer for a pen.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.
|
||||
* @param OH_Drawing_ShadowLayer Indicates the pointer to an <b>OH_Drawing_ShadowLayer</b> object.
|
||||
* @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.
|
||||
* @param shadowLayer Indicates the pointer to an <b>OH_Drawing_ShadowLayer</b> object.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_PenSetShadowLayer(OH_Drawing_Pen*, OH_Drawing_ShadowLayer*);
|
||||
void OH_Drawing_PenSetShadowLayer(OH_Drawing_Pen* pen, OH_Drawing_ShadowLayer* shadowLayer);
|
||||
|
||||
/**
|
||||
* @brief Sets the pathEffect for a pen.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.
|
||||
* @param OH_Drawing_PathEffect Indicates the pointer to an <b>OH_Drawing_PathEffect</b> object.
|
||||
* @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.
|
||||
* @param pathEffect Indicates the pointer to an <b>OH_Drawing_PathEffect</b> object.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_PenSetPathEffect(OH_Drawing_Pen*, OH_Drawing_PathEffect*);
|
||||
void OH_Drawing_PenSetPathEffect(OH_Drawing_Pen* pen, OH_Drawing_PathEffect* pathEffect);
|
||||
|
||||
/**
|
||||
* @brief Sets the filter for a pen.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.
|
||||
* @param OH_Drawing_Filter Indicates the pointer to an <b>OH_Drawing_Filter</b> object.
|
||||
* @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.
|
||||
* @param filter Indicates the pointer to an <b>OH_Drawing_Filter</b> object.
|
||||
* @since 11
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_PenSetFilter(OH_Drawing_Pen*, OH_Drawing_Filter*);
|
||||
void OH_Drawing_PenSetFilter(OH_Drawing_Pen* pen, OH_Drawing_Filter* filter);
|
||||
|
||||
/**
|
||||
* @brief Gets the filter from a pen.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.
|
||||
* @param OH_Drawing_Filter Indicates the pointer to an <b>OH_Drawing_Filter</b> object.
|
||||
* @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.
|
||||
* @param filter Indicates the pointer to an <b>OH_Drawing_Filter</b> object.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_PenGetFilter(OH_Drawing_Pen*, OH_Drawing_Filter*);
|
||||
void OH_Drawing_PenGetFilter(OH_Drawing_Pen* pen, OH_Drawing_Filter* filter);
|
||||
|
||||
/**
|
||||
* @brief Sets a blender that implements the specified blendmode enum for a pen.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.
|
||||
* @param OH_Drawing_BlendMode Indicates the blend mode.
|
||||
* @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.
|
||||
* @param blendMode Indicates the blend mode.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_PenSetBlendMode(OH_Drawing_Pen*, OH_Drawing_BlendMode);
|
||||
void OH_Drawing_PenSetBlendMode(OH_Drawing_Pen* pen, OH_Drawing_BlendMode blendMode);
|
||||
|
||||
/**
|
||||
* @brief Gets the filled equivalent of the src path.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.
|
||||
* @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.
|
||||
* @param src Indicates the Path read to create a filled version.
|
||||
* @param dst Indicates the resulting Path.
|
||||
* @param OH_Drawing_Rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object that limits the PathEffect area if
|
||||
* @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object that limits the PathEffect area if
|
||||
Pen has PathEffect.
|
||||
* @param OH_Drawing_Matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object that tranfomation applied to
|
||||
* @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object that tranfomation applied to
|
||||
PathEffect if Pen has PathEffect.
|
||||
* @return Returns true if get successes; false if get fails.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
bool OH_Drawing_PenGetFillPath(OH_Drawing_Pen*, const OH_Drawing_Path* src, OH_Drawing_Path* dst,
|
||||
const OH_Drawing_Rect*, const OH_Drawing_Matrix*);
|
||||
bool OH_Drawing_PenGetFillPath(OH_Drawing_Pen* pen, const OH_Drawing_Path* src, OH_Drawing_Path* dst,
|
||||
const OH_Drawing_Rect* rect, const OH_Drawing_Matrix* matrix);
|
||||
|
||||
/**
|
||||
* @brief Resets all pen contents to their initial values.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.
|
||||
* @param pen Indicates the pointer to an <b>OH_Drawing_Pen</b> object.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_PenReset(OH_Drawing_Pen*);
|
||||
void OH_Drawing_PenReset(OH_Drawing_Pen* pen);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -13,9 +13,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef C_INCLUDE_DRAWING_PIXEL_MAP_H
|
||||
#define C_INCLUDE_DRAWING_PIXEL_MAP_H
|
||||
|
||||
/**
|
||||
* @addtogroup Drawing
|
||||
* @{
|
||||
@ -40,6 +37,9 @@
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
#ifndef C_INCLUDE_DRAWING_PIXEL_MAP_H
|
||||
#define C_INCLUDE_DRAWING_PIXEL_MAP_H
|
||||
|
||||
#include "drawing_types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
@ -64,36 +64,36 @@ typedef struct OH_PixelmapNative OH_PixelmapNative;
|
||||
* @brief Gets an <b>OH_Drawing_PixelMap</b> object.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param NativePixelMap_ Indicates a pointer to an native pixelmap supported by image framework.
|
||||
* @param nativePixelMap Indicates a pointer to an native pixelmap supported by image framework.
|
||||
* @return Returns the pointer to the <b>OH_Drawing_PixelMap</b> object.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
OH_Drawing_PixelMap* OH_Drawing_PixelMapGetFromNativePixelMap(NativePixelMap_*);
|
||||
OH_Drawing_PixelMap* OH_Drawing_PixelMapGetFromNativePixelMap(NativePixelMap_* nativePixelMap);
|
||||
|
||||
/**
|
||||
* @brief Gets an <b>OH_Drawing_PixelMap</b> object.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_PixelmapNative Indicates a pointer to the <b>OH_PixelmapNative</b> object supported by image framework.
|
||||
* @param pixelmapNative Indicates a pointer to the <b>OH_PixelmapNative</b> object supported by image framework.
|
||||
* @return Returns the pointer to the <b>OH_Drawing_PixelMap</b> object.
|
||||
* If nullptr is returned, the get operation fails.
|
||||
* The possible cause of the failure is that a nullptr is passed.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
OH_Drawing_PixelMap* OH_Drawing_PixelMapGetFromOhPixelMapNative(OH_PixelmapNative*);
|
||||
OH_Drawing_PixelMap* OH_Drawing_PixelMapGetFromOhPixelMapNative(OH_PixelmapNative* pixelmapNative);
|
||||
|
||||
/**
|
||||
* @brief Dissolves the relationship between <b>OH_Drawing_PixelMap</b> object and <b>NativePixelMap_</b> or
|
||||
<b>OH_PixelmapNative</b> which is build by 'GetFrom' function.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_PixelMap Indicates a pointer to the <b>OH_Drawing_PixelMap</b>.
|
||||
* @param pixelMap Indicates a pointer to the <b>OH_Drawing_PixelMap</b>.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_PixelMapDissolve(OH_Drawing_PixelMap*);
|
||||
void OH_Drawing_PixelMapDissolve(OH_Drawing_PixelMap* pixelMap);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -13,9 +13,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef C_INCLUDE_DRAWING_POINT_H
|
||||
#define C_INCLUDE_DRAWING_POINT_H
|
||||
|
||||
/**
|
||||
* @addtogroup Drawing
|
||||
* @{
|
||||
@ -40,6 +37,9 @@
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
#ifndef C_INCLUDE_DRAWING_POINT_H
|
||||
#define C_INCLUDE_DRAWING_POINT_H
|
||||
|
||||
#include "drawing_error_code.h"
|
||||
#include "drawing_types.h"
|
||||
|
||||
@ -106,11 +106,11 @@ OH_Drawing_ErrorCode OH_Drawing_PointSet(OH_Drawing_Point* point, float x, float
|
||||
* @brief Destroys an <b>OH_Drawing_Point</b> object and reclaims the memory occupied by the object.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Point Indicates the pointer to an <b>OH_Drawing_Point</b> object.
|
||||
* @param point Indicates the pointer to an <b>OH_Drawing_Point</b> object.
|
||||
* @since 11
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_PointDestroy(OH_Drawing_Point*);
|
||||
void OH_Drawing_PointDestroy(OH_Drawing_Point* point);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -13,9 +13,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef C_INCLUDE_DRAWING_RECORD_CMD_H
|
||||
#define C_INCLUDE_DRAWING_RECORD_CMD_H
|
||||
|
||||
/**
|
||||
* @addtogroup Drawing
|
||||
* @{
|
||||
@ -33,11 +30,16 @@
|
||||
*
|
||||
* @brief Declares functions related to the <b>RecordCmd</b> object in the drawing module.
|
||||
*
|
||||
* @kit ArkGraphics2D
|
||||
* @library libnative_drawing.so
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @since 13
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
#ifndef C_INCLUDE_DRAWING_RECORD_CMD_H
|
||||
#define C_INCLUDE_DRAWING_RECORD_CMD_H
|
||||
|
||||
#include "drawing_types.h"
|
||||
#include "drawing_error_code.h"
|
||||
|
||||
|
@ -13,9 +13,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef C_INCLUDE_DRAWING_RECT_H
|
||||
#define C_INCLUDE_DRAWING_RECT_H
|
||||
|
||||
/**
|
||||
* @addtogroup Drawing
|
||||
* @{
|
||||
@ -40,6 +37,9 @@
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
#ifndef C_INCLUDE_DRAWING_RECT_H
|
||||
#define C_INCLUDE_DRAWING_RECT_H
|
||||
|
||||
#include "drawing_types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
@ -133,65 +133,66 @@ void OH_Drawing_RectSetBottom(OH_Drawing_Rect* rect, float bottom);
|
||||
* @brief Get the left position of the rect.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.
|
||||
* @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.
|
||||
* @return Return the left position of the rect.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
float OH_Drawing_RectGetLeft(OH_Drawing_Rect*);
|
||||
float OH_Drawing_RectGetLeft(OH_Drawing_Rect* rect);
|
||||
|
||||
/**
|
||||
* @brief Get the top position of the rect.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.
|
||||
* @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.
|
||||
* @return Return the top position of the rect.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
float OH_Drawing_RectGetTop(OH_Drawing_Rect*);
|
||||
float OH_Drawing_RectGetTop(OH_Drawing_Rect* rect);
|
||||
|
||||
/**
|
||||
* @brief Get the right position of the rect.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.
|
||||
* @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.
|
||||
* @return Return the right position of the rect.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
float OH_Drawing_RectGetRight(OH_Drawing_Rect*);
|
||||
float OH_Drawing_RectGetRight(OH_Drawing_Rect* rect);
|
||||
|
||||
/**
|
||||
* @brief Get the bottom position of the rect.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.
|
||||
* @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.
|
||||
* @return Return the bottom position of the rect.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
float OH_Drawing_RectGetBottom(OH_Drawing_Rect*);
|
||||
float OH_Drawing_RectGetBottom(OH_Drawing_Rect* rect);
|
||||
|
||||
/**
|
||||
* @brief Get the height position of the rect.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.
|
||||
* @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
float OH_Drawing_RectGetHeight(OH_Drawing_Rect*);
|
||||
float OH_Drawing_RectGetHeight(OH_Drawing_Rect* rect);
|
||||
|
||||
/* @brief Get the width position of the rect.
|
||||
/**
|
||||
* @brief Get the width position of the rect.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.
|
||||
* @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.
|
||||
* @return Returns the width.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
float OH_Drawing_RectGetWidth(OH_Drawing_Rect*);
|
||||
float OH_Drawing_RectGetWidth(OH_Drawing_Rect* rect);
|
||||
|
||||
/**
|
||||
* @brief Copy the original rectangular object to the destination rectangular object.
|
||||
@ -208,11 +209,11 @@ void OH_Drawing_RectCopy(OH_Drawing_Rect* src, OH_Drawing_Rect* dst);
|
||||
* @brief Destroys an <b>OH_Drawing_Rect</b> object and reclaims the memory occupied by the object.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.
|
||||
* @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.
|
||||
* @since 11
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_RectDestroy(OH_Drawing_Rect*);
|
||||
void OH_Drawing_RectDestroy(OH_Drawing_Rect* rect);
|
||||
|
||||
/**
|
||||
* @brief Creates an <b>OH_Drawing_Array</b> object, which is used to store multiple <b>OH_Drawing_Rect</b> object.
|
||||
|
@ -13,9 +13,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef C_INCLUDE_DRAWING_REGION_H
|
||||
#define C_INCLUDE_DRAWING_REGION_H
|
||||
|
||||
/**
|
||||
* @addtogroup Drawing
|
||||
* @{
|
||||
@ -40,6 +37,9 @@
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
#ifndef C_INCLUDE_DRAWING_REGION_H
|
||||
#define C_INCLUDE_DRAWING_REGION_H
|
||||
|
||||
#include "drawing_types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
@ -94,8 +94,8 @@ OH_Drawing_Region* OH_Drawing_RegionCreate(void);
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param region Indicates the pointer to an <b>OH_Drawing_Region</b> object.
|
||||
* @param int32_t x-coordinate.
|
||||
* @param int32_t y-coordinate.
|
||||
* @param x x-coordinate.
|
||||
* @param y y-coordinate.
|
||||
* @return Returns <b>true</b> if (x, y) is inside region; returns <b>false</b> otherwise.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
@ -119,8 +119,8 @@ bool OH_Drawing_RegionOp(OH_Drawing_Region* region, const OH_Drawing_Region* oth
|
||||
* @brief Sets the region to the specified rect.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Region Indicates the pointer to an <b>OH_Drawing_Region</b> object.
|
||||
* @param OH_Drawing_Rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.
|
||||
* @param region Indicates the pointer to an <b>OH_Drawing_Region</b> object.
|
||||
* @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.
|
||||
* @return Return true if constructed Region is not empty.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
@ -144,11 +144,11 @@ bool OH_Drawing_RegionSetPath(OH_Drawing_Region* region, const OH_Drawing_Path*
|
||||
* @brief Destroys an <b>OH_Drawing_Region</b> object and reclaims the memory occupied by the object.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Region Indicates the pointer to an <b>OH_Drawing_Region</b> object.
|
||||
* @param region Indicates the pointer to an <b>OH_Drawing_Region</b> object.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_RegionDestroy(OH_Drawing_Region*);
|
||||
void OH_Drawing_RegionDestroy(OH_Drawing_Region* region);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -13,9 +13,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef C_INCLUDE_DRAWING_ROUND_RECT_H
|
||||
#define C_INCLUDE_DRAWING_ROUND_RECT_H
|
||||
|
||||
/**
|
||||
* @addtogroup Drawing
|
||||
* @{
|
||||
@ -40,6 +37,9 @@
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
#ifndef C_INCLUDE_DRAWING_ROUND_RECT_H
|
||||
#define C_INCLUDE_DRAWING_ROUND_RECT_H
|
||||
|
||||
#include "drawing_error_code.h"
|
||||
#include "drawing_types.h"
|
||||
|
||||
@ -76,48 +76,49 @@ typedef enum {
|
||||
* @brief Creates an <b>OH_Drawing_RoundRect</b> object.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.
|
||||
* @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.
|
||||
* @param xRad Indicates the corner radii on x-axis.
|
||||
* @param yRad Indicates the corner radii on y-axis.
|
||||
* @return Returns the pointer to the <b>OH_Drawing_RoundRect</b> object created.
|
||||
* @since 11
|
||||
* @version 1.0
|
||||
*/
|
||||
OH_Drawing_RoundRect* OH_Drawing_RoundRectCreate(const OH_Drawing_Rect*, float xRad, float yRad);
|
||||
OH_Drawing_RoundRect* OH_Drawing_RoundRectCreate(const OH_Drawing_Rect* rect, float xRad, float yRad);
|
||||
|
||||
/**
|
||||
* @brief Sets the radiusX and radiusY for a specific corner position.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_RoundRect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.
|
||||
* @param roundRect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.
|
||||
* @param pos Indicates the corner radii position.
|
||||
* @param OH_Drawing_Corner_Radii Indicates the corner radii on x-axis and y-axis.
|
||||
* @param radii Indicates the corner radii on x-axis and y-axis.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_RoundRectSetCorner(OH_Drawing_RoundRect*, OH_Drawing_CornerPos pos, OH_Drawing_Corner_Radii);
|
||||
void OH_Drawing_RoundRectSetCorner(OH_Drawing_RoundRect* roundRect,
|
||||
OH_Drawing_CornerPos pos, OH_Drawing_Corner_Radii radii);
|
||||
|
||||
/**
|
||||
* @brief Gets an <b>OH_Drawing_Corner_Radii</b> struct, the point is round corner radiusX and radiusY.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_RoundRect Indicates the pointer to an <b>OH_Drawing_RoundRect</b> object.
|
||||
* @param roundRect Indicates the pointer to an <b>OH_Drawing_RoundRect</b> object.
|
||||
* @param pos Indicates the corner radii position.
|
||||
* @return Returns the corner radii of <b>OH_Drawing_Corner_Radii</b> struct.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
OH_Drawing_Corner_Radii OH_Drawing_RoundRectGetCorner(OH_Drawing_RoundRect*, OH_Drawing_CornerPos pos);
|
||||
OH_Drawing_Corner_Radii OH_Drawing_RoundRectGetCorner(OH_Drawing_RoundRect* roundRect, OH_Drawing_CornerPos pos);
|
||||
|
||||
/**
|
||||
* @brief Destroys an <b>OH_Drawing_RoundRect</b> object and reclaims the memory occupied by the object.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_RoundRect Indicates the pointer to an <b>OH_Drawing_RoundRect</b> object.
|
||||
* @param roundRect Indicates the pointer to an <b>OH_Drawing_RoundRect</b> object.
|
||||
* @since 11
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_RoundRectDestroy(OH_Drawing_RoundRect*);
|
||||
void OH_Drawing_RoundRectDestroy(OH_Drawing_RoundRect* roundRect);
|
||||
|
||||
/**
|
||||
* @brief Translates round rect by (dx, dy).
|
||||
|
@ -13,9 +13,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef C_INCLUDE_DRAWING_SAMPLING_OPTIONS_H
|
||||
#define C_INCLUDE_DRAWING_SAMPLING_OPTIONS_H
|
||||
|
||||
/**
|
||||
* @addtogroup Drawing
|
||||
* @{
|
||||
@ -40,6 +37,9 @@
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
#ifndef C_INCLUDE_DRAWING_SAMPLING_OPTIONS_H
|
||||
#define C_INCLUDE_DRAWING_SAMPLING_OPTIONS_H
|
||||
|
||||
#include "drawing_types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
@ -78,23 +78,24 @@ typedef enum {
|
||||
* @brief Creates an <b>OH_Drawing_SamplingOptions</b> object.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_FilterMode sampling filter mode.
|
||||
* @param OH_Drawing_MipmapMode sampling mipmap mode..
|
||||
* @param filterMode sampling filter mode.
|
||||
* @param mipmapMode sampling mipmap mode..
|
||||
* @return Returns the pointer to the <b>OH_Drawing_SamplingOptions</b> object created.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
OH_Drawing_SamplingOptions* OH_Drawing_SamplingOptionsCreate(OH_Drawing_FilterMode, OH_Drawing_MipmapMode);
|
||||
OH_Drawing_SamplingOptions* OH_Drawing_SamplingOptionsCreate(OH_Drawing_FilterMode filterMode,
|
||||
OH_Drawing_MipmapMode mipmapMode);
|
||||
|
||||
/**
|
||||
* @brief Destroys an <b>OH_Drawing_SamplingOptions</b> object and reclaims the memory occupied by the object.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_SamplingOptions Indicates the pointer to an <b>OH_Drawing_SamplingOptions</b> object.
|
||||
* @param samplingOptions Indicates the pointer to an <b>OH_Drawing_SamplingOptions</b> object.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_SamplingOptionsDestroy(OH_Drawing_SamplingOptions*);
|
||||
void OH_Drawing_SamplingOptionsDestroy(OH_Drawing_SamplingOptions* samplingOptions);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -13,9 +13,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef C_INCLUDE_DRAWING_SHADER_EFFECT_H
|
||||
#define C_INCLUDE_DRAWING_SHADER_EFFECT_H
|
||||
|
||||
/**
|
||||
* @addtogroup Drawing
|
||||
* @{
|
||||
@ -40,6 +37,9 @@
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
#ifndef C_INCLUDE_DRAWING_SHADER_EFFECT_H
|
||||
#define C_INCLUDE_DRAWING_SHADER_EFFECT_H
|
||||
|
||||
#include "drawing_types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
@ -94,13 +94,14 @@ OH_Drawing_ShaderEffect* OH_Drawing_ShaderEffectCreateColorShader(const uint32_t
|
||||
* @param colors Indicates the colors to be distributed between the two points.
|
||||
* @param pos Indicates the relative position of each corresponding color in the colors array.
|
||||
* @param size Indicates the number of colors and pos.
|
||||
* @param OH_Drawing_TileMode Indicates the tile mode.
|
||||
* @param tileMode Indicates the tile mode.
|
||||
* @return Returns the pointer to the <b>OH_Drawing_ShaderEffect</b> object created.
|
||||
* @since 11
|
||||
* @version 1.0
|
||||
*/
|
||||
OH_Drawing_ShaderEffect* OH_Drawing_ShaderEffectCreateLinearGradient(const OH_Drawing_Point* startPt,
|
||||
const OH_Drawing_Point* endPt, const uint32_t* colors, const float* pos, uint32_t size, OH_Drawing_TileMode);
|
||||
const OH_Drawing_Point* endPt, const uint32_t* colors,
|
||||
const float* pos, uint32_t size, OH_Drawing_TileMode tileMode);
|
||||
|
||||
/**
|
||||
* @brief Creates an <b>OH_Drawing_ShaderEffect</b> that generates a linear gradient between the two specified points.
|
||||
@ -112,8 +113,8 @@ OH_Drawing_ShaderEffect* OH_Drawing_ShaderEffectCreateLinearGradient(const OH_Dr
|
||||
* @param pos Indicates the relative position of each corresponding color in the colors array.
|
||||
* If pos is nullptr, the colors are evenly distributed between the start and end point.
|
||||
* @param size Indicates the number of colors and pos(if pos is not nullptr).
|
||||
* @param OH_Drawing_TileMode Indicates the tile mode.
|
||||
* @param OH_Drawing_Matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object,
|
||||
* @param tileMode Indicates the tile mode.
|
||||
* @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object,
|
||||
which represents the local matrix of the created <b>OH_Drawing_ShaderEffect</b> object.
|
||||
If matrix is nullptr, defaults to the identity matrix.
|
||||
* @return Returns the pointer to the <b>OH_Drawing_ShaderEffect</b> object created.
|
||||
@ -124,7 +125,7 @@ OH_Drawing_ShaderEffect* OH_Drawing_ShaderEffectCreateLinearGradient(const OH_Dr
|
||||
*/
|
||||
OH_Drawing_ShaderEffect* OH_Drawing_ShaderEffectCreateLinearGradientWithLocalMatrix(
|
||||
const OH_Drawing_Point2D* startPt, const OH_Drawing_Point2D* endPt, const uint32_t* colors, const float* pos,
|
||||
uint32_t size, OH_Drawing_TileMode, const OH_Drawing_Matrix*);
|
||||
uint32_t size, OH_Drawing_TileMode tileMode, const OH_Drawing_Matrix* matrix);
|
||||
|
||||
/**
|
||||
* @brief Creates an <b>OH_Drawing_ShaderEffect</b> that generates a radial gradient given the center and radius.
|
||||
@ -135,13 +136,13 @@ OH_Drawing_ShaderEffect* OH_Drawing_ShaderEffectCreateLinearGradientWithLocalMat
|
||||
* @param colors Indicates the colors to be distributed between the two points.
|
||||
* @param pos Indicates the relative position of each corresponding color in the colors array.
|
||||
* @param size Indicates the number of colors and pos.
|
||||
* @param OH_Drawing_TileMode Indicates the tile mode.
|
||||
* @param tileMode Indicates the tile mode.
|
||||
* @return Returns the pointer to the <b>OH_Drawing_ShaderEffect</b> object created.
|
||||
* @since 11
|
||||
* @version 1.0
|
||||
*/
|
||||
OH_Drawing_ShaderEffect* OH_Drawing_ShaderEffectCreateRadialGradient(const OH_Drawing_Point* centerPt, float radius,
|
||||
const uint32_t* colors, const float* pos, uint32_t size, OH_Drawing_TileMode);
|
||||
const uint32_t* colors, const float* pos, uint32_t size, OH_Drawing_TileMode tileMode);
|
||||
|
||||
/**
|
||||
* @brief Creates an <b>OH_Drawing_ShaderEffect</b> that generates a radial gradient given the center and radius.
|
||||
@ -152,8 +153,8 @@ OH_Drawing_ShaderEffect* OH_Drawing_ShaderEffectCreateRadialGradient(const OH_Dr
|
||||
* @param colors Indicates the colors to be distributed between the two points.
|
||||
* @param pos Indicates the relative position of each corresponding color in the colors array.
|
||||
* @param size Indicates the number of colors and pos.
|
||||
* @param OH_Drawing_TileMode Indicates the tile mode.
|
||||
* @param OH_Drawing_Matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object,
|
||||
* @param tileMode Indicates the tile mode.
|
||||
* @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object,
|
||||
which represents the local matrix of the created <b>OH_Drawing_ShaderEffect</b> object.
|
||||
If matrix is nullptr, defaults to the identity matrix.
|
||||
* @return Returns the pointer to the <b>OH_Drawing_ShaderEffect</b> object created.
|
||||
@ -164,7 +165,7 @@ OH_Drawing_ShaderEffect* OH_Drawing_ShaderEffectCreateRadialGradient(const OH_Dr
|
||||
*/
|
||||
OH_Drawing_ShaderEffect* OH_Drawing_ShaderEffectCreateRadialGradientWithLocalMatrix(
|
||||
const OH_Drawing_Point2D* centerPt, float radius, const uint32_t* colors, const float* pos, uint32_t size,
|
||||
OH_Drawing_TileMode, const OH_Drawing_Matrix*);
|
||||
OH_Drawing_TileMode tileMode, const OH_Drawing_Matrix* matrix);
|
||||
|
||||
/**
|
||||
* @brief Creates an <b>OH_Drawing_ShaderEffect</b> that generates a sweep gradient given a center.
|
||||
@ -174,30 +175,31 @@ OH_Drawing_ShaderEffect* OH_Drawing_ShaderEffectCreateRadialGradientWithLocalMat
|
||||
* @param colors Indicates the colors to be distributed between the two points.
|
||||
* @param pos Indicates the relative position of each corresponding color in the colors array.
|
||||
* @param size Indicates the number of colors and pos.
|
||||
* @param OH_Drawing_TileMode Indicates the tile mode.
|
||||
* @param tileMode Indicates the tile mode.
|
||||
* @return Returns the pointer to the <b>OH_Drawing_ShaderEffect</b> object created.
|
||||
* @since 11
|
||||
* @version 1.0
|
||||
*/
|
||||
OH_Drawing_ShaderEffect* OH_Drawing_ShaderEffectCreateSweepGradient(const OH_Drawing_Point* centerPt,
|
||||
const uint32_t* colors, const float* pos, uint32_t size, OH_Drawing_TileMode);
|
||||
const uint32_t* colors, const float* pos, uint32_t size, OH_Drawing_TileMode tileMode);
|
||||
|
||||
/**
|
||||
* @brief Creates an <b>OH_Drawing_ShaderEffect</b> that generates a image shader.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Image Indicates the pointer to an <b>OH_Drawing_Image</b> object.
|
||||
* @param image Indicates the pointer to an <b>OH_Drawing_Image</b> object.
|
||||
* @param tileX Indicates the tileX.
|
||||
* @param tileY Indicates the tileY.
|
||||
* @param OH_Drawing_SamplingOptions Indicates the pointer to an <b>OH_Drawing_SamplingOptions</b> object.
|
||||
* @param OH_Drawing_Matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.
|
||||
* @param samplingOptions Indicates the pointer to an <b>OH_Drawing_SamplingOptions</b> object.
|
||||
* @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object.
|
||||
* If matrix is nullptr, defaults to the identity matrix.
|
||||
* @return Returns the pointer to the <b>OH_Drawing_ShaderEffect</b> object created.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
OH_Drawing_ShaderEffect* OH_Drawing_ShaderEffectCreateImageShader(OH_Drawing_Image*,
|
||||
OH_Drawing_TileMode tileX, OH_Drawing_TileMode tileY, const OH_Drawing_SamplingOptions*, const OH_Drawing_Matrix*);
|
||||
OH_Drawing_ShaderEffect* OH_Drawing_ShaderEffectCreateImageShader(OH_Drawing_Image* image,
|
||||
OH_Drawing_TileMode tileX, OH_Drawing_TileMode tileY, const OH_Drawing_SamplingOptions* samplingOptions,
|
||||
const OH_Drawing_Matrix* matrix);
|
||||
|
||||
/**
|
||||
* @brief Creates an <b>OH_Drawing_ShaderEffect</b> that generates a conical gradient given two circles.
|
||||
@ -210,8 +212,8 @@ OH_Drawing_ShaderEffect* OH_Drawing_ShaderEffectCreateImageShader(OH_Drawing_Ima
|
||||
* @param colors Indicates the colors to be distributed between the two points.
|
||||
* @param pos Indicates the relative position of each corresponding color in the colors array.
|
||||
* @param size Indicates the number of colors and pos.
|
||||
* @param OH_Drawing_TileMode Indicates the tile mode.
|
||||
* @param OH_Drawing_Matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object,
|
||||
* @param tileMode Indicates the tile mode.
|
||||
* @param matrix Indicates the pointer to an <b>OH_Drawing_Matrix</b> object,
|
||||
which represents the local matrix of the created <b>OH_Drawing_ShaderEffect</b> object.
|
||||
If matrix is nullptr, defaults to the identity matrix.
|
||||
* @return Returns the pointer to the <b>OH_Drawing_ShaderEffect</b> object created.
|
||||
@ -222,17 +224,17 @@ OH_Drawing_ShaderEffect* OH_Drawing_ShaderEffectCreateImageShader(OH_Drawing_Ima
|
||||
*/
|
||||
OH_Drawing_ShaderEffect* OH_Drawing_ShaderEffectCreateTwoPointConicalGradient(const OH_Drawing_Point2D* startPt,
|
||||
float startRadius, const OH_Drawing_Point2D* endPt, float endRadius, const uint32_t* colors, const float* pos,
|
||||
uint32_t size, OH_Drawing_TileMode, const OH_Drawing_Matrix*);
|
||||
uint32_t size, OH_Drawing_TileMode tileMode, const OH_Drawing_Matrix* matrix);
|
||||
|
||||
/**
|
||||
* @brief Destroys an <b>OH_Drawing_ShaderEffect</b> object and reclaims the memory occupied by the object.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_ShaderEffect Indicates the pointer to an <b>OH_Drawing_ShaderEffect</b> object.
|
||||
* @param shaderEffect Indicates the pointer to an <b>OH_Drawing_ShaderEffect</b> object.
|
||||
* @since 11
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_ShaderEffectDestroy(OH_Drawing_ShaderEffect*);
|
||||
void OH_Drawing_ShaderEffectDestroy(OH_Drawing_ShaderEffect* shaderEffect);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -13,9 +13,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef C_INCLUDE_DRAWING_SHADOW_LAYER_H
|
||||
#define C_INCLUDE_DRAWING_SHADOW_LAYER_H
|
||||
|
||||
/**
|
||||
* @addtogroup Drawing
|
||||
* @{
|
||||
@ -40,6 +37,9 @@
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
#ifndef C_INCLUDE_DRAWING_SHADOW_LAYER_H
|
||||
#define C_INCLUDE_DRAWING_SHADOW_LAYER_H
|
||||
|
||||
#include "drawing_types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
@ -64,11 +64,11 @@ OH_Drawing_ShadowLayer* OH_Drawing_ShadowLayerCreate(float blurRadius, float x,
|
||||
* @brief Destroys an <b>OH_Drawing_ShadowLayer</b> object and reclaims the memory occupied by the object.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_ShadowLayer Indicates the pointer to an <b>OH_Drawing_ShadowLayer</b> object.
|
||||
* @param shadowLayer Indicates the pointer to an <b>OH_Drawing_ShadowLayer</b> object.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_ShadowLayerDestroy(OH_Drawing_ShadowLayer*);
|
||||
void OH_Drawing_ShadowLayerDestroy(OH_Drawing_ShadowLayer* shadowLayer);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -13,9 +13,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef C_INCLUDE_DRAWING_GPU_SURFACE_H
|
||||
#define C_INCLUDE_DRAWING_GPU_SURFACE_H
|
||||
|
||||
/**
|
||||
* @addtogroup Drawing
|
||||
* @{
|
||||
@ -40,6 +37,9 @@
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
#ifndef C_INCLUDE_DRAWING_GPU_SURFACE_H
|
||||
#define C_INCLUDE_DRAWING_GPU_SURFACE_H
|
||||
|
||||
#include "drawing_types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
@ -50,37 +50,37 @@ extern "C" {
|
||||
* @brief Creates an <b>OH_Drawing_Surface</b> object on GPU indicated by context.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_GpuContext Indicates the pointer to an <b>OH_Drawing_GpuContext</b> object.
|
||||
* @param bool Indicates whether an allocation should count against a cache budget.
|
||||
* @param OH_Drawing_Image_Info Indicates the image info.
|
||||
* @param gpuContext Indicates the pointer to an <b>OH_Drawing_GpuContext</b> object.
|
||||
* @param flag Indicates whether an allocation should count against a cache budget.
|
||||
* @param imageInfo Indicates the image info.
|
||||
* @return Returns the pointer to the <b>OH_Drawing_Surface</b> object created.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
OH_Drawing_Surface* OH_Drawing_SurfaceCreateFromGpuContext(
|
||||
OH_Drawing_GpuContext*, bool, OH_Drawing_Image_Info);
|
||||
OH_Drawing_GpuContext* gpuContext, bool flag, OH_Drawing_Image_Info imageInfo);
|
||||
|
||||
/**
|
||||
* @brief Gets the canvas that draws into surface.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Surface Indicates the pointer to an <b>OH_Drawing_Surface</b> object.
|
||||
* @param surface Indicates the pointer to an <b>OH_Drawing_Surface</b> object.
|
||||
* @return Returns the pointer to the <b>OH_Drawing_Canvas</b> object. The returned pointer does not need to be managed
|
||||
* by the caller.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
OH_Drawing_Canvas* OH_Drawing_SurfaceGetCanvas(OH_Drawing_Surface*);
|
||||
OH_Drawing_Canvas* OH_Drawing_SurfaceGetCanvas(OH_Drawing_Surface* surface);
|
||||
|
||||
/**
|
||||
* @brief Destroys an <b>OH_Drawing_Surface</b> object and reclaims the memory occupied by the object.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Surface Indicates the pointer to an <b>OH_Drawing_Surface</b> object.
|
||||
* @param surface Indicates the pointer to an <b>OH_Drawing_Surface</b> object.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_SurfaceDestroy(OH_Drawing_Surface*);
|
||||
void OH_Drawing_SurfaceDestroy(OH_Drawing_Surface* surface);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -13,9 +13,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef C_INCLUDE_DRAWING_TEXT_BLOB_H
|
||||
#define C_INCLUDE_DRAWING_TEXT_BLOB_H
|
||||
|
||||
/**
|
||||
* @addtogroup Drawing
|
||||
* @{
|
||||
@ -40,6 +37,9 @@
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
#ifndef C_INCLUDE_DRAWING_TEXT_BLOB_H
|
||||
#define C_INCLUDE_DRAWING_TEXT_BLOB_H
|
||||
|
||||
#include "drawing_types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
@ -62,14 +62,14 @@ OH_Drawing_TextBlobBuilder* OH_Drawing_TextBlobBuilderCreate(void);
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param text Indicates the the pointer to text.
|
||||
* @param byteLength Indicates the text length.
|
||||
* @param OH_Drawing_Font Indicates the pointer to an <b>OH_Drawing_Font</b> object.
|
||||
* @param OH_Drawing_TextEncoding Indicates the pointer to an <b>OH_Drawing_TextEncoding</b> object.
|
||||
* @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.
|
||||
* @param textEncoding Indicates the pointer to an <b>OH_Drawing_TextEncoding</b> object.
|
||||
* @return Returns the pointer to the <b>OH_Drawing_TextBlob</b> object created.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
OH_Drawing_TextBlob* OH_Drawing_TextBlobCreateFromText(const void* text, size_t byteLength,
|
||||
const OH_Drawing_Font*, OH_Drawing_TextEncoding);
|
||||
const OH_Drawing_Font* font, OH_Drawing_TextEncoding textEncoding);
|
||||
|
||||
/**
|
||||
* @brief Creates an <b>OH_Drawing_TextBlob</b> object from pos text.
|
||||
@ -77,51 +77,51 @@ OH_Drawing_TextBlob* OH_Drawing_TextBlobCreateFromText(const void* text, size_t
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param text Indicates the the pointer to text.
|
||||
* @param byteLength Indicates the text length.
|
||||
* @param OH_Drawing_Point2D Indicates the pointer to an <b>OH_Drawing_Point2D</b> array object.
|
||||
* @param OH_Drawing_Font Indicates the pointer to an <b>OH_Drawing_Font</b> object.
|
||||
* @param OH_Drawing_TextEncoding Indicates the pointer to an <b>OH_Drawing_TextEncoding</b> object.
|
||||
* @param point2D Indicates the pointer to an <b>OH_Drawing_Point2D</b> array object.
|
||||
* @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.
|
||||
* @param textEncoding Indicates the pointer to an <b>OH_Drawing_TextEncoding</b> object.
|
||||
* @return Returns the pointer to the <b>OH_Drawing_TextBlob</b> object created.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
OH_Drawing_TextBlob* OH_Drawing_TextBlobCreateFromPosText(const void* text, size_t byteLength,
|
||||
OH_Drawing_Point2D*, const OH_Drawing_Font*, OH_Drawing_TextEncoding);
|
||||
OH_Drawing_Point2D* point2D, const OH_Drawing_Font* font, OH_Drawing_TextEncoding textEncoding);
|
||||
|
||||
/**
|
||||
* @brief Creates an <b>OH_Drawing_TextBlob</b> object from pos text.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param str Indicates the the pointer to text.
|
||||
* @param OH_Drawing_Font Indicates the pointer to an <b>OH_Drawing_Font</b> object.
|
||||
* @param OH_Drawing_TextEncoding Indicates the pointer to an <b>OH_Drawing_TextEncoding</b> object.
|
||||
* @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.
|
||||
* @param textEncoding Indicates the pointer to an <b>OH_Drawing_TextEncoding</b> object.
|
||||
* @return Returns the pointer to the <b>OH_Drawing_TextBlob</b> object created.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
OH_Drawing_TextBlob* OH_Drawing_TextBlobCreateFromString(const char* str,
|
||||
const OH_Drawing_Font*, OH_Drawing_TextEncoding);
|
||||
const OH_Drawing_Font* font, OH_Drawing_TextEncoding textEncoding);
|
||||
|
||||
/**
|
||||
* @brief Gets the bounds of textblob, assigned to the pointer to an <b>OH_Drawing_Rect</b> object.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_TextBlob Indicates the pointer to an <b>OH_Drawing_TextBlob</b> object.
|
||||
* @param OH_Drawing_Rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.
|
||||
* @param textBlob Indicates the pointer to an <b>OH_Drawing_TextBlob</b> object.
|
||||
* @param rect Indicates the pointer to an <b>OH_Drawing_Rect</b> object.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_TextBlobGetBounds(OH_Drawing_TextBlob*, OH_Drawing_Rect*);
|
||||
void OH_Drawing_TextBlobGetBounds(OH_Drawing_TextBlob* textBlob, OH_Drawing_Rect* rect);
|
||||
|
||||
/**
|
||||
* @brief Gets a non-zero value unique among all <b>OH_Drawing_TextBlob</b> objects.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_TextBlob Indicates the pointer to an <b>OH_Drawing_TextBlob</b> object.
|
||||
* @param textBlob Indicates the pointer to an <b>OH_Drawing_TextBlob</b> object.
|
||||
* @return Returns identifier for the <b>OH_Drawing_TextBlob</b> object.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
uint32_t OH_Drawing_TextBlobUniqueID(const OH_Drawing_TextBlob*);
|
||||
uint32_t OH_Drawing_TextBlobUniqueID(const OH_Drawing_TextBlob* textBlob);
|
||||
|
||||
/**
|
||||
* @brief Defines a run, supplies storage for glyphs and positions.
|
||||
@ -145,46 +145,46 @@ typedef struct {
|
||||
* by the caller and is forbidden to be used after OH_Drawing_TextBlobBuilderMake is called.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_TextBlobBuilder Indicates the pointer to an <b>OH_Drawing_TextBlobBuilder</b> object.
|
||||
* @param OH_Drawing_Font Indicates the pointer to an <b>OH_Drawing_Font</b> object.
|
||||
* @param textBlobBuilder Indicates the pointer to an <b>OH_Drawing_TextBlobBuilder</b> object.
|
||||
* @param font Indicates the pointer to an <b>OH_Drawing_Font</b> object.
|
||||
* @param count Indicates the number of glyphs.
|
||||
* @param OH_Drawing_Rect Indicates the optional run bounding box.
|
||||
* @param rect Indicates the optional run bounding box.
|
||||
* @since 11
|
||||
* @version 1.0
|
||||
*/
|
||||
const OH_Drawing_RunBuffer* OH_Drawing_TextBlobBuilderAllocRunPos(OH_Drawing_TextBlobBuilder*, const OH_Drawing_Font*,
|
||||
int32_t count, const OH_Drawing_Rect*);
|
||||
const OH_Drawing_RunBuffer* OH_Drawing_TextBlobBuilderAllocRunPos(OH_Drawing_TextBlobBuilder* textBlobBuilder,
|
||||
const OH_Drawing_Font* font, int32_t count, const OH_Drawing_Rect* rect);
|
||||
|
||||
/**
|
||||
* @brief Make an <b>OH_Drawing_TextBlob</b> from <b>OH_Drawing_TextBlobBuilder</b>.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_TextBlobBuilder Indicates the pointer to an <b>OH_Drawing_TextBlobBuilder</b> object.
|
||||
* @param textBlobBuilder Indicates the pointer to an <b>OH_Drawing_TextBlobBuilder</b> object.
|
||||
* @return Returns the pointer to the <b>OH_Drawing_TextBlob</b> object.
|
||||
* @since 11
|
||||
* @version 1.0
|
||||
*/
|
||||
OH_Drawing_TextBlob* OH_Drawing_TextBlobBuilderMake(OH_Drawing_TextBlobBuilder*);
|
||||
OH_Drawing_TextBlob* OH_Drawing_TextBlobBuilderMake(OH_Drawing_TextBlobBuilder* textBlobBuilder);
|
||||
|
||||
/**
|
||||
* @brief Destroys an <b>OH_Drawing_TextBlob</b> object and reclaims the memory occupied by the object.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_TextBlob Indicates the pointer to an <b>OH_Drawing_TextBlob</b> object.
|
||||
* @param textBlob Indicates the pointer to an <b>OH_Drawing_TextBlob</b> object.
|
||||
* @since 11
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_TextBlobDestroy(OH_Drawing_TextBlob*);
|
||||
void OH_Drawing_TextBlobDestroy(OH_Drawing_TextBlob* textBlob);
|
||||
|
||||
/**
|
||||
* @brief Destroys an <b>OH_Drawing_TextBlobBuilder</b> object and reclaims the memory occupied by the object.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_TextBlobBuilder Indicates the pointer to an <b>OH_Drawing_TextBlobBuilder</b> object.
|
||||
* @param textBlobBuilder Indicates the pointer to an <b>OH_Drawing_TextBlobBuilder</b> object.
|
||||
* @since 11
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_TextBlobBuilderDestroy(OH_Drawing_TextBlobBuilder*);
|
||||
void OH_Drawing_TextBlobBuilderDestroy(OH_Drawing_TextBlobBuilder* textBlobBuilder);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -13,9 +13,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef C_INCLUDE_DRAWING_TYPEFACE_H
|
||||
#define C_INCLUDE_DRAWING_TYPEFACE_H
|
||||
|
||||
/**
|
||||
* @addtogroup Drawing
|
||||
* @{
|
||||
@ -40,6 +37,9 @@
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
#ifndef C_INCLUDE_DRAWING_TYPEFACE_H
|
||||
#define C_INCLUDE_DRAWING_TYPEFACE_H
|
||||
|
||||
#include "drawing_error_code.h"
|
||||
#include "drawing_types.h"
|
||||
|
||||
@ -112,23 +112,23 @@ OH_Drawing_Typeface* OH_Drawing_TypefaceCreateFromCurrent(const OH_Drawing_Typef
|
||||
* it or free it again.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_MemoryStream Indicates the pointer to an <b>OH_Drawing_MemoryStream</b> object.
|
||||
* @param memoryStream Indicates the pointer to an <b>OH_Drawing_MemoryStream</b> object.
|
||||
* @param index memory stream index.
|
||||
* @return Returns the pointer to the <b>OH_Drawing_Typeface</b> object created.
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
OH_Drawing_Typeface* OH_Drawing_TypefaceCreateFromStream(OH_Drawing_MemoryStream*, int32_t index);
|
||||
OH_Drawing_Typeface* OH_Drawing_TypefaceCreateFromStream(OH_Drawing_MemoryStream* memoryStream, int32_t index);
|
||||
|
||||
/**
|
||||
* @brief Destroys an <b>OH_Drawing_Typeface</b> object and reclaims the memory occupied by the object.
|
||||
*
|
||||
* @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
|
||||
* @param OH_Drawing_Typeface Indicates the pointer to an <b>OH_Drawing_Typeface</b> object.
|
||||
* @param typeface Indicates the pointer to an <b>OH_Drawing_Typeface</b> object.
|
||||
* @since 11
|
||||
* @version 1.0
|
||||
*/
|
||||
void OH_Drawing_TypefaceDestroy(OH_Drawing_Typeface*);
|
||||
void OH_Drawing_TypefaceDestroy(OH_Drawing_Typeface* typeface);
|
||||
|
||||
/**
|
||||
* @brief Creates an <b>OH_Drawing_FontArguments</b> object.
|
||||
|
@ -13,9 +13,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef C_INCLUDE_DRAWING_TYPES_H
|
||||
#define C_INCLUDE_DRAWING_TYPES_H
|
||||
|
||||
/**
|
||||
* @addtogroup Drawing
|
||||
* @{
|
||||
@ -40,6 +37,9 @@
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
#ifndef C_INCLUDE_DRAWING_TYPES_H
|
||||
#define C_INCLUDE_DRAWING_TYPES_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
Loading…
Reference in New Issue
Block a user