Skip to content

Replace "System.Drawing" with "SkiaSharp" in all scripts.#24

Merged
Miepee merged 4 commits intoMiepee:skiasharpfrom
VladiStep:skiasharpScripts
Jun 2, 2024
Merged

Replace "System.Drawing" with "SkiaSharp" in all scripts.#24
Miepee merged 4 commits intoMiepee:skiasharpfrom
VladiStep:skiasharpScripts

Conversation

@VladiStep
Copy link
Copy Markdown

@VladiStep VladiStep commented Dec 27, 2023

Description

  1. Replaced "System.Drawing" with "SkiaSharp" (or just removed a reference to it).
  2. Improved formatting in some scripts, and reworked some of them.
    It should close this issue.

Caveats

"FontEditor.csx" and "ExportFontData.csx" are heavily using "System.Windows.Forms" (therefore "System.Drawing"), so I skipped them for now.

Notes

I only tested "ImportFontData.csx" and "ImportGraphics.csx".

@github-actions
Copy link
Copy Markdown

github-actions bot commented Dec 27, 2023

@Miepee Miepee marked this pull request as ready for review January 11, 2024 13:29
@Miepee
Copy link
Copy Markdown
Owner

Miepee commented Jan 11, 2024

TODO: test all of the scripts

Bitmap img = new Bitmap(path);
tileset.Texture.ReplaceTexture((Image)img);
}
tileset.Texture.ReplaceTexture(SKBitmap.Decode(path), true);
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what would happen if the file does not exist? does it just do a silent warning?

MaxOneAxis,
}

public struct Rect
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is like the fourth time that this is created in a script. It may be worth it to clarify that somewhere in the textureworker instead?

@Miepee
Copy link
Copy Markdown
Owner

Miepee commented Jan 18, 2024

can you add a top comment to "FontEditor.csx" and "ExportFontData.csx" to say something like "These are Windows only. Refactor these in the future when we have a Cross-platform UI"?

@Miepee Miepee merged commit d972c55 into Miepee:skiasharp Jun 2, 2024
Miepee added a commit that referenced this pull request Jun 2, 2024
* Restore WIP script changes

* Finish removing/replacing of "System.Drawing" in all scripts (not tested)

* Update MergeImages.csx

* Update ImportMasks.csx

---------

Co-authored-by: Miepee <[email protected]>
@VladiStep VladiStep deleted the skiasharpScripts branch June 25, 2024 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants