![]() |
VOOZH | about |
dotnet add package LilyPath --version 0.0.4
NuGet\Install-Package LilyPath -Version 0.0.4
<PackageReference Include="LilyPath" Version="0.0.4" />
<PackageVersion Include="LilyPath" Version="0.0.4" />Directory.Packages.props
<PackageReference Include="LilyPath" />Project file
paket add LilyPath --version 0.0.4
#r "nuget: LilyPath, 0.0.4"
#:package LilyPath@0.0.4
#addin nuget:?package=LilyPath&version=0.0.4Install as a Cake Addin
#tool nuget:?package=LilyPath&version=0.0.4Install as a Cake Tool
<img src="https://raw.github.com/wiki/jaquadro/LilyPath/images/lilypath.png" align="right" title="Rendered with MSAA on XNA with LilyPath" />
LilyPath is a 2D drawing library for MonoGame and XNA. LilyPath provides some of the functionality found in System.Drawing, such as drawing paths and shapes with configurable pens and brushes.
Instead of creating raster images, LilyPath renders everything directly to your scene or render target. Complex paths and filled shapes are rendered as polygons, while primitives are rendered as GL or DX lines.
Drawing is handled through a DrawBatch object to reduce the number of draw calls needed. This mirrors the role of SpriteBatch for rendering textured quads. More complex geometry can be compiled ahead of time into GraphicsPath objects, which contain the polygon data after arcs, joins, and other calculations have been completed.
Here’s a short code sample for drawing the lily pad in the picture above (without the flower):
drawBatch.Begin(DrawSortMode.Deferred);
Vector2 origin = new Vector2(200, 200);
float startAngle = (float)(Math.PI / 16) * 25; // 11:20
float arcLength = (float)(Math.PI / 16) * 30;
drawBatch.FillCircle(new SolidColorBrush(Color.SkyBlue), origin, 175);
drawBatch.FillArc(new SolidColorBrush(Color.LimeGreen), origin, 150,
startAngle, arcLength, ArcType.Sector);
drawBatch.DrawClosedArc(new Pen(Color.Green, 15), origin, 150,
startAngle, arcLength, ArcType.Sector);
drawBatch.End();
Source code for the full image and other examples can be found in the included test project, LilyPathDemo.
NOTE: The example projects are built with GL controls which do not work with the last few years of MonoGame. Try running them against MonoGame 3.0 or 3.1.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net7.0 net7.0 is compatible. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 was computed. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
Showing the top 1 NuGet packages that depend on LilyPath:
| Package | Downloads |
|---|---|
|
Undine.LilyPath
LilyPath binding for Undine Game Engine |
This package is not used by any popular GitHub repositories.