Merge remote-tracking branch 'upstream/master'

This commit is contained in:
kirby
2025-09-28 16:21:55 +08:00
37 changed files with 55 additions and 29 deletions
+25 -15
View File
@@ -2,7 +2,7 @@
## Introduction
The graphic_cangjie_wrapper is a Cangjie API encapsulated on OpenHarmony based on the capabilities of the Graphics Subsystem. The Graphics subsystem mainly consists of user interface (UI) components, layout, animator, font, input event, window management, and rendering and drawing modules. It is an application framework that can be built on the standard OS to develop OpenHarmony applications for standard and large-system devices.
The graphic_cangjie_wrapper is a Cangjie API encapsulated on OpenHarmony for application developers to provide Cangjie color management capability API. The currently open file management Cangjie interface only supports standard devices.
## System Architecture
@@ -13,9 +13,19 @@ The following figure shows the architecture of the Graphics subsystem.
As shown in the architecture diagram:
- Color Manager: Provide gamut-dependent configuration capabilities.
- Cangjie graphics FFI interface definition: Responsible for defining the C language interoperable Cangjie interface, which is used to realize Cangjie graphics.
- Effect: Mainly completes the ability to process image effects, rendering effects and other effects, including: multi-effect series and parallel processing, adding rendering effects, control interaction effects and other related capabilities during layout.
Interface layer description:
- Color Management API: Cangjie public interfaces based on color management encapsulation exposed to developers.
Framework layer description:
- Color Management Wrapper: Provide gamut-dependent configuration capabilities. This encapsulation layer is a Cangjie encapsulation implementation of color management functionality based on graphic_2d.
Cangjie Graphics Dependencies:
- graphic_2d: Provides native functionality implementation of image effects, rendering effects and other effects processing capabilities that can be called by the graphics Cangjie wrapper, including: multi-effect series and parallel processing, adding rendering effects, control interaction effects and other related capabilities during layout.
- Cangjie Interop: Encapsulates public interfaces for C language interoperation, and provides Cangjie tag class implementation for annotating Cangjie APIs, as well as providing BusinessException exception class definitions thrown to users.
- Cangjie DFX: Responsible for providing log interfaces, providing Cangjie interfaces that can be called by the graphics Cangjie interface to print logs at critical paths.
## Directory Structure
@@ -28,26 +38,26 @@ foundation/graphic/graphic_cangjie_wrapper
│ └── graphics # Cangjie Graphics code implementation
│ └── color_space_manager # Color management module
└── test # Cangjie test code
└── APILevel22 # API Level 22 test code
└── color_manager # Color management tests
└── test # Color management test project
└── color_manager # Color management tests
```
## Usage Guidelines
The current Cangjie Graphics interface provides only Color Management.
Color management, including creating standard color spaces and custom color spaces, as well as methods for obtaining color space related information.
Color management, including creating standard color spaces and custom color spaces, as well as methods for obtaining color space related information. Supports developers in setting/getting color space related information in image processing and camera management.
Compared with the API capabilities provided by ArkTS, the following functions are not supported at the moment:
For usage guidelines, please refer to [Color Management Development Guide](https://gitcode.com/openharmony-sig/arkcompiler_cangjie_ark_interop/blob/master/doc/Dev_Guide/source_en/graphics/cj-color-manager-development-guide.md).
- The rendering capabilities of the UI framework.
- 2D rendering, 3D rendering and rendering engine management.
- Related capabilities of the animation engine.
- Ability to process image effects, rendering effects.
- The display and memory management capabilities.
## Constraints
For Graphic-related APIs, please refer to [Color Management API](https://gitcode.com/openharmony-sig/arkcompiler_cangjie_ark_interop/blob/master/doc/API_Reference/source_en/apis/ArkGraphics2D/cj-apis-color_manager.md).
Compared with the API capabilities provided by ArkTS, the following functions are not supported:
- [Image processing capabilities for image effects and rendering effects](https://gitcode.com/openharmony/docs/blob/master/en/application-dev/reference/apis-arkgraphics2d/js-apis-effectKit.md).
- [Variable frame rate feature for self-drawing UI](https://gitcode.com/openharmony/docs/blob/master/en/application-dev/reference/apis-arkgraphics2d/js-apis-graphics-displaySync.md).
- [HDR (High Dynamic Range) capability](https://gitcode.com/openharmony/docs/blob/master/en/application-dev/reference/apis-arkgraphics2d/js-apis-hdrCapability.md)
- [Text layout and font management capabilities](https://gitcode.com/openharmony/docs/blob/master/en/application-dev/reference/apis-arkgraphics2d/js-apis-graphics-text.md).
- [Effect cascading capability](https://gitcode.com/openharmony/docs/blob/master/en/application-dev/reference/apis-arkgraphics2d/js-apis-uiEffect.md)
## Code Contribution
+30 -14
View File
@@ -1,8 +1,8 @@
# 图形图像仓颉接口
# 图形图像仓颉封装
## 简介
图形图像仓颉接口是在OpenHarmony上基于图形子系统能力之上封装的仓颉API。图形子系统为OpenHarmony提供包括UI组件、布局、动画、字体、输入事件、窗口管理、渲染绘制等模块,构建基于标准OS的应用框架满足standard设备的OpenHarmony系统应用开发
图形图像仓颉封装为OpenHarmony应用开发者提供了仓颉的色彩管理能力API,当前开放的文件管理仓颉接口仅支持standard设备
## 系统架构
@@ -13,9 +13,19 @@
如架构图所示:
- 色彩管理:提供色域相关配置能力。
- 仓颉图形图像FFI接口定义:负责定义被Cangjie语言调用的C语言互操作接口,用于实现仓颉图形图像能力。
- Effect:主要完成图片效果、渲染特效等效果处理的能力,包括:多效果的串联、并联处理,在布局时加入渲染特效、控件交互特效等相关能力
接口层说明:
- 色彩管理API:提供管理抽象化色域对象的一些基础能力,包括色域对象的创建与色域基础属性的获取的仓颉公开接口声明
框架层说明:
- 色彩管理封装:提供色域相关创建与获取能力。该封装层是基于graphic_2d对色彩管理功能进行的仓颉封装实现。
仓颉图形图像依赖部件引用说明:
- graphic_2d:提供可被图形图像仓颉封装调用的图片效果、渲染特效等效果处理的能力的native功能实现,包括:多效果的串联、并联处理,在布局时加入渲染特效、控件交互特效等相关能力。
- cangjie_ark_interop:封装C语言互操作公共接口,并提供仓颉标签类实现用于对仓颉API进行标注,以及提供抛向用户的BusinessException异常类定义。
- hiviewdfx_cangjie_wrapper:负责提供日志接口,提供可被图形图像仓颉接口调用的在关键路径处打印日志能力的仓颉接口。
## 目录
@@ -28,9 +38,7 @@ foundation/graphic/graphic_cangjie_wrapper
│ └── graphics # 仓颉图形接口实现
│ └── color_space_manager # 色彩管理模块
└── test # 仓颉测试代码
└── APILevel22 # API Level 22测试代码
└── color_manager # 色彩管理测试
└── test # 色彩管理测试工程
└── color_manager # 色彩管理测试
```
## 使用说明
@@ -39,16 +47,24 @@ foundation/graphic/graphic_cangjie_wrapper
色彩管理,包括创建标准色彩空间和自定义色彩空间,以及获取色彩空间相关信息的方法。支持开发者在图片处理、相机管理中设置/获取颜色空间相关信息。
相关使用指南请参见[色彩管理开发指导](https://gitcode.com/openharmony-sig/arkcompiler_cangjie_ark_interop/blob/master/doc/Dev_Guide/source_zh_cn/graphics/cj-color-manager-development-guide.md)。
## 约束
与ArkTS提供的API能力相比,暂不支持以下功能:
- UI框架的绘制能力。
- 2D渲染、3D渲染和渲染引擎的管理。
- 动画引擎的相关能力。
- 图片效果、渲染特效能力。
- 显示与内存管理能力。
- AR引擎服务
- graphic_3d服务
- 图形加速服务
- GPU加速引擎服务
graphic_2d服务中暂不支持:
图形相关API请参见[色彩管理API](https://gitcode.com/openharmony-sig/arkcompiler_cangjie_ark_interop/blob/master/doc/API_Reference/source_zh_cn/apis/ArkGraphics2D/cj-apis-color_manager.md)
- [图像效果](https://gitcode.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis-arkgraphics2d/js-apis-effectKit.md):提供了处理图像的基础能力,包括亮度调节、模糊化、灰度调节和智能取色等
- [可变帧率](https://gitcode.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis-arkgraphics2d/js-apis-graphics-displaySync.md):支持让开发者以指定帧率来运行UI业务,一般用于开发者自绘制UI,并且对于帧率有特定诉求的场景。
- [HDR能力](https://gitcode.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis-arkgraphics2d/js-apis-hdrCapability.md):提供HDR(高动态显示范围)能力。
- [文本模块](https://gitcode.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis-arkgraphics2d/js-apis-graphics-text.md):提供高质量的排版,包括字符到字形的转换、字距调整、换行、对齐、文本测量等。。
- [效果级联](https://gitcode.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis-arkgraphics2d/js-apis-uiEffect.md):提供组件效果的一些基础能力,包括模糊、边缘像素扩展、提亮等。
## 参与贡献
Binary file not shown.

Before

Width:  |  Height:  |  Size: 90 KiB

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 81 KiB

After

Width:  |  Height:  |  Size: 64 KiB

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB