-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
187 additions
and
121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# EditorConfig is awesome: https://EditorConfig.org | ||
|
||
# top-most EditorConfig file | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 4 | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.{csproj,props,target}] | ||
indent_size = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule OpenTabletDriver
updated
722 files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
using System.Numerics; | ||
using OpenTabletDriver.Plugin.Attributes; | ||
using OpenTabletDriver.Plugin.Output; | ||
using OpenTabletDriver.Plugin.Tablet; | ||
|
||
namespace TabletDriverFilters | ||
{ | ||
public abstract class MillimeterAsyncPositionedPipelineElement : AsyncPositionedPipelineElement<IDeviceReport> | ||
{ | ||
[TabletReference] | ||
public TabletReference TabletReference { set => HandleTabletReferenceInternal(value); } | ||
|
||
protected Vector2 MillimeterScale; | ||
|
||
private void HandleTabletReferenceInternal(TabletReference tabletReference) | ||
{ | ||
var digitizer = tabletReference.Properties.Specifications.Digitizer; | ||
MillimeterScale = new Vector2 | ||
{ | ||
X = digitizer.Width / digitizer.MaxX, | ||
Y = digitizer.Height / digitizer.MaxY | ||
}; | ||
HandleTabletReference(tabletReference); | ||
} | ||
|
||
protected virtual void HandleTabletReference(TabletReference tabletReference) | ||
{ | ||
// Override when needed | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
using System; | ||
using System.Numerics; | ||
using OpenTabletDriver.Plugin.Attributes; | ||
using OpenTabletDriver.Plugin.Output; | ||
using OpenTabletDriver.Plugin.Tablet; | ||
|
||
namespace TabletDriverFilters | ||
{ | ||
public abstract class MillimeterPositionedPipelineElement : IPositionedPipelineElement<IDeviceReport> | ||
{ | ||
protected Vector2 MillimeterScale; | ||
|
||
[TabletReference] | ||
public TabletReference TabletReference { set => HandleTabletReferenceInternal(value); } | ||
public abstract PipelinePosition Position { get; } | ||
public abstract event Action<IDeviceReport> Emit; | ||
public abstract void Consume(IDeviceReport value); | ||
|
||
private void HandleTabletReferenceInternal(TabletReference tabletReference) | ||
{ | ||
var digitizer = tabletReference.Properties.Specifications.Digitizer; | ||
MillimeterScale = new Vector2 | ||
{ | ||
X = digitizer.Width / digitizer.MaxX, | ||
Y = digitizer.Height / digitizer.MaxY | ||
}; | ||
HandleTabletReference(tabletReference); | ||
} | ||
|
||
protected virtual void HandleTabletReference(TabletReference tabletReference) | ||
{ | ||
// Override when needed | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,2 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net5</TargetFramework> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="../.modules/OpenTabletDriver/OpenTabletDriver.Plugin/OpenTabletDriver.Plugin.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<Project> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net6.0</TargetFramework> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="$(MSBuildThisFileDirectory)/.modules/OpenTabletDriver/OpenTabletDriver.Plugin/OpenTabletDriver.Plugin.csproj" /> | ||
<Compile Include="$(MSBuildThisFileDirectory)/Common/*.cs" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,2 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net5</TargetFramework> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="../.modules/OpenTabletDriver/OpenTabletDriver.Plugin/OpenTabletDriver.Plugin.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |
Oops, something went wrong.