This commit is contained in:
Meik
2026-03-05 09:56:57 +01:00
parent 838e6b1ee1
commit 4013fa8e32
827 changed files with 743038 additions and 0 deletions

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@@ -0,0 +1,23 @@
The MIT License (MIT)
Copyright (c) .NET Foundation and Contributors
All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@@ -0,0 +1,66 @@
# System.Drawing.Common
The `System.Drawing.Common` package allows .NET Core and .NET 6+ applications to access GDI+ graphics functionality.
This package is especially useful for porting .NET Framework applications that rely on the `System.Drawing` namespace.
## Getting Started
To get started with `System.Drawing.Common`, install it using the NuGet Package Manager, the .NET CLI, or by editing your project file directly.
**NOTE:** If you are developing a **WinForms** application, you **do not** need to install the `System.Drawing.Common` package separately (to this end, you use the `Sdk` attribute for the `Project` element like `<Project Sdk="Microsoft.NET.Sdk">` in the .csproj or the .vbproj file and then specify `<UseWindowsForms>true</UseWindowsForms>`). This package is then automatically included as part of the .NET SDK for WinForms Apps, which means you can start using the `System.Drawing` namespace right away in your WinForms projects.
## Usage
The following examples demonstrate some basic tasks you can accomplish with `System.Drawing.Common`.
### Create a Simple Bitmap and Save it
#### C#
```csharp
using System.Drawing;
class Program
{
static void Main()
{
using (Bitmap bitmap = new Bitmap(100, 100))
{
using (Graphics g = Graphics.FromImage(bitmap))
{
g.Clear(Color.Red);
}
bitmap.Save("output.bmp");
}
}
}
```
#### VB
```vb
Imports System.Drawing
Module Program
Sub Main()
Using bitmap As New Bitmap(100, 100)
Using g As Graphics = Graphics.FromImage(bitmap)
g.Clear(Color.Red)
End Using
bitmap.Save("output.bmp")
End Using
End Sub
End Module
```
## Additional Documentation
For more in-depth tutorials and API references, you can check the following resources:
- [NuGet Gallery | System.Drawing.Common](https://nuget.org/packages/System.Drawing.Common/)
- [System.Drawing.Common Namespace | Microsoft Docs](https://docs.microsoft.com/dotnet/api/system.drawing)
- [Drawing with System.Drawing.Common | Microsoft Learn](https://learn.microsoft.com/dotnet/core/drawing/)
## Feedback
- Open an issue on the [GitHub repository](https://github.com/dotnet/winforms/issues)
- Reach out on Twitter with the [hashtag #winforms](https://twitter.com/search?q=%23winforms)
- Join our Discord channel: [dotnet/Discord](https://discord.com/invite/dotnet)

View File

@@ -0,0 +1,42 @@
.NET Core uses third-party libraries or other resources that may be
distributed under licenses different than the .NET Core software.
In the event that we accidentally failed to list a required notice, please
bring it to our attention. Post an issue or email us:
dotnet@microsoft.com
The attached notices are provided for information only.
License notice for Ookie.Dialogs
--------------------------------
http://www.ookii.org/software/dialogs/
Copyright © Sven Groot (Ookii.org) 2009
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1) Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2) Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3) Neither the name of the ORGANIZATION nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
THE POSSIBILITY OF SUCH DAMAGE.

View File

@@ -0,0 +1,6 @@
<Project InitialTargets="NETStandardCompatError_System_Drawing_Common_net462">
<Target Name="NETStandardCompatError_System_Drawing_Common_net462"
Condition="'$(SuppressTfmSupportBuildWarnings)' == ''">
<Warning Text="System.Drawing.Common 10.0.1 doesn't support $(TargetFramework) and has not been tested with it. Consider upgrading your TargetFramework to net462 or later. You may also set &lt;SuppressTfmSupportBuildWarnings&gt;true&lt;/SuppressTfmSupportBuildWarnings&gt; in the project file to ignore this warning and attempt to run in this unsupported configuration at your own risk." />
</Target>
</Project>

View File

@@ -0,0 +1,6 @@
<Project InitialTargets="NETStandardCompatError_System_Drawing_Common_net8_0">
<Target Name="NETStandardCompatError_System_Drawing_Common_net8_0"
Condition="'$(SuppressTfmSupportBuildWarnings)' == ''">
<Warning Text="System.Drawing.Common 10.0.1 doesn't support $(TargetFramework) and has not been tested with it. Consider upgrading your TargetFramework to net8.0 or later. You may also set &lt;SuppressTfmSupportBuildWarnings&gt;true&lt;/SuppressTfmSupportBuildWarnings&gt; in the project file to ignore this warning and attempt to run in this unsupported configuration at your own risk." />
</Target>
</Project>

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff