Skip to content
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

We don't need System.Drawing #22707

Merged
merged 1 commit into from
May 29, 2024
Merged
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
13 changes: 6 additions & 7 deletions src/SingleProject/Resizetizer/src/TizenSplashUpdater.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using Microsoft.Build.Framework;
using Microsoft.Build.Utilities;
Expand All @@ -20,8 +19,8 @@ public class TizenSplashUpdater : Task
static public Dictionary<(string Resolution, string Orientation), string> splashDpiMap = new Dictionary<(string, string), string>();

const string splashDirectoryName = "splash";
Size hdSize = new Size(720, 1080);
Size fhdSize = new Size(1080, 1920);
SKSizeI hdSize = new SKSizeI(720, 1080);
SKSizeI fhdSize = new SKSizeI(1080, 1920);

public override bool Execute()
{
Expand Down Expand Up @@ -61,14 +60,14 @@ public override bool Execute()
return true;
}

Size GetScreenSize(string resolution, string orientation) =>
SKSizeI GetScreenSize(string resolution, string orientation) =>
resolution switch
{
"mdpi" => orientation == "portrait" ? hdSize : new Size(hdSize.Height, hdSize.Width),
_ => orientation == "portrait" ? fhdSize : new Size(fhdSize.Height, fhdSize.Width)
"mdpi" => orientation == "portrait" ? hdSize : new SKSizeI(hdSize.Height, hdSize.Width),
_ => orientation == "portrait" ? fhdSize : new SKSizeI(fhdSize.Height, fhdSize.Width)
};

void UpdateColorAndMoveFile(ResizeImageInfo splashInfo, Size screenSize, string sourceFilePath, string destFilePath)
void UpdateColorAndMoveFile(ResizeImageInfo splashInfo, SKSizeI screenSize, string sourceFilePath, string destFilePath)
{
var color = splashInfo.Color;
if (color == null)
Expand Down
Loading