-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new brushes and Consolonia.Editor project (#238)
* add consolonia.editor project Add BrightBrush/ShadeBrush/InvertBrush update drawingcontext to support brushes Update drawingcontext to correctly implement Fills.
- Loading branch information
Showing
84 changed files
with
3,639 additions
and
78 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 |
---|---|---|
|
@@ -40,14 +40,14 @@ jobs: | |
|
||
- name: resharper-cleanup | ||
run: | | ||
jb cleanupcode Consolonia.sln --exclude="**Consolonia.GuiCS/**.*;**Consolonia.Templates/**.*" | ||
jb cleanupcode Consolonia.sln --exclude="**Consolonia.GuiCS/**.*;**Consolonia.Templates/**.*;**Consolonia.Editor/**.*" | ||
working-directory: ./src | ||
|
||
- name: Inspect code | ||
uses: muno92/[email protected] | ||
with: | ||
solutionPath: ./src/Consolonia.sln | ||
exclude: "**Consolonia.GuiCS/**.*;**Consolonia.Gallery/**.*;**Example/**.*;**Consolonia.Templates/**.*" | ||
exclude: "**Consolonia.GuiCS/**.*;**Consolonia.Gallery/**.*;**Example/**.*;**Consolonia.Templates/**.*;**Consolonia.Editor/**.*" | ||
# version: '2024.2.6' | ||
minimumSeverity: 'warning' | ||
|
||
|
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,17 @@ | ||
using Avalonia; | ||
using Avalonia.Animation; | ||
using Avalonia.Media; | ||
|
||
// ReSharper disable CheckNamespace | ||
namespace Consolonia.Controls | ||
{ | ||
/// <summary> | ||
/// This brush brightens the area it paints. | ||
/// </summary> | ||
public class BrightenBrush : Animatable, IImmutableBrush | ||
{ | ||
public double Opacity => 1; | ||
public ITransform Transform => null; | ||
public RelativePoint TransformOrigin => RelativePoint.TopLeft; | ||
} | ||
} |
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,17 @@ | ||
using Avalonia; | ||
using Avalonia.Animation; | ||
using Avalonia.Media; | ||
|
||
// ReSharper disable CheckNamespace | ||
namespace Consolonia.Controls | ||
{ | ||
/// <summary> | ||
/// This brush inverts foreground/background colors for each pixel of the area it paints. | ||
/// </summary> | ||
public class InvertBrush : Animatable, IImmutableBrush | ||
{ | ||
public double Opacity => 1; | ||
public ITransform Transform => null; | ||
public RelativePoint TransformOrigin => RelativePoint.TopLeft; | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
using Avalonia; | ||
using Avalonia.Animation; | ||
using Avalonia.Media; | ||
|
||
// ReSharper disable CheckNamespace | ||
namespace Consolonia.Controls | ||
{ | ||
/// <summary> | ||
/// This brush shades the area it paints. | ||
/// </summary> | ||
public class ShadeBrush : Animatable, IImmutableBrush | ||
{ | ||
public double Opacity => 1; | ||
public ITransform Transform => null; | ||
public RelativePoint TransformOrigin => RelativePoint.TopLeft; | ||
} | ||
} |
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
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
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
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
Oops, something went wrong.