From d1cc83595f9ed4da5304fbcfd449d63dcff912a4 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Tue, 20 Oct 2026 16:06:43 +0200 Subject: [PATCH] [CoreGraphics] Document CGWindowImageOption flags Describe how each option affects window image bounds, opacity, shadows, and resolution. Remove the known-failure entries for the newly documented values. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 9a37ff16-2fda-4715-8343-f3408ac8c442 --- src/CoreGraphics/CGImage.cs | 14 ++++++++------ tests/cecil-tests/Documentation.KnownFailures.txt | 2 -- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/CoreGraphics/CGImage.cs b/src/CoreGraphics/CGImage.cs index f1f9e05b0533..90ca53749b6f 100644 --- a/src/CoreGraphics/CGImage.cs +++ b/src/CoreGraphics/CGImage.cs @@ -34,21 +34,23 @@ namespace CoreGraphics { #if MONOMAC || __MACCATALYST__ // uint32_t -> CGWindow.h (OSX SDK only) - /// To be added. - /// To be added. + /// Options that control how Core Graphics creates an image from a list of windows. + /// Combine these flags to control image bounds, opacity, shadows, and resolution. [SupportedOSPlatform ("maccatalyst")] [SupportedOSPlatform ("macos")] [Flags] public enum CGWindowImageOption : uint { - /// To be added. + /// Uses the default behavior when creating a window image. Default = 0, - /// To be added. + /// When CGRectNull is used for the bounds, excludes window frame ornamentation, such as shadows, from the bounds calculation. BoundsIgnoreFraming = (1 << 0), - /// To be added. + /// Forces the resulting image to be opaque, filling empty areas with white. ShouldBeOpaque = (1 << 1), - /// To be added. + /// Draws only the windows' shadows, not the windows themselves. OnlyShadows = (1 << 2), + /// Returns the image at the best resolution; its dimensions may differ from the screen-space bounds. BestResolution = (1 << 3), + /// Returns the image at nominal resolution, with dimensions matching the screen-space bounds. NominalResolution = (1 << 4), } diff --git a/tests/cecil-tests/Documentation.KnownFailures.txt b/tests/cecil-tests/Documentation.KnownFailures.txt index 6bea6a4f4812..431be2d4b495 100644 --- a/tests/cecil-tests/Documentation.KnownFailures.txt +++ b/tests/cecil-tests/Documentation.KnownFailures.txt @@ -1872,8 +1872,6 @@ F:CoreGraphics.CGToneMapping.ImageSpecificLumaScaling F:CoreGraphics.CGToneMapping.IturRecommended F:CoreGraphics.CGToneMapping.None F:CoreGraphics.CGToneMapping.ReferenceWhiteBased -F:CoreGraphics.CGWindowImageOption.BestResolution -F:CoreGraphics.CGWindowImageOption.NominalResolution F:CoreGraphics.NMatrix2.M11 F:CoreGraphics.NMatrix2.M12 F:CoreGraphics.NMatrix2.M21