Skip to content

Drawing: Replace harvested assets with live config #51934

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Apr 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@
<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.props))" />
<ItemGroup>
<ProjectReference Include="..\ref\System.Drawing.Common.csproj">
<SupportedFramework>netcoreapp3.0</SupportedFramework>
<SupportedFramework>net461;uap10.0.16299;netcoreapp2.0;$(AllXamarinFrameworks)</SupportedFramework>
</ProjectReference>
<ProjectReference Include="..\src\System.Drawing.Common.csproj" />
<HarvestIncludePaths Include="runtimes/win/lib/netcoreapp2.0;runtimes/unix/lib/netcoreapp2.0" />
<HarvestIncludePaths Include="ref/netstandard2.0;lib/netstandard2.0" />
<HarvestIncludePaths Include="ref/net461;lib/net461" />
<InboxOnTargetFramework Include="$(AllXamarinFrameworks)" />
<PackageFile Include="buildTransitive\System.Drawing.Common.targets"
TargetPath="buildTransitive\netcoreapp2.0" />
<File Include="$(PlaceHolderFile)"
TargetPath="buildTransitive\netcoreapp3.0" />
</ItemGroup>
<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.targets))" />
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<Project InitialTargets="_ErrorForSystemDrawingCommonOnNetCoreApp2x">
<Target Name="_ErrorForSystemDrawingCommonOnNetCoreApp2x"
Condition="'$(SuppressTfmSupportBuildWarnings)' == ''">
<Error Text="System.Drawing.Common doesn't support $(TargetFramework). Consider updating your TargetFramework to netcoreapp3.1 or later." />
</Target>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,6 @@ internal Graphics() { }
public int TextContrast { get { throw null; } set { } }
public System.Drawing.Text.TextRenderingHint TextRenderingHint { get { throw null; } set { } }
public System.Drawing.Drawing2D.Matrix Transform { get { throw null; } set { } }
public System.Numerics.Matrix3x2 TransformElements { get { throw null; } set { } }
public System.Drawing.RectangleF VisibleClipBounds { get { throw null; } }
public void AddMetafileComment(byte[] data) { }
public System.Drawing.Drawing2D.GraphicsContainer BeginContainer() { throw null; }
Expand Down Expand Up @@ -1660,9 +1659,7 @@ public Matrix() { }
public Matrix(System.Drawing.Rectangle rect, System.Drawing.Point[] plgpts) { }
public Matrix(System.Drawing.RectangleF rect, System.Drawing.PointF[] plgpts) { }
public Matrix(float m11, float m12, float m21, float m22, float dx, float dy) { }
public Matrix(System.Numerics.Matrix3x2 matrix) { }
public float[] Elements { get { throw null; } }
public System.Numerics.Matrix3x2 MatrixElements { get { throw null; } set { } }
public bool IsIdentity { get { throw null; } }
public bool IsInvertible { get { throw null; } }
public float OffsetX { get { throw null; } }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>$(NetCoreAppCurrent);netcoreapp3.0</TargetFrameworks>
<TargetFrameworks>$(NetCoreAppCurrent);netcoreapp3.0;netstandard2.0;net461</TargetFrameworks>
<ExcludeCurrentNetCoreAppFromPackage>true</ExcludeCurrentNetCoreAppFromPackage>
<IncludeInternalObsoleteAttribute>true</IncludeInternalObsoleteAttribute>
<Nullable>enable</Nullable>
</PropertyGroup>
<!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
<PropertyGroup>
<IsPartialFacadeAssembly Condition="'$(TargetFramework)' == 'net461'">true</IsPartialFacadeAssembly>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Drawing.Common.cs" />
<Compile Include="System.Drawing.Common.Forwards.cs" />
<Compile Include="System.Drawing.Common.netcoreapp.cs" Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'" />
<Compile Include="System.Drawing.Common.Forwards.cs" Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'" />
<Compile Include="System.Drawing.Common.netstandard.cs" Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' != 'netcoreapp3.0'">
<ItemGroup Condition="'$(TargetFramework)' == '$(NetCoreAppCurrent)'">
<ProjectReference Include="..\..\System.Collections.NonGeneric\ref\System.Collections.NonGeneric.csproj" />
<ProjectReference Include="..\..\System.ComponentModel\ref\System.ComponentModel.csproj" />
<ProjectReference Include="..\..\System.ComponentModel.Primitives\ref\System.ComponentModel.Primitives.csproj" />
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// ------------------------------------------------------------------------------
// Changes to this file must follow the https://aka.ms/api-review process.
// ------------------------------------------------------------------------------

namespace System.Drawing
{
public sealed partial class Graphics
{
public System.Numerics.Matrix3x2 TransformElements { get { throw null; } set { } }
}
}
namespace System.Drawing.Drawing2D
{
public sealed partial class Matrix
{
public Matrix(System.Numerics.Matrix3x2 matrix) { }
public System.Numerics.Matrix3x2 MatrixElements { get { throw null; } set { } }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// ------------------------------------------------------------------------------
// Changes to this file must follow the https://aka.ms/api-review process.
// ------------------------------------------------------------------------------

namespace System.Drawing
{
public static partial class ColorTranslator
{
public static System.Drawing.Color FromHtml(string htmlColor) { throw null; }
public static System.Drawing.Color FromOle(int oleColor) { throw null; }
public static System.Drawing.Color FromWin32(int win32Color) { throw null; }
public static string ToHtml(System.Drawing.Color c) { throw null; }
public static int ToOle(System.Drawing.Color c) { throw null; }
public static int ToWin32(System.Drawing.Color c) { throw null; }
}
public static partial class SystemColors
{
public static System.Drawing.Color ActiveBorder { get { throw null; } }
public static System.Drawing.Color ActiveCaption { get { throw null; } }
public static System.Drawing.Color ActiveCaptionText { get { throw null; } }
public static System.Drawing.Color AppWorkspace { get { throw null; } }
public static System.Drawing.Color ButtonFace { get { throw null; } }
public static System.Drawing.Color ButtonHighlight { get { throw null; } }
public static System.Drawing.Color ButtonShadow { get { throw null; } }
public static System.Drawing.Color Control { get { throw null; } }
public static System.Drawing.Color ControlDark { get { throw null; } }
public static System.Drawing.Color ControlDarkDark { get { throw null; } }
public static System.Drawing.Color ControlLight { get { throw null; } }
public static System.Drawing.Color ControlLightLight { get { throw null; } }
public static System.Drawing.Color ControlText { get { throw null; } }
public static System.Drawing.Color Desktop { get { throw null; } }
public static System.Drawing.Color GradientActiveCaption { get { throw null; } }
public static System.Drawing.Color GradientInactiveCaption { get { throw null; } }
public static System.Drawing.Color GrayText { get { throw null; } }
public static System.Drawing.Color Highlight { get { throw null; } }
public static System.Drawing.Color HighlightText { get { throw null; } }
public static System.Drawing.Color HotTrack { get { throw null; } }
public static System.Drawing.Color InactiveBorder { get { throw null; } }
public static System.Drawing.Color InactiveCaption { get { throw null; } }
public static System.Drawing.Color InactiveCaptionText { get { throw null; } }
public static System.Drawing.Color Info { get { throw null; } }
public static System.Drawing.Color InfoText { get { throw null; } }
public static System.Drawing.Color Menu { get { throw null; } }
public static System.Drawing.Color MenuBar { get { throw null; } }
public static System.Drawing.Color MenuHighlight { get { throw null; } }
public static System.Drawing.Color MenuText { get { throw null; } }
public static System.Drawing.Color ScrollBar { get { throw null; } }
public static System.Drawing.Color Window { get { throw null; } }
public static System.Drawing.Color WindowFrame { get { throw null; } }
public static System.Drawing.Color WindowText { get { throw null; } }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@
<WarningsNotAsErrors>CS0618</WarningsNotAsErrors>
<DefineConstants Condition="'$(TargetsWindows)' == 'true'">$(DefineConstants);FEATURE_WINDOWS_SYSTEM_COLORS;FEATURE_SYSTEM_EVENTS</DefineConstants>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
<TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-Unix;$(NetCoreAppCurrent);netcoreapp3.0-windows;netcoreapp3.0-Unix;netcoreapp3.0</TargetFrameworks>
<TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-Unix;$(NetCoreAppCurrent);netcoreapp3.0-windows;netcoreapp3.0-Unix;netcoreapp3.0;net461;netstandard2.0</TargetFrameworks>
<ExcludeCurrentNetCoreAppFromPackage>true</ExcludeCurrentNetCoreAppFromPackage>
<IncludeInternalObsoleteAttribute>true</IncludeInternalObsoleteAttribute>
<Nullable>enable</Nullable>
</PropertyGroup>
<!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
<PropertyGroup>
<GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetsAnyOS)' == 'true'">SR.SystemDrawingCommon_PlatformNotSupported</GeneratePlatformNotSupportedAssemblyMessage>
<IncludeInternalObsoleteAttribute Condition="'$(TargetFramework)' != 'net461'">true</IncludeInternalObsoleteAttribute>
<GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetsAnyOS)' == 'true' and '$(TargetFramework)' != 'net461'">SR.SystemDrawingCommon_PlatformNotSupported</GeneratePlatformNotSupportedAssemblyMessage>
</PropertyGroup>
<ItemGroup Condition="'$(TargetsAnyOS)' != 'true'">
<Compile Include="System\Drawing\Bitmap.cs" />
Expand Down Expand Up @@ -360,10 +361,8 @@
<LogicalName>placeholder.ico</LogicalName>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'">
<ProjectReference Include="$(LibrariesProjectRoot)Microsoft.Win32.SystemEvents\src\Microsoft.Win32.SystemEvents.csproj" />
</ItemGroup>
<ItemGroup>
<Reference Include="Microsoft.Win32.Primitives" />
<Reference Include="System.Buffers" />
<Reference Include="System.Collections" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,12 @@
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\src\System.Drawing.Common.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)Microsoft.Win32.SystemEvents\src\Microsoft.Win32.SystemEvents.csproj" />
</ItemGroup>
<ItemGroup Condition="$(TargetFramework.StartsWith('$(NetCoreAppCurrent)'))">
<Compile Include="GraphicsTests.Core.cs" />
<Compile Include="Graphics_GetContextTests.Core.cs" />
<Compile Include="Drawing2D\MatrixTests.Core.cs" />
<ProjectReference Include="..\src\System.Drawing.Common.csproj" />
</ItemGroup>
</Project>