summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorPablo Martínez <58857054+elpekenin@users.noreply.github.com>2023-09-25 04:31:46 +0200
committerGitHub <noreply@github.com>2023-09-25 12:31:46 +1000
commita360900fbb87cec0aa721d527b251a3dcc72c671 (patch)
tree6f2cf603edcd408cf9a19de2057ebba8a4eacd9e /docs
parent4e7e824a73c81187cca5cc56cb0b3b51a09b75c4 (diff)
[Enhancement] QP Getters (#21171)
Diffstat (limited to 'docs')
-rw-r--r--docs/quantum_painter.md43
1 files changed, 41 insertions, 2 deletions
diff --git a/docs/quantum_painter.md b/docs/quantum_painter.md
index 5e399183f8..8acf6aeb36 100644
--- a/docs/quantum_painter.md
+++ b/docs/quantum_painter.md
@@ -857,13 +857,52 @@ void keyboard_post_init_kb(void) {
<!-- tabs:start -->
-#### ** Get Geometry **
+#### ** Gettters **
+
+These functions allow external code to retrieve the current width, height, rotation, and drawing offsets.
+
+<!-- tabs:start -->
+
+#### ** Width **
+
+```c
+uint16_t qp_get_width(painter_device_t device);
+```
+
+#### ** Height **
+
+```c
+uint16_t qp_get_height(painter_device_t device);
+```
+
+#### ** Rotation **
+
+```c
+painter_rotation_t qp_get_rotation(painter_device_t device);
+```
+
+#### ** Offset X **
+
+```c
+uint16_t qp_get_offset_x(painter_device_t device);
+```
+
+#### ** Offset Y **
+
+```c
+uint16_t qp_get_offset_y(painter_device_t device);
+```
+
+##### ** Everything **
+
+Convenience function to call all the previous ones at once.
+Note: You can pass `NULL` for the values you are not interested in.
```c
void qp_get_geometry(painter_device_t device, uint16_t *width, uint16_t *height, painter_rotation_t *rotation, uint16_t *offset_x, uint16_t *offset_y);
```
-The `qp_get_geometry` function allows external code to retrieve the current width, height, rotation, and drawing offsets.
+<!-- tabs:end -->
#### ** Set Viewport Offsets **