From 9ad79c1b7553a9dda0e2ac8cb6e9be49f48ece93 Mon Sep 17 00:00:00 2001 From: Sebastian 'gonX' Jensen Date: Sat, 9 Nov 2024 16:11:40 +0100 Subject: [PATCH 1/2] FAQ/General: Add 2024 Gaomon driver conversion formula --- site/_wiki/FAQ/General.md | 44 +++++++++++++++++++++++++++++---------- 1 file changed, 33 insertions(+), 11 deletions(-) diff --git a/site/_wiki/FAQ/General.md b/site/_wiki/FAQ/General.md index ec964875..31e7ddb1 100644 --- a/site/_wiki/FAQ/General.md +++ b/site/_wiki/FAQ/General.md @@ -134,18 +134,20 @@ You can see the progress on GitHub here: Use this reference chart for the upcoming formulas: -| Term | Definition | -| :-----: | :--------- | -| Width | The width of the area in millimeters -| Height | The height of the area in millimeters -| TWidth | The width of the tablet's digitizer in millimeters. Can be found in the tablet's configuration file. -| THeight | The height of the tablet's digitizer in millimeters. Can be found in the tablet's configuration file. -| XOffset | The X offset of the center of the area in millimeters -| YOffset | The Y offset of the center of the area in millimeters -| LPI | Lines per inch, this is commonly 5080 or 2540 +| Term | Definition | +| :---------: | :--------- | +| Width | The width of the area in millimeters +| Height | The height of the area in millimeters +| XOffset | The X offset of the center of the area in millimeters +| YOffset | The Y offset of the center of the area in millimeters +| LPI | Lines per inch, this is commonly 5080 or 2540 +| TWidth | The width of the tablet's digitizer in millimeters. +| THeight | The height of the tablet's digitizer in millimeters. +| THorizontal | The width of the tablet's digitizer in number of lines. +| TVertical | The height of the tablet's digitizer in number of lines. {: .table .table-dark } -`TWidth` and `THeight` can be found in the tablet's configuration file. +`TWidth`, `THeight`, `THorizontal`, and `TVertical` can be found in the tablet's configuration file. Use the following formulas to get values for OpenTabletDriver's area editor's `Width`, `Height`, `XOffset`, and `YOffset` fields: @@ -187,7 +189,9 @@ XOffset = (Width / 2) + (XPX / 3.937) YOffset = (Height / 2) + (XPY / 3.937) ``` -#### Huion and Gaomon +#### Huion and Gaomon {#gaomon-v1} + +Newer Gaomon drivers use another formula. Please see [Gaomon 2024 and up](#gaomon-v2) for those. | Term | Definition | | :----: | --- | @@ -205,3 +209,21 @@ Height = (Bottom - Top) * THeight XOffset = (Width / 2) + (Left * TWidth) YOffset = (Height / 2) + (Top * THeight) ``` + +#### Gaomon 2024 and up {#gaomon-v2} + +| Term | Definition | +| :----------: | --- | +| GaomonWidth | The number of horizontal lines set in the Gaomon driver +| GaomonHeight | The number of vertical lines set in the Gaomon driver +| GaomonX | The X offset of the top left corner of the area in number of horizontal lines +| GaomonY | The Y offset of the top left corner of the area in number of vertical lines +{: .table .table-dark } + +**Formula**: +```py +Width = (GaomonWidth / THorizontal) * TWidth +Height = (GaomonHeight / TVertical) * THeight +XOffset = (GaomonX / THorizontal) * TWidth + (Width / 2) +YOffset = (GaomonY / TVertical) * THeight + (Height / 2) +``` From 1ad25e39120bb5d199e13db329c4e472755ebca5 Mon Sep 17 00:00:00 2001 From: Sebastian 'gonX' Jensen Date: Sun, 10 Nov 2024 00:40:26 +0100 Subject: [PATCH 2/2] (minor) satisfy linter --- site/_wiki/FAQ/General.md | 1 + 1 file changed, 1 insertion(+) diff --git a/site/_wiki/FAQ/General.md b/site/_wiki/FAQ/General.md index 31e7ddb1..c30ebb02 100644 --- a/site/_wiki/FAQ/General.md +++ b/site/_wiki/FAQ/General.md @@ -221,6 +221,7 @@ YOffset = (Height / 2) + (Top * THeight) {: .table .table-dark } **Formula**: + ```py Width = (GaomonWidth / THorizontal) * TWidth Height = (GaomonHeight / TVertical) * THeight