App:Library:LVGL:docs:Widgets:Arc (lv arc)
https://docs.lvgl.io/8.2/widgets/core/arc.html
Arc (lv_arc)
Overview
英文 | 自動翻訳 |
---|---|
The Arc consists of a background and a foreground arc. The foreground (indicator) can be touch-adjusted. |
アークは、背景と前景のアークで構成されています。
前景(インジケーター)はタッチ調整できます。 |
Parts and Styles
英文 | 自動翻訳 |
---|---|
|
|
Usage
Value and range
英文 | 自動翻訳 |
---|---|
A new value can be set using The value is interpreted in a range (minimum and maximum values) which can be modified with The default range is 0..100.
The indicator arc is drawn on the main part's arc. This if the value is set to maximum the indicator arc will cover the entire "background" arc. To set the start and end angle of the background arc use the
|
lv_arc_set_value(arc, new_value) を使用して新しい値を設定できます。
値は、 デフォルトの範囲は0..100です。
角度は[0;360]の範囲内である必要があります。 |
Rotation
英文 | 自動翻訳 |
---|---|
An offset to the 0 degree position can be added with |
0度の位置へのオフセットは、lv_arc_set_rotation(arc, deg) で追加できます。
|
Mode
英文 | 自動翻訳 |
---|---|
The arc can be one of the following modes:
|
アークは、次のいずれかのモードになります。
|
Change rate
英文 | 自動翻訳 |
---|---|
If the arc is pressed the current value will set with a limited speed according to the set change rate. The change rate is defined in degree/second unit and can be set with |
アークが押されると、現在の値は設定された変化率に従って制限された速度で設定されます。
変化率は度/秒単位で定義され、 |
Setting the indicator manually
英文 | 自動翻訳 |
---|---|
It's also possible to set the angles of the indicator arc directly with In this case the set "value" and "mode" are ignored.
You should exclusively use one or the other. Mixing the two might result in unintended behavior. To make the arc non-adjustable, remove the style of the knob and make the object non-clickable: lv_obj_remove_style(arc, NULL, LV_PART_KNOB);
lv_obj_clear_flag(arc, LV_OBJ_FLAG_CLICKABLE);
|
この場合、設定された「値」と「モード」は無視されます。
どちらか一方だけを使用する必要があります。 2つを混合すると、意図しない動作が発生する可能性があります。 円弧を調整できないようにするには、ノブのスタイルを削除し、オブジェクトをクリックできないようにします。 lv_obj_remove_style (arc 、 NULL 、 LV_PART_KNOB );
lv_obj_clear_flag (arc 、 LV_OBJ_FLAG_CLICKABLE );
|
Advanced hit test
英文 | 自動翻訳 |
---|---|
If the |
フラグが有効になっている場合LV_OBJ_FLAG_ADV_HITTEST 、アークは中央でクリックスルーできます。クリックは、背景の弧のリングでのみ認識されます。lv_obj_set_ext_click_size() 与えられたピクセル数で、敏感な領域を内側と外側に大きくします。
|
Events
英文 | 自動翻訳 |
---|---|
See the events of the Base object too. Learn more about Events. |
Baseオブジェクトのイベントも参照してください。 イベントの詳細をご覧ください。 |
Keys
英文 | 自動翻訳 |
---|---|
Learn more about Keys. |
キーの詳細をご覧ください。 |
Example
Simple Arc
英文 | 自動翻訳 |
---|---|
Loader with Arc |
API
英文 | 自動翻訳 |
---|---|
Typedefs typedef uint8_t lv_arc_mode_t Enums enum [anonymous]
enum lv_arc_draw_part_type_t
Functions lv_obj_t *lv_arc_create(lv_obj_t *parent)
void lv_arc_set_start_angle(lv_obj_t *arc, uint16_t start)
void lv_arc_set_end_angle(lv_obj_t *arc, uint16_t end)
void lv_arc_set_angles(lv_obj_t *arc, uint16_t start, uint16_t end)
void lv_arc_set_bg_start_angle(lv_obj_t *arc, uint16_t start)
void lv_arc_set_bg_end_angle(lv_obj_t *arc, uint16_t end)
void lv_arc_set_bg_angles(lv_obj_t *arc, uint16_t start, uint16_t end)
void lv_arc_set_rotation(lv_obj_t *arc, uint16_t rotation)
void lv_arc_set_mode(lv_obj_t *arc, lv_arc_mode_t type)
void lv_arc_set_value(lv_obj_t *arc, int16_t value)
void lv_arc_set_range(lv_obj_t *arc, int16_t min, int16_t max)
void lv_arc_set_change_rate(lv_obj_t *arc, uint16_t rate)
uint16_t lv_arc_get_angle_start(lv_obj_t *obj)
uint16_t lv_arc_get_angle_end(lv_obj_t *obj)
uint16_t lv_arc_get_bg_angle_start(lv_obj_t *obj)
uint16_t lv_arc_get_bg_angle_end(lv_obj_t *obj)
int16_t lv_arc_get_value(const lv_obj_t *obj)
int16_t lv_arc_get_min_value(const lv_obj_t *obj)
int16_t lv_arc_get_max_value(const lv_obj_t *obj)
lv_arc_mode_t lv_arc_get_mode(const lv_obj_t *obj)
Variables const lv_obj_class_t lv_arc_class struct lv_arc_t
|
typedef uint8_t lv_arc_mode_t 列挙型 列挙型[匿名]
列挙型lv_arc_draw_part_type_t
機能 lv_obj_t * lv_arc_create(lv_obj_t * parent)
void lv_arc_set_start_angle(lv_obj_t * arc、uint16_t start)
void lv_arc_set_end_angle(lv_obj_t * arc、uint16_t end)
void lv_arc_set_angles(lv_obj_t * arc、uint16_t start、uint16_t end)
void lv_arc_set_bg_start_angle(lv_obj_t * arc、uint16_t start)
void lv_arc_set_bg_end_angle(lv_obj_t * arc、uint16_t end)
void lv_arc_set_bg_angles(lv_obj_t * arc、uint16_t start、uint16_t end)
void lv_arc_set_rotation(lv_obj_t * arc、uint16_trotation)
void lv_arc_set_mode(lv_obj_t * arc、lv_arc_mode_t type)
void lv_arc_set_value(lv_obj_t * arc、int16_t value)
void lv_arc_set_range(lv_obj_t * arc、int16_t min、int16_t max)
void lv_arc_set_change_rate(lv_obj_t * arc、uint16_t rate)
uint16_t lv_arc_get_angle_start(lv_obj_t * obj)
uint16_t lv_arc_get_angle_end(lv_obj_t * obj)
uint16_t lv_arc_get_bg_angle_start(lv_obj_t * obj)
uint16_t lv_arc_get_bg_angle_end(lv_obj_t * obj)
int16_t lv_arc_get_value(const lv_obj_t * obj)
int16_t lv_arc_get_min_value(const lv_obj_t * obj)
int16_t lv_arc_get_max_value(const lv_obj_t * obj)
lv_arc_mode_t lv_arc_get_mode(const lv_obj_t * obj)
変数 const lv_obj_class_t lv_arc_class struct lv_arc_t
|