mirror of
https://github.com/esphome/esphome-docs.git
synced 2025-03-01 03:51:36 +01:00
Added ring and gauge basic shapes (#4235)
This commit is contained in:
parent
ef3e3d4fb7
commit
f844d674b2
@ -125,6 +125,13 @@ Now that you know a bit more about ESPHome's coordinate system, let's draw some
|
||||
// ... and the same thing filled again
|
||||
it.filled_circle(20, 75, 10);
|
||||
|
||||
// Ring and half-ring. First draw the circle with a hole in it
|
||||
// at [75,75] with inner raduis of 20 and outer of 30
|
||||
id.filled_ring(75, 75, 30, 20);
|
||||
// and a "gauge": half-ring that is partially filled.
|
||||
// Same position and size but 80% filled left to right
|
||||
id.filled_gauge(75, 75, 30, 20, 80)
|
||||
|
||||
// Triangles... Let's draw the outline of a triangle from the [x,y] coordinates of its three points
|
||||
// [25,5], [100,5], [80,25]
|
||||
it.triangle(25, 5, 100, 5, 80, 25);
|
||||
|
Loading…
Reference in New Issue
Block a user