App:Library:LVGL:docs:Widgets:Line (lv line)

提供: robot-jp wiki
ナビゲーションに移動検索に移動

https://docs.lvgl.io/8.2/widgets/core/arc.html

Line (lv_line)

Overview

英文 自動翻訳

The Line object is capable of drawing straight lines between a set of points.

ラインオブジェクトは、一連の点間に直線を引くことができる。
戻る : Previous


Parts and Styles

英文 自動翻訳
  • LV_PART_MAIN uses all the typical background properties and line style properties.
  • LV_PART_MAIN 一般的な背景プロパティとラインスタイルプロパティをすべて使用します。
戻る : Previous


Usage

Set points

英文 自動翻訳

The points have to be stored in an lv_point_t array and passed to the object by the lv_line_set_points(lines, point_array, point_cnt) function.

ポイントは lv_point_tの配列に格納し、 lv_line_set_points(lines, point_array, point_cnt) 関数でオブジェクトに渡さなければなりません。
戻る : Previous


Auto-size

英文 自動翻訳

By default, the Line's width and height are set to LV_SIZE_CONTENT.

This means it will automatically set its size to fit all the points.

If the size is set explicitly, parts on the line may not be visible.

デフォルトでは、Lineの幅と高さはLV_SIZE_CONTENTに設定されています。

これは、すべてのポイントにフィットするように自動的にサイズを設定することを意味します。

サイズを明示的に設定した場合、ライン上のパーツが見えなくなることがあります。

戻る : Previous


Invert y

英文 自動翻訳

By default, the y == 0 point is in the top of the object. It might be counter-intuitive in some cases so the y coordinates can be inverted with lv_line_set_y_invert(line, true).

In this case, y == 0 will be the bottom of the object. y invert is disabled by default.

デフォルトでは、y==0点はオブジェクトの上部にあります。これは直感に反する場合があるので、lv_line_set_y_invert(line, true)で y 座標を反転させることができます。

この場合、y==0はオブジェクトの底になります。yの反転はデフォルトでは無効になっています。

戻る : Previous


Events

英文 自動翻訳

Only the Generic events are sent by the object type.

See the events of the Base object too.

Learn more about Events.

汎用イベントのみがオブジェクトタイプによって送信されます。

Baseオブジェクトのイベントも参照してください。

イベントの詳細を確認してください。

戻る : Previous


Keys

英文 自動翻訳

No Keys are processed by the object type.

Learn more about Keys.

オブジェクトタイプによって処理されるキーはありません。

キーの詳細を確認してください。

戻る : Previous


Example

英文 自動翻訳

Simple Line

LVGL docs example 086.png

戻る : Previous


API

英文 自動翻訳

Functions

lv_obj_t *lv_line_create(lv_obj_t *parent)

Create a line object
Parameters
parent -- pointer to an object, it will be the parent of the new line
Returns
pointer to the created line

void lv_line_set_points(lv_obj_t *obj, const lv_point_t points[], uint16_t point_num)

Set an array of points. The line object will connect these points.
Parameters
  • obj -- pointer to a line object
  • points -- an array of points. Only the address is saved, so the array needs to be alive while the line exists
  • point_num -- number of points in 'point_a'

void lv_line_set_y_invert(lv_obj_t *obj, bool en)

Enable (or disable) the y coordinate inversion. If enabled then y will be subtracted from the height of the object, therefore the y = 0 coordinate will be on the bottom.
Parameters
  • obj -- pointer to a line object
  • en -- true: enable the y inversion, false:disable the y inversion

bool lv_line_get_y_invert(const lv_obj_t *obj)

Get the y inversion attribute
Parameters
obj -- pointer to a line object
Returns
true: y inversion is enabled, false: disabled

Variables

const lv_obj_class_t lv_line_class

struct lv_line_t

Public Members
lv_obj_t obj
const lv_point_t *point_array
Pointer to an array with the points of the line
uint16_t point_num
Number of points in 'point_array'
uint8_t y_inv
1: y == 0 will be on the bottom


機能

lv_obj_t * lv_line_create(lv_obj_t * parent)

ラインオブジェクトを作成する
パラメーター
parent-オブジェクトへのポインタ。これは新しい行の親になります
戻り値
作成された行へのポインタ

void lv_line_set_points(lv_obj_t * obj、const lv_point_t points []、uint16_t point_num)

ポイントの配列を設定します。ラインオブジェクトはこれらのポイントを接続します。
パラメーター
  • obj-ラインオブジェクトへのポインタ
  • points-ポイントの配列。アドレスのみが保存されるため、回線が存在する間、配列は存続している必要があります
  • point_num-'point_a'のポイント数

void lv_line_set_y_invert(lv_obj_t * obj、bool en)

y座標の反転を有効(または無効)にします。有効にすると、オブジェクトの高さからyが差し引かれます。したがって、y=0の座標が下部になります。
パラメーター
  • obj-ラインオブジェクトへのポインタ
  • in --true:and inversionを有効にし、false:andinversionを無効にします

bool lv_line_get_y_invert(const lv_obj_t * obj)

y反転属性を取得します
パラメーター
obj-ラインオブジェクトへのポインタ
戻り値
true:y反転が有効、false:無効

変数

const lv_obj_class_t lv_line_class

struct lv_line_t

パブリックメンバー
lv_obj_t obj
const lv_point_t * point_array
線の点を持つ配列へのポインタ
uint16_t point_num
'point_array'のポイント数
uint8_t y_inv
1:y==0が一番下になります


戻る : Previous