「App:Library:LVGL:docs:Widgets:Object mask (lv objmask)」の版間の差分
提供: robot-jp wiki
ナビゲーションに移動検索に移動30行目: | 30行目: | ||
!自動翻訳 | !自動翻訳 | ||
|- | |- | ||
− | | | + | |Before adding a mask to the ''Object mask'' the mask should be initialized: |
− | | | + | lv_draw_mask_<type>_param_t mask_param; |
+ | lv_draw_mask_<type>_init(&mask_param, ...); | ||
+ | lv_objmask_mask_t * mask_p = lv_objmask_add_mask(objmask, &mask_param); | ||
+ | Lvgl supports the following mask types: | ||
+ | |||
+ | * line clip the pixels on the top/bottom left/right of a line. Can be initialized from two points or a point and an angle: | ||
+ | * angle keep the pixels only between a given start and end angle | ||
+ | * radius keep the pixel only inside a rectangle which can have radius (can for a circle too). Can be inverted to keep the pixel outside of the rectangle. | ||
+ | * fade fade vertically (change the pixels opacity according to their y position) | ||
+ | * map use an alpha mask (a byte array) to describe the pixels opacity. | ||
+ | |||
+ | |||
+ | The coordinates in the mask are relative to the Object. That is if the object moves the masks move with it. | ||
+ | |||
+ | For the details of the mask '''''init''''' function see the API documentation below. | ||
+ | |オブジェクト マスクにマスクを追加する前に、マスクを初期化する必要があります。 | ||
+ | lv_draw_mask_<type>_param_t mask_param; | ||
+ | lv_draw_mask_<type>_init(&mask_param, ...); | ||
+ | lv_objmask_mask_t * mask_p = lv_objmask_add_mask(objmask, &mask_param); | ||
+ | Lvgl は、次のマスク タイプをサポートしています。 | ||
+ | |||
+ | * line は、ラインの上/下の左/右のピクセルをクリップします。 2 点または 1 点と角度から初期化できます。 | ||
+ | * angle は、指定された開始角度と終了角度の間のピクセルのみを保持します | ||
+ | * radius は、半径を持つことができる長方形の内側にのみピクセルを保持します (円も可能)。 ピクセルを長方形の外側に保つために反転できます。 | ||
+ | * 垂直方向にフェードします (y 位置に応じてピクセルの不透明度を変更します) | ||
+ | * map はアルファ マスク (バイト配列) を使用して、ピクセルの不透明度を記述します。 | ||
+ | |||
+ | |||
+ | マスク内の座標は、オブジェクトに対して相対的です。 つまり、オブジェクトが移動すると、マスクも一緒に移動します。 | ||
+ | |||
+ | mask '''''init''''' 関数の詳細については、以下の API ドキュメントを参照してください。 | ||
|} | |} | ||
:[[App:Library:LVGL:docs:Widgets|戻る : Previous]] | :[[App:Library:LVGL:docs:Widgets|戻る : Previous]] |
2022年8月31日 (水) 18:29時点における版
https://docs.lvgl.io/latest/en/html/widgets/objmask.html
Object mask (lv_objmask)
Overview
英文 | 自動翻訳 |
---|---|
The Object mask is capable of add some mask to drawings when its children is drawn. | オブジェクト マスクは、その子が描画されるときに描画にマスクを追加できます。 |
Parts and Styles
英文 | 自動翻訳 |
---|---|
The Object mask has only a main part called LV_OBJMASK_PART_BG and it uses the typical background style properties.
|
オブジェクト マスクには LV_OBJMASK_PART_BG というメイン パーツのみがあり、典型的な背景スタイル プロパティを使用します。 |
Usage
Adding mask
英文 | 自動翻訳 |
---|---|
Before adding a mask to the Object mask the mask should be initialized:
lv_draw_mask_<type>_param_t mask_param; lv_draw_mask_<type>_init(&mask_param, ...); lv_objmask_mask_t * mask_p = lv_objmask_add_mask(objmask, &mask_param); Lvgl supports the following mask types:
For the details of the mask init function see the API documentation below. |
オブジェクト マスクにマスクを追加する前に、マスクを初期化する必要があります。
lv_draw_mask_<type>_param_t mask_param; lv_draw_mask_<type>_init(&mask_param, ...); lv_objmask_mask_t * mask_p = lv_objmask_add_mask(objmask, &mask_param); Lvgl は、次のマスク タイプをサポートしています。
mask init 関数の詳細については、以下の API ドキュメントを参照してください。 |
Update mask
英文 | 自動翻訳 |
---|---|
Remove mask
英文 | 自動翻訳 |
---|---|
Events
英文 | 自動翻訳 |
---|---|
Keys
英文 | 自動翻訳 |
---|---|
Example
Simple Gauge
英文 | 自動翻訳 |
---|---|
API
英文 | 自動翻訳 |
---|---|