Skip to content
Open
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
50 changes: 28 additions & 22 deletions tools/codegen/exe/Settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ Licensed under the MIT License. See LICENSE.txt in the project root for license
<Namespace Name="Effects">
<Enum Name="EffectInterpolationMode" ShouldProject="false" ProjectedNameOverride="CanvasImageInterpolation" Namespace="Microsoft.Graphics.Canvas"/>
<Enum Name="EffectScaleMode" ShouldProject="false" ProjectedNameOverride="CanvasImageInterpolation" Namespace="Microsoft.Graphics.Canvas"/>
<Enum Name="EffectInputColorSpace" ShouldProject="true" ProjectedNameOverride="EffectHueColorSpace" WinVer="_WIN32_WINNT_WIN10">
<Enum Name="EffectInputColorSpace" ShouldProject="true" ProjectedNameOverride="EffectHueColorSpace">
<Field Name="HSV" ProjectedNameOverride="Hsv"/>
<Field Name="HSL" ProjectedNameOverride="Hsl"/>
</Enum>
Expand Down Expand Up @@ -246,58 +246,64 @@ Licensed under the MIT License. See LICENSE.txt in the project root for license
<Property Name="ScaleMode" ProjectedNameOverride="InterpolationMode"/>
<Property Name="Bias" ProjectedNameOverride="Offset"/>
</Effect>
<Effect Name="ChromaKeyEffect" WinVer="_WIN32_WINNT_WIN10"/>
<Effect Name="ContrastEffect" WinVer="_WIN32_WINNT_WIN10">
<Effect Name="ChromaKeyEffect"/>
<Effect Name="ContrastEffect">
<Property Name="ClampInput" ProjectedNameOverride="ClampSource"/>
</Effect>
<Effect Name="EdgeDetectionEffect" WinVer="_WIN32_WINNT_WIN10">
<Effect Name="EdgeDetectionEffect">
<Property Name="Strength" ProjectedNameOverride="Amount"/>
<Property Name="BlurRadius" ProjectedNameOverride="BlurAmount"/>
</Effect>
<Effect Name="EmbossEffect" WinVer="_WIN32_WINNT_WIN10">
<Effect Name="EmbossEffect">
<Property Name="Height" ProjectedNameOverride="Amount"/>
<Property Name="Direction" ProjectedNameOverride="Angle" ConvertRadiansToDegrees="true"/>
</Effect>
<Effect Name="ExposureEffect" WinVer="_WIN32_WINNT_WIN10">
<Effect Name="ExposureEffect">
<Property Name="ExposureValue" ProjectedNameOverride="Exposure"/>
</Effect>
<Effect Name="GrayscaleEffect" WinVer="_WIN32_WINNT_WIN10"/>
<Effect Name="HighlightsandShadowsEffect" ProjectedNameOverride="HighlightsAndShadowsEffect" CLSIDOverride="CLSID_D2D1HighlightsShadows" WinVer="_WIN32_WINNT_WIN10">
<Effect Name="GrayscaleEffect"/>
<Effect Name="HighlightsandShadowsEffect" ProjectedNameOverride="HighlightsAndShadowsEffect" CLSIDOverride="CLSID_D2D1HighlightsShadows">
<Property Name="MaskBlurRadius" ProjectedNameOverride="MaskBlurAmount"/>
<Property Name="InputGamma" ProjectedNameOverride="SourceIsLinearGamma" Type="boolean" IsHandCoded="true"/>
</Effect>
<Effect Name="HueToRgbEffect" WinVer="_WIN32_WINNT_WIN10">
<Effect Name="HueToRgbEffect">
<Property Name="InputColorSpace" ProjectedNameOverride="SourceColorSpace"/>
</Effect>
<Effect Name="InvertEffect" WinVer="_WIN32_WINNT_WIN10"/>
<Effect Name="LookupTable3DEffect" ProjectedNameOverride="TableTransfer3DEffect" WinVer="_WIN32_WINNT_WIN10">
<Effect Name="InvertEffect"/>
<Effect Name="LookupTable3DEffect" ProjectedNameOverride="TableTransfer3DEffect">
<Property Name="Lut" ProjectedNameOverride="Table"/>
</Effect>
<Effect Name="PosterizeEffect" WinVer="_WIN32_WINNT_WIN10"/>
<Effect Name="RgbToHueEffect" WinVer="_WIN32_WINNT_WIN10"/>
<Effect Name="SepiaEffect" WinVer="_WIN32_WINNT_WIN10"/>
<Effect Name="SharpenEffect" WinVer="_WIN32_WINNT_WIN10">
<Effect Name="PosterizeEffect"/>
<Effect Name="RgbToHueEffect"/>
<Effect Name="SepiaEffect"/>
<Effect Name="SharpenEffect">
<Property Name="Sharpness" ProjectedNameOverride="Amount"/>
</Effect>
<Effect Name="StraightenEffect" WinVer="_WIN32_WINNT_WIN10">
<Effect Name="StraightenEffect">
<Property Name="Angle" ConvertRadiansToDegrees="true"/>
<Property Name="ScaleMode" ProjectedNameOverride="InterpolationMode"/>
</Effect>
<Effect Name="TemperatureAndTintEffect" CLSIDOverride="CLSID_D2D1TemperatureTint" WinVer="_WIN32_WINNT_WIN10"/>
<Effect Name="VignetteEffect" WinVer="_WIN32_WINNT_WIN10">
<Effect Name="TemperatureAndTintEffect" CLSIDOverride="CLSID_D2D1TemperatureTint"/>
<Effect Name="VignetteEffect">
<Property Name="TransitionSize" ProjectedNameOverride="Amount"/>
<Property Name="Strength" ProjectedNameOverride="Curve"/>
</Effect>
<Effect Name="AlphaMaskEffect" WinVer="_WIN32_WINNT_WIN10" IsSupportedCheck="ID2D1Factory5">
<Effect Name="AlphaMaskEffect" IsSupportedCheck="ID2D1Factory5">
<Input Name="Destination" ProjectedNameOverride="Source"/>
<Input Name="Mask" ProjectedNameOverride="AlphaMask"/>
</Effect>
<Effect Name="CrossFadeEffect" WinVer="_WIN32_WINNT_WIN10" IsSupportedCheck="ID2D1Factory5">
<Effect Name="CrossFadeEffect" IsSupportedCheck="ID2D1Factory5">
<Input Name="Source" ProjectedNameOverride="Source1"/>
<Input Name="Destination" ProjectedNameOverride="Source2"/>
<Property Name="Weight" ProjectedNameOverride="CrossFade"/>
</Effect>
<Effect Name="OpacityEffect" WinVer="_WIN32_WINNT_WIN10" IsSupportedCheck="ID2D1Factory5"/>
<Effect Name="TintEffect" WinVer="_WIN32_WINNT_WIN10" IsSupportedCheck="ID2D1Factory5"/>
<Effect Name="OpacityEffect" IsSupportedCheck="ID2D1Factory5"/>
<Effect Name="TintEffect" IsSupportedCheck="ID2D1Factory5"/>
<Effect Name="HDRToneMapEffect" ProjectedNameOverride="HdrToneMapEffect" CLSIDOverride="CLSID_D2D1HdrToneMap"/>
<Enum Name="HDRToneMapEffectDisplayMode" ProjectedNameOverride="HdrToneMapEffectDisplayMode">
<Field Name="SDR" ProjectedNameOverride="Sdr"/>
<Field Name="HDR" ProjectedNameOverride="Hdr"/>
</Enum>
<Effect Name="WhiteLevelAdjustmentEffect"/>
</Namespace>
</Settings>
4 changes: 3 additions & 1 deletion tools/codegen/exe/apiref/UpdateApiResourceFiles.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ SET FILE_LIST=^
GammaTransfer.xml ^
GaussianBlur.xml ^
Grayscale.xml ^
HDRToneMap.xml ^
HighlightsShadows.xml ^
HueRotation.xml ^
HueToRgb.xml ^
Expand Down Expand Up @@ -125,7 +126,8 @@ SET FILE_LIST=^
Tint.xml ^
Turbulence.xml ^
UnPremultiply.xml ^
Vignette.xml
Vignette.xml ^
WhiteLevelAdjustment.xml

CALL :UPDATE_FILES

Expand Down
43 changes: 43 additions & 0 deletions tools/codegen/exe/apiref/effects/HdrToneMap.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?xml version="1.0"?>
<!--
Copyright (c) Microsoft Corporation. All rights reserved.

Licensed under the MIT License. See LICENSE.txt in the project root for license information.
-->

<Effect>
<!-- Localization -->
<_locDefinition>
<_locDefault _loc="locNone" />
<_locTag _locAttrData="displayname">Field</_locTag>
<_locTag _locAttrData="name">Input</_locTag>
<_locTag _locAttrData="value">Property</_locTag>
</_locDefinition>
<!-- System Properties -->
<Property name='DisplayName' type='string' value='HDR Tone Map'/>
<Property name='Author' type='string' value='Microsoft Corporation'/>
<Property name='Category' type='string' value='Color'/>
<Property name='Description' type='string' value='Adjusts the maximum luminance of the source image to fit within the maximum output luminance supported. Input and output luminance values are specified in nits. Note that the color space of the image is assumed to be scRGB.'/>

<!-- This effect has one input -->
<Inputs>
<Input name='Source'/>
</Inputs>

<Property name='InputMaxLuminance' type='float'>
<Property name='DisplayName' type='string' value='Input Max Luminance'/>
<Property name="Default" type="float" value="4000" />
</Property>
<Property name="OutputMaxLuminance" type="float">
<Property name="DisplayName" type="string" value="Output Max Luminance" />
<Property name="Default" type="float" value="300" />
</Property>
<Property name='DisplayMode' type='enum'>
<Property name='DisplayName' type='string' value='Display Mode'/>
<Property name="Default" type="enum" value="0" />
<Fields>
<Field name='SDR' displayname='SDR' index="0" />
<Field name='HDR' displayname='HDR' index="1" />
</Fields>
</Property>
</Effect>
36 changes: 36 additions & 0 deletions tools/codegen/exe/apiref/effects/WhiteLevelAdjustment.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?xml version="1.0"?>
<!--
Copyright (c) Microsoft Corporation. All rights reserved.

Licensed under the MIT License. See LICENSE.txt in the project root for license information.
-->

<Effect>
<!-- Localization -->
<_locDefinition>
<_locDefault _loc="locNone" />
<_locTag _locAttrData="displayname">Field</_locTag>
<_locTag _locAttrData="name">Input</_locTag>
<_locTag _locAttrData="value">Property</_locTag>
</_locDefinition>
<!-- System Properties -->
<Property name='DisplayName' type='string' value='White Level Adjustment'/>
<Property name='Author' type='string' value='Microsoft Corporation'/>
<Property name='Category' type='string' value='Color'/>
<Property name='Description' type='string'
value='This effect adjusts the white level of the source image by multiplying the source image color by the ratio of the input and output white levels. Input and output white levels are specified in nits.'/>

<!-- This effect have one input -->
<Inputs>
<Input name='Source'/>
</Inputs>

<Property name='InputWhiteLevel' type='float'>
<Property name='DisplayName' type='string' value='Input White Level'/>
<Property name="Default" type="float" value="80" />
</Property>
<Property name="OutputWhiteLevel" type="float">
<Property name="DisplayName" type="string" value="Output White Level" />
<Property name="Default" type="float" value="80" />
</Property>
</Effect>
2 changes: 2 additions & 0 deletions tools/codegen/exe/codegen.exe.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@
<None Include="apiref\effects\CrossFade.xml" />
<None Include="apiref\effects\Opacity.xml" />
<None Include="apiref\effects\Tint.xml" />
<None Include="apiref\effects\HdrToneMap.xml" />
<None Include="apiref\effects\WhiteLevelAdjustment.xml" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Expand Down
2 changes: 1 addition & 1 deletion tools/codegen/test/UnitTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public void OutputEffectsIsSync()
FileInfo[] actualGeneratedFiles = actualDirectoryInfo.GetFiles();

// Ensure the correct number of files was generated.
const int expectedEffectCount = 59;
const int expectedEffectCount = 61;
Assert.AreEqual(expectedEffectCount * 3 + 2, expectedGeneratedFiles.Length);
Assert.AreEqual(expectedGeneratedFiles.Length, actualGeneratedFiles.Length);

Expand Down
53 changes: 53 additions & 0 deletions winrt/docsrc/effects/HdrToneMapEffect.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?xml version="1.0"?>
<!--
Copyright (c) Microsoft Corporation. All rights reserved.

Licensed under the MIT License. See LICENSE.txt in the project root for license information.
-->

<doc>
<assembly>
<name>Microsoft.Graphics.Canvas</name>
</assembly>
<members>

<member name="T:Microsoft.Graphics.Canvas.Effects.HdrToneMapEffect" NoComposition="true" Win10_17763="true">
<summary>
This effect adjusts the dynamic range of an image to better suit its content to the capability of the output display.
</summary>
<remarks>
<p>This Windows Runtime type corresponds to the
<a href="https://docs.microsoft.com/en-us/windows/win32/direct2d/hdr-tone-map-effect">D2D HDR tone map effect</a>.</p>
</remarks>
</member>
<member name="M:Microsoft.Graphics.Canvas.Effects.HdrToneMapEffect.#ctor">
<summary>Initializes a new instance of the HdrToneMapEffect class.</summary>
</member>
<member name="P:Microsoft.Graphics.Canvas.Effects.HdrToneMapEffect.Source">
<summary>Gets or sets the input source for the effect.</summary>
</member>
<member name="P:Microsoft.Graphics.Canvas.Effects.HdrToneMapEffect.InputMaxLuminance">
<summary>The maximum light level (or MaxCLL) of the image, in nits. Default value 4000.</summary>
</member>
<member name="P:Microsoft.Graphics.Canvas.Effects.HdrToneMapEffect.OutputMaxLuminance">
<summary>The MaxCLL supported by the output target, in nits - typically set to the MaxCLL of the display. Default value 300.</summary>
</member>
<member name="P:Microsoft.Graphics.Canvas.Effects.HdrToneMapEffect.DisplayMode">
<summary>When set to Hdr, the tone mapping curve is adjusted to better fit the fit the behavior of common HDR displays. Default value Sdr.</summary>
</member>

<member name="T:Microsoft.Graphics.Canvas.Effects.HdrToneMapEffectDisplayMode">
<summary>The display mode used for the effect.</summary>
</member>
<member name="F:Microsoft.Graphics.Canvas.Effects.HdrToneMapEffectDisplayMode.Sdr">
<summary>Specifies that the tone mapper algorithm be optimized for best appearance on a standard dynamic range (SDR) display.</summary>
</member>
<member name="F:Microsoft.Graphics.Canvas.Effects.HdrToneMapEffectDisplayMode.Hdr">
<summary>Specifies that the tone mapper algorithm be optimized for best appearance on a high dynamic range (HDR) display.</summary>
</member>

<inherittemplate name="EffectTemplate" replacement="HdrToneMapEffect" />
<inherittemplate name="ICanvasEffectTemplate" replacement="HdrToneMapEffect" />

</members>
</doc>
40 changes: 40 additions & 0 deletions winrt/docsrc/effects/WhiteLevelAdjustmentEffect.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?xml version="1.0"?>
<!--
Copyright (c) Microsoft Corporation. All rights reserved.

Licensed under the MIT License. See LICENSE.txt in the project root for license information.
-->

<doc>
<assembly>
<name>Microsoft.Graphics.Canvas</name>
</assembly>
<members>

<member name="T:Microsoft.Graphics.Canvas.Effects.WhiteLevelAdjustmentEffect" NoComposition="true" Win10_17763="true">
<summary>
This effect allows the white level of an image to be linearly scaled. This is especially helpful when you convert between display-referred luminance space and scene-referred luminance space, or vice versa.
</summary>
<remarks>
<p>This Windows Runtime type corresponds to the
<a href="https://docs.microsoft.com/en-us/windows/win32/direct2d/white-level-adjustment-effect">D2D White level adjustment effect</a>.</p>
</remarks>
</member>
<member name="M:Microsoft.Graphics.Canvas.Effects.WhiteLevelAdjustmentEffect.#ctor">
<summary>Initializes a new instance of the WhiteLevelAdjustmentEffect class.</summary>
</member>
<member name="P:Microsoft.Graphics.Canvas.Effects.WhiteLevelAdjustmentEffect.Source">
<summary>Gets or sets the input source for the effect.</summary>
</member>
<member name="P:Microsoft.Graphics.Canvas.Effects.WhiteLevelAdjustmentEffect.InputWhiteLevel">
<summary>The white level of the input image, in nits. Default value 80.</summary>
</member>
<member name="P:Microsoft.Graphics.Canvas.Effects.WhiteLevelAdjustmentEffect.OutputWhiteLevel">
<summary>The white level of the output image, in nits. Default value 80.</summary>
</member>

<inherittemplate name="EffectTemplate" replacement="WhiteLevelAdjustmentEffect" />
<inherittemplate name="ICanvasEffectTemplate" replacement="WhiteLevelAdjustmentEffect" />

</members>
</doc>
2 changes: 2 additions & 0 deletions winrt/lib/Canvas.abi.idl
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ cpp_quote("#endif")
#include "effects\generated\GammaTransferEffect.abi.idl"
#include "effects\generated\GaussianBlurEffect.abi.idl"
#include "effects\generated\GrayscaleEffect.abi.idl"
#include "effects\generated\HdrToneMapEffect.abi.idl"
#include "effects\generated\HighlightsAndShadowsEffect.abi.idl"
#include "effects\generated\HueRotationEffect.abi.idl"
#include "effects\generated\HueToRgbEffect.abi.idl"
Expand Down Expand Up @@ -132,3 +133,4 @@ cpp_quote("#endif")
#include "effects\generated\TurbulenceEffect.abi.idl"
#include "effects\generated\UnPremultiplyEffect.abi.idl"
#include "effects\generated\VignetteEffect.abi.idl"
#include "effects\generated\WhiteLevelAdjustmentEffect.abi.idl"
Loading