Iridescence 1.00
Embedded Graphic Framework
Loading...
Searching...
No Matches
ds_gauge_liquid.h
1/* Copyright (C) 2017 - 2024, Thornwave Labs Inc - All Rights Reserved.
2 * Unauthorized copying of this file, via any medium is strictly prohibited.
3 * Proprietary and confidential.
4 * Written by Razvan Turiac <razvan.turiac@thornwave.com>
5*/
6
7#ifndef _DS_GAUGE_LIQUID_H
8#define _DS_GAUGE_LIQUID_H
9
10
11#include <ds_view.h>
12#include <ds_gauge_base.h>
13#include <ds_value_base.h>
14
15
19class DsGaugeLiquid: public DsView, public DsGaugeBase, public DsValueBase
20{
21public:
22
30 DsGaugeLiquid(DsView* parent, const DsPoint &pos, const DsSize &size);
31
32
37 DsGaugeLiquid& setFillMargin(uint8_t margin);
38
39private:
40 uint8_t mFillMargin;
41
42 uint16_t mWaveRadius;
43 float mWavePitch;
44 float mWaveDelta;
45
46 DsEllipse mLiquidRegion;
47
48 int32_t mBottomFillLine;
49 int32_t mTopFillLine;
50
51 void onSizeChange(void) override final;
52 void onPaint(DsRenderer &renderer) override final;
53 float onValueChange(float value) override final;
54};
55
56
57#endif
DsEllipse is a class that represents a 2D ellipse (Xc, Yc, Rx, Ry)
Definition ds_geometry.h:2636
DsGaugeBase is a base class for all gauge views.
Definition ds_gauge_base.h:22
DsGaugeDisc is a class that implements a liquid style gauge.
Definition ds_gauge_liquid.h:20
DsGaugeLiquid(DsView *parent, const DsPoint &pos, const DsSize &size)
Creates a DsGaugeLiquid object.
DsGaugeLiquid & setFillMargin(uint8_t margin)
Sets the liquid gauge fill area margin.
DsPoint is a class that represents the X and Y 2D coordinates of a point as integer numbers.
Definition ds_geometry.h:24
DsRenderer is a class that implements all the drawing operations.
Definition ds_renderer.h:42
DsSize is class that represents the 2D size of a graphic object (width, height) as integer values.
Definition ds_geometry.h:780
DsValueBase is a base class that contains a float value.
Definition ds_value_base.h:19
DsView is a base class that represents any view on the screen.
Definition ds_view.h:40