# lv_scale_private.h (/api/widgets/scale/lv_scale_private_h)



<RelatedHeaders name="lv_scale.h" isPrivate="true" />

<ApiSummary structs="3" />

Structs [#structs]

<ApiMember kind="struct" name="_lv_scale_section_t">
  \_lv_scale_section_t [#_lv_scale_section_t]

  | Member                        | Type                                                       | Description                                                                                                                                             |
  | ----------------------------- | ---------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | `main_style`                  | <ApiLink name="lv_style_t" display="const lv_style_t *" /> | Style to use for MAIN part(s) of scale when it falls within this section's range                                                                        |
  | `indicator_style`             | <ApiLink name="lv_style_t" display="const lv_style_t *" /> | Style to use for INDICATOR part(s) of scale when it falls within this section's range                                                                   |
  | `items_style`                 | <ApiLink name="lv_style_t" display="const lv_style_t *" /> | Style to use for ITEMS part(s) of scale when it falls within this section's range                                                                       |
  | `range_min`                   | <ApiLink name="int32_t" />                                 | Scale parts with value >= this value will be drawn using applicable style.                                                                              |
  | `range_max`                   | <ApiLink name="int32_t" />                                 | Scale parts with value \<= this value will be drawn using applicable style.                                                                             |
  | `first_tick_idx_in_section`   | <ApiLink name="uint32_t" />                                | Internal (set during drawing): Tick index of first tick that falls within this section; LV\_SCALE\_TICK\_IDX\_DEFAULT\_ID if section contains no ticks. |
  | `last_tick_idx_in_section`    | <ApiLink name="uint32_t" />                                | Internal (set during drawing): Tick index of last tick that falls within this section; LV\_SCALE\_TICK\_IDX\_DEFAULT\_ID if section contains no ticks.  |
  | `first_tick_in_section_width` | <ApiLink name="int32_t" />                                 | Internal (set during drawing)                                                                                                                           |
  | `last_tick_in_section_width`  | <ApiLink name="int32_t" />                                 | Internal (set during drawing)                                                                                                                           |
  | `first_tick_in_section`       | <ApiLink name="lv_point_t" />                              | Internal (set during drawing)                                                                                                                           |
  | `last_tick_in_section`        | <ApiLink name="lv_point_t" />                              | Internal (set during drawing)                                                                                                                           |
  | `first_tick_idx_is_major`     | <ApiLink name="uint32_t" />                                | Internal (set during drawing): true if `first_tick_idx_in_section` represents a major tick.                                                             |
  | `last_tick_idx_is_major`      | <ApiLink name="uint32_t" />                                | Internal (set during drawing): true if `last_tick_idx_in_section` represents a major tick.                                                              |
</ApiMember>

<ApiMember kind="struct" name="lv_scale_needle_t">
  lv_scale_needle_t [#lv_scale_needle_t]

  | Member   | Type                                             | Description |
  | -------- | ------------------------------------------------ | ----------- |
  | `obj`    | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> |             |
  | `value`  | <ApiLink name="int32_t" />                       |             |
  | `length` | <ApiLink name="int32_t" />                       |             |
</ApiMember>

<ApiMember kind="struct" name="_lv_scale_t">
  \_lv_scale_t [#_lv_scale_t]

  | Member              | Type                               | Description                                                                                             |
  | ------------------- | ---------------------------------- | ------------------------------------------------------------------------------------------------------- |
  | `obj`               | <ApiLink name="lv_obj_t" />        | Base Widget part of Scale                                                                               |
  | `section_ll`        | <ApiLink name="lv_ll_t" />         | Linked list for the sections (stores lv\_scale\_section\_t)                                             |
  | `txt_src`           | `const char **`                    | Optional list of text strings for major ticks when custom labels are provided.                          |
  | `mode`              | <ApiLink name="lv_scale_mode_t" /> | Orientation and layout of scale.                                                                        |
  | `range_min`         | <ApiLink name="int32_t" />         | Scale's minimum value                                                                                   |
  | `range_max`         | <ApiLink name="int32_t" />         | Scale's maximum value                                                                                   |
  | `total_tick_count`  | <ApiLink name="uint32_t" />        | Total number of ticks (major and minor)                                                                 |
  | `major_tick_every`  | <ApiLink name="uint32_t" />        | Frequency of major ticks to minor ticks                                                                 |
  | `label_enabled`     | <ApiLink name="uint32_t" />        | Draw labels for major ticks?                                                                            |
  | `post_draw`         | <ApiLink name="uint32_t" />        | false: drawing occurs during LV\_EVENT\_DRAW\_MAIN; true : drawing occurs during LV\_EVENT\_DRAW\_POST. |
  | `draw_ticks_on_top` | <ApiLink name="uint32_t" />        | Draw ticks on top of main line?                                                                         |
  | `angle_range`       | <ApiLink name="uint32_t" />        | Degrees between low end and high end of scale                                                           |
  | `rotation`          | <ApiLink name="int32_t" />         | Clockwise angular offset from 3-o'clock position of low end of scale                                    |
  | `custom_label_cnt`  | <ApiLink name="int32_t" />         | Number of custom labels provided in `txt_src`                                                           |
  | `last_tick_width`   | <ApiLink name="int32_t" />         | Width of last tick in pixels                                                                            |
  | `first_tick_width`  | <ApiLink name="int32_t" />         | Width of first tick in pixels                                                                           |
  | `needles`           | <ApiLink name="lv_array_t" />      | Needle list of this scale                                                                               |
</ApiMember>

Dependencies [#dependencies]

<FileIncludes includes="[&#x22;lv_scale.h&#x22;, &#x22;lv_obj_private.h&#x22;]" transitiveIncludes="[&#x22;lv_anim.h&#x22;, &#x22;lv_area.h&#x22;, &#x22;lv_array.h&#x22;, &#x22;lv_assert.h&#x22;, &#x22;lv_bidi.h&#x22;, &#x22;lv_color.h&#x22;, &#x22;lv_color_op.h&#x22;, &#x22;lv_conf_internal.h&#x22;, &#x22;lv_conf_kconfig.h&#x22;, &#x22;lv_display.h&#x22;, &#x22;lv_draw.h&#x22;, &#x22;lv_draw_arc.h&#x22;, &#x22;lv_draw_blur.h&#x22;, &#x22;lv_draw_buf.h&#x22;, &#x22;lv_draw_image.h&#x22;, &#x22;lv_draw_label.h&#x22;, &#x22;lv_draw_line.h&#x22;, &#x22;lv_draw_rect.h&#x22;, &#x22;lv_draw_triangle.h&#x22;, &#x22;lv_event.h&#x22;, &#x22;lv_ext_data.h&#x22;, &#x22;lv_flex.h&#x22;, &#x22;lv_font.h&#x22;, &#x22;lv_fs.h&#x22;, &#x22;lv_grad.h&#x22;, &#x22;lv_grid.h&#x22;, &#x22;lv_group.h&#x22;, &#x22;lv_image.h&#x22;, &#x22;lv_image_decoder.h&#x22;, &#x22;lv_image_dsc.h&#x22;, &#x22;lv_indev.h&#x22;, &#x22;lv_layout.h&#x22;, &#x22;lv_line.h&#x22;, &#x22;lv_ll.h&#x22;, &#x22;lv_log.h&#x22;, &#x22;lv_math.h&#x22;, &#x22;lv_matrix.h&#x22;, &#x22;lv_mem.h&#x22;, &#x22;lv_obj.h&#x22;, &#x22;lv_obj_class.h&#x22;, &#x22;lv_obj_draw.h&#x22;, &#x22;lv_obj_event.h&#x22;, &#x22;lv_obj_pos.h&#x22;, &#x22;lv_obj_property.h&#x22;, &#x22;lv_obj_property_names.h&#x22;, &#x22;lv_obj_scroll.h&#x22;, &#x22;lv_obj_style.h&#x22;, &#x22;lv_obj_style_gen.h&#x22;, &#x22;lv_obj_tree.h&#x22;, &#x22;lv_observer.h&#x22;, &#x22;lv_palette.h&#x22;, &#x22;lv_profiler.h&#x22;, &#x22;lv_profiler_builtin.h&#x22;, &#x22;lv_sprintf.h&#x22;, &#x22;lv_string.h&#x22;, &#x22;lv_style.h&#x22;, &#x22;lv_style_gen.h&#x22;, &#x22;lv_style_properties.h&#x22;, &#x22;lv_symbol_def.h&#x22;, &#x22;lv_text.h&#x22;, &#x22;lv_tick.h&#x22;, &#x22;lv_timer.h&#x22;, &#x22;lv_types.h&#x22;]" />
