App:Library:LVGL:docs:Widgets:Color picker (lv cpicker)

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

https://docs.lvgl.io/latest/en/html/widgets/cpicker.html

Color picker (lv_cpicker)

Overview

英文 自動翻訳
As its name implies Color picker allows to select color.

The Hue, Saturation and Value of the color can be selected after each other.


The widget has two forms: circle (disc) and rectangle.


In both forms, be long pressing the object, the color picker will change to the next parameter of the color (hue, saturation or value).

Besides, double click will reset the current parameter.

カラーピッカーは、その名の通り、色を選択するためのツールです。

色相、彩度、明度を順番に選択することができます。


このウィジェットには、円(ディスク)と矩形の2つの形式があります。


どちらの形でも、オブジェクトを長押しすると、カラーピッカーは次の色のパラメータ(色相、彩度、明度)に切り替わります。

また、ダブルクリックすると、現在のパラメータがリセットされます。

戻る : Previous


Parts and Styles

英文 自動翻訳
The Color picker's main part is called LV_CPICKER_PART_BG.

In circular form it uses scale_width to set the the width of the circle and pad_inner for padding between the circle and the inner preview circle.

In rectangle mode radius can be used to apply a radius on the rectangle.


The object has virtual part called LV_CPICKER_PART_KNOB which is rectangle (or circle) drawn on the current value.

It uses all the rectangle like style properties and padding to make it larger than the width of the circle or rectangle background.

カラー ピッカーの主要部分は、LV_CPICKER_PART_BG と呼ばれます。

円形では、scale_width を使用して円の幅を設定し、pad_inner を円と内側のプレビュー円の間のパディングに設定します。

長方形モードでは、radius を使用して長方形に半径を適用できます。


オブジェクトには、現在の値に描かれた長方形 (または円) である LV_CPICKER_PART_KNOB と呼ばれる仮想パーツがあります。

スタイルプロパティとパディングのようなすべての長方形を使用して、円または長方形の背景の幅よりも大きくします。

戻る : Previous


Usage

Type

英文 自動翻訳
The type of the Color picker can be changed with lv_cpicker_set_type(cpicker, LV_CPICKER_TYPE_RECT/DISC) カラーピッカーのタイプはlv_cpicker_set_type(cpicker, LV_CPICKER_TYPE_RECT/DISC)で変更できます
戻る : Previous


Set color

英文 自動翻訳
The colro can be set manually with lv_cpicker_set_hue/saturation/value(cpicker, x) or all at once with lv_cpicker_set_hsv(cpicker, hsv) or lv_cpicker_set_color(cpicker, rgb) colro は、lv_cpicker_set_hue/saturation/value(cpicker, x) で手動で設定するか、lv_cpicker_set_hsv(cpicker, hsv) またはlv_cpicker_set_color(cpicker, rgb)で一度に設定できます。
戻る : Previous


Color mode

英文 自動翻訳
The current color moed can be manually selected with lv_cpicker_set_color_mode(cpicker, LV_CPICKER_COLOR_MODE_HUE/SATURATION/VALUE).


The color moe be fixed (do not change with long press) using lv_cpicker_set_color_mode_fixed(cpicker, true)

現在の色モードは lv_cpicker_set_color_mode(cpicker, LV_CPICKER_COLOR_MODE_HUE/SATURATION/VALUE) で手動で選択することができます。


lv_cpicker_set_color_mode_fixed(cpicker, true) で、色を固定することができます(長押しで変化しない)。

戻る : Previous


Knob color

英文 自動翻訳
lv_cpicker_set_knob_colored(cpicker, true) make the knob to automatically show the selected color as background color. lv_cpicker_set_knob_colored(cpicker, true) ノブが選択した色を背景色として自動的に表示するようにします。
戻る : Previous


Events

英文 自動翻訳
Only the Generic events are sent by the object type.


Learn more about Events.

Generic eventsのみがオブジェクトタイプによって送信されます。


Eventsの詳細をご覧ください。

戻る : Previous

Keys

英文 自動翻訳
  • LV_KEY_UP, LV_KEY_RIGHT Increment the current parameter's value by 1
  • LV_KEY_DOWN, LV_KEY_LEFT Decrement the current parameter's by 1
  • LV_KEY_ENTER By long press the next mode will be shown. By double click the current parameter will be reset.


Learn more about Keys.

  • LV_KEY_UPLV_KEY_RIGHT :現在のパラメータの値を 1 増やします
  • LV_KEY_DOWNLV_KEY_LEFT :現在のパラメータを 1 減らす
  • LV_KEY_ENTER :長押しすると次のモードが表示されます。 ダブルクリックすると、現在のパラメータがリセットされます。


詳細はKeysをご覧ください。

戻る : Previous


Example

Disc color picker

LVGL Lib docs DiscColorPicker.png
戻る : Previous

API

戻る : Previous