「App:Library:LVGL:docs:Widgets:Object mask (lv objmask)」の版間の差分
提供: robot-jp wiki
ナビゲーションに移動検索に移動(同じ利用者による、間の10版が非表示) | |||
18行目: | 18行目: | ||
!自動翻訳 | !自動翻訳 | ||
|- | |- | ||
− | |The Object mask has only a main part called <code>LV_OBJMASK_PART_BG</code> and it uses the typical background style properties. | + | |The Object mask has only a main part called <code style="color: #bb0000;">LV_OBJMASK_PART_BG</code> and it uses the typical background style properties. |
− | |オブジェクト マスクには LV_OBJMASK_PART_BG というメイン パーツのみがあり、典型的な背景スタイル プロパティを使用します。 | + | |オブジェクト マスクには <code style="color: #bb0000;">LV_OBJMASK_PART_BG</code> というメイン パーツのみがあり、典型的な背景スタイル プロパティを使用します。 |
|} | |} | ||
:[[App:Library:LVGL:docs:Widgets|戻る : Previous]] | :[[App:Library:LVGL:docs:Widgets|戻る : Previous]] | ||
31行目: | 31行目: | ||
|- | |- | ||
|Before adding a mask to the ''Object mask'' the mask should be initialized: | |Before adding a mask to the ''Object mask'' the mask should be initialized: | ||
+ | <syntaxhighlight lang="C++" style="border: 1px dashed gray;"> | ||
lv_draw_mask_<type>_param_t mask_param; | lv_draw_mask_<type>_param_t mask_param; | ||
lv_draw_mask_<type>_init(&mask_param, ...); | lv_draw_mask_<type>_init(&mask_param, ...); | ||
lv_objmask_mask_t * mask_p = lv_objmask_add_mask(objmask, &mask_param); | lv_objmask_mask_t * mask_p = lv_objmask_add_mask(objmask, &mask_param); | ||
+ | </syntaxhighlight> | ||
Lvgl supports the following mask types: | Lvgl supports the following mask types: | ||
45行目: | 47行目: | ||
The coordinates in the mask are relative to the Object. That is if the object moves the masks move with it. | 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. | + | For the details of the mask '''''init''''' function see the [https://robot-jp.com/wiki/index.php/App:Library:LVGL:docs:Widgets:Object_mask_(lv_objmask)#API <u>'''API'''</u>] documentation below. |
|オブジェクト マスクにマスクを追加する前に、マスクを初期化する必要があります。 | |オブジェクト マスクにマスクを追加する前に、マスクを初期化する必要があります。 | ||
+ | <syntaxhighlight lang="C++" style="border: 1px dashed gray;"> | ||
lv_draw_mask_<type>_param_t mask_param; | lv_draw_mask_<type>_param_t mask_param; | ||
lv_draw_mask_<type>_init(&mask_param, ...); | lv_draw_mask_<type>_init(&mask_param, ...); | ||
lv_objmask_mask_t * mask_p = lv_objmask_add_mask(objmask, &mask_param); | lv_objmask_mask_t * mask_p = lv_objmask_add_mask(objmask, &mask_param); | ||
+ | </syntaxhighlight> | ||
Lvgl は、次のマスク タイプをサポートしています。 | Lvgl は、次のマスク タイプをサポートしています。 | ||
61行目: | 65行目: | ||
マスク内の座標は、オブジェクトに対して相対的です。 つまり、オブジェクトが移動すると、マスクも一緒に移動します。 | マスク内の座標は、オブジェクトに対して相対的です。 つまり、オブジェクトが移動すると、マスクも一緒に移動します。 | ||
− | mask '''''init''''' 関数の詳細については、以下の API ドキュメントを参照してください。 | + | mask '''''init''''' 関数の詳細については、以下の [https://robot-jp.com/wiki/index.php/App:Library:LVGL:docs:Widgets:Object_mask_(lv_objmask)#API <u>'''API'''</u>] ドキュメントを参照してください。 |
|} | |} | ||
:[[App:Library:LVGL:docs:Widgets|戻る : Previous]] | :[[App:Library:LVGL:docs:Widgets|戻る : Previous]] | ||
− | |||
=== Update mask === | === Update mask === | ||
71行目: | 74行目: | ||
!自動翻訳 | !自動翻訳 | ||
|- | |- | ||
− | | | + | |AN existing mask can be updated with <code style="color: #bb0000;">lv_objmask_update_mask(objmask, mask_p, new_param)</code>, where <code style="color: #bb0000;">mask_p</code> is return value of <code style="color: #bb0000;">lv_objmask_add_mask</code>. |
− | | | + | |既存のマスクは <code style="color: #bb0000;">lv_objmask_update_mask(objmask, mask_p, new_param)</code> で更新できます。ここで、<code style="color: #bb0000;">mask_p</code> は <code style="color: #bb0000;">lv_objmask_add_mask</code> の戻り値です。 |
|} | |} | ||
:[[App:Library:LVGL:docs:Widgets|戻る : Previous]] | :[[App:Library:LVGL:docs:Widgets|戻る : Previous]] | ||
82行目: | 85行目: | ||
!自動翻訳 | !自動翻訳 | ||
|- | |- | ||
− | | | + | |A mask can be removed with <code style="color: #bb0000;">lv_objmask_remove_mask(objmask, mask_p)</code> |
− | | | + | |マスクは <code style="color: #bb0000;">lv_objmask_remove_mask(objmask, mask_p)</code> で削除できます |
|} | |} | ||
:[[App:Library:LVGL:docs:Widgets|戻る : Previous]] | :[[App:Library:LVGL:docs:Widgets|戻る : Previous]] | ||
93行目: | 96行目: | ||
!自動翻訳 | !自動翻訳 | ||
|- | |- | ||
− | | | + | |Only the [https://docs.lvgl.io/latest/en/html/overview/event.html#generic-events <u>Generic events</u>] are sent by the object type. |
− | | | + | |
+ | |||
+ | Learn more about [https://docs.lvgl.io/latest/en/html/overview/event.html <u>Events</u>]. | ||
+ | |[https://docs.lvgl.io/latest/en/html/overview/event.html#generic-events <u>Generic events</u>]のみがオブジェクトタイプによって送信されます。 | ||
+ | |||
+ | |||
+ | 詳細は[https://docs.lvgl.io/latest/en/html/overview/event.html <u>Events</u>]をご覧ください。 | ||
|} | |} | ||
:[[App:Library:LVGL:docs:Widgets|戻る : Previous]] | :[[App:Library:LVGL:docs:Widgets|戻る : Previous]] | ||
103行目: | 112行目: | ||
!自動翻訳 | !自動翻訳 | ||
|- | |- | ||
− | | | + | |No ''Keys'' are processed by the object type. |
− | | | + | |
+ | |||
+ | Learn more about <u>[[App:Library:LVGL:docs:Overview:Input devices|Keys]]</u>. | ||
+ | |オブジェクトタイプで処理されるキーはありません。 | ||
+ | |||
+ | |||
+ | |||
+ | 詳細は<u>[[App:Library:LVGL:docs:Overview:Input devices|Keys]]</u>をご覧ください。 | ||
|} | |} | ||
:[[App:Library:LVGL:docs:Widgets|戻る : Previous]] | :[[App:Library:LVGL:docs:Widgets|戻る : Previous]] | ||
110行目: | 126行目: | ||
== Example == | == Example == | ||
− | === | + | === Several object masks === |
{| class="wikitable" | {| class="wikitable" | ||
− | |||
− | |||
|- | |- | ||
− | | | + | |[[file:LVGL Lib docs SeveralObjectMasks.png|link=https://docs.lvgl.io/latest/en/html/widgets/objmask.html#several-object-masks]] |
− | | | ||
|} | |} | ||
− | |||
− | + | === Text mask === | |
− | == | ||
{| class="wikitable" | {| class="wikitable" | ||
− | |||
− | |||
|- | |- | ||
− | | | + | |[[file:LVGL Lib docs TextMask.png|link=https://docs.lvgl.io/latest/en/html/widgets/objmask.html#text-mask]] |
− | | | ||
|} | |} | ||
+ | :[[App:Library:LVGL:docs:Widgets|戻る : Previous]] | ||
+ | |||
+ | == [https://docs.lvgl.io/latest/en/html/widgets/objmask.html#api API] == | ||
:[[App:Library:LVGL:docs:Widgets|戻る : Previous]] | :[[App:Library:LVGL:docs:Widgets|戻る : Previous]] |
2022年8月31日 (水) 18:42時点における最新版
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
英文 | 自動翻訳 |
---|---|
AN existing mask can be updated with lv_objmask_update_mask(objmask, mask_p, new_param) , where mask_p is return value of lv_objmask_add_mask .
|
既存のマスクは lv_objmask_update_mask(objmask, mask_p, new_param) で更新できます。ここで、mask_p は lv_objmask_add_mask の戻り値です。
|
Remove mask
英文 | 自動翻訳 |
---|---|
A mask can be removed with lv_objmask_remove_mask(objmask, mask_p)
|
マスクは lv_objmask_remove_mask(objmask, mask_p) で削除できます
|
Events
英文 | 自動翻訳 |
---|---|
Only the Generic events are sent by the object type.
|
Generic eventsのみがオブジェクトタイプによって送信されます。
|
Keys
英文 | 自動翻訳 |
---|---|
No Keys are processed by the object type.
|
オブジェクトタイプで処理されるキーはありません。
詳細はKeysをご覧ください。 |