MonoGame.StrokeEffect
1.1.1
dotnet add package MonoGame.StrokeEffect --version 1.1.1
NuGet\Install-Package MonoGame.StrokeEffect -Version 1.1.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="MonoGame.StrokeEffect" Version="1.1.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add MonoGame.StrokeEffect --version 1.1.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: MonoGame.StrokeEffect, 1.1.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install MonoGame.StrokeEffect as a Cake Addin #addin nuget:?package=MonoGame.StrokeEffect&version=1.1.1 // Install MonoGame.StrokeEffect as a Cake Tool #tool nuget:?package=MonoGame.StrokeEffect&version=1.1.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
MonoGame.StrokeEffect
MonoGame.StrokeEffect is a library to generate strokes for Texture2D in MonoGame. We also support Sprite Font. We use a shader effect to generate the Stroke effect.
How to use
Stroke Types:
- 'OutlineAndTexture' - Create a new Texture with the original Texture and an outline stroke
- 'OutlineWithoutTexture' - Create a new Texture with only the outline stroke
Create a new Texture with stroke
int strokeSize = 3;
Color strokeColor = Color.Black;
StrokeType strokeType = StrokeType.OutlineAndTexture;
var textureWithStroke = StrokeEffect.CreateStroke(myTexture, strokeSize, strokeColor, GraphicsDevice, strokeType);
Color textColor = Color.White;
Vector2 scale = Vector2.One;
int strokeSize = 3;
Color strokeColor = Color.Black;
StrokeType strokeType = StrokeType.OutlineAndTexture;
var textStroke = StrokeEffect.CreateStrokeSpriteFont(arialSpriteFont, "My Text", textColor, scale, strokeSize, strokeColor, GraphicsDevice, strokeType);
License
MIT
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- MonoGame.Content.Builder.Task (>= 3.8.2.1105)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.