Files
Xune/UIX.RenderApi.Skia/Microsoft/Iris/Render/EdgeDetectionElement.cs
T

53 lines
1.9 KiB
C#
Raw Normal View History

2021-07-11 22:59:29 -05:00
// Decompiled with JetBrains decompiler
// Type: Microsoft.Iris.Render.EdgeDetectionElement
// Assembly: UIX.RenderApi, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217
// MVID: D47658B8-A8EA-43D6-8837-ECE823BFFFC1
// Assembly location: C:\Program Files\Zune\UIX.RenderApi.dll
using Microsoft.Iris.Render.Common;
using Microsoft.Iris.Render.Graphics;
using System;
namespace Microsoft.Iris.Render
{
2021-07-11 23:04:40 -05:00
public class EdgeDetectionElement : EffectOperation
2021-07-11 22:59:29 -05:00
{
2021-07-11 23:04:40 -05:00
internal const string EdgeLimitPropertyName = "EdgeLimit";
private float m_flEdgeLimit;
private byte m_nEdgeLimitID;
public EdgeDetectionElement(string stName, float flEdgeLimit)
: this()
{
Debug2.Validate(!string.IsNullOrEmpty(stName), typeof(ArgumentException), nameof(stName));
this.m_stName = stName;
this.m_flEdgeLimit = flEdgeLimit;
}
public EdgeDetectionElement() => this.m_typeOperation = EffectOperationType.EdgeDetection;
public float EdgeLimit
{
get => this.m_flEdgeLimit;
set => this.m_flEdgeLimit = value;
}
internal byte EdgeLimitID => this.m_nEdgeLimitID;
internal override int PreProcessProperties(
Map<string, EffectProperty> dictionary,
ref byte nNextUniqueID)
{
2021-07-11 23:07:04 -05:00
return base.PreProcessProperties(dictionary, ref nNextUniqueID) + this.PreProcessProperty(dictionary, "EdgeLimit", 8, ref this.m_nEdgeLimitID, ref nNextUniqueID);
2021-07-11 23:04:40 -05:00
}
2021-07-11 23:07:04 -05:00
internal override bool Process(Map<string, EffectProperty> dictProperties) => this.GenerateProperty("EdgeLimit", EffectPropertyType.Float, m_flEdgeLimit, this.m_nEdgeLimitID, dictProperties);
2021-07-11 23:04:40 -05:00
internal override void AddCacheKey(ByteBuilder cacheKey)
{
base.AddCacheKey(cacheKey);
this.GeneratePropertyCacheKey("EdgeLimit", this.EdgeLimitID, this.EdgeLimit, cacheKey);
}
2021-07-11 22:59:29 -05:00
}
}