Beispiel #1
0
        protected override void OnSetRenderInfo(PropertyBasedEffectConfigToken newToken, RenderArgs dstArgs, RenderArgs srcArgs)
        {
            SelLower  = newToken.GetProperty <Int32Property>(PropertyNames.SelLower).Value;
            SelUpper  = newToken.GetProperty <Int32Property>(PropertyNames.SelUpper).Value;
            SizeLower = newToken.GetProperty <Int32Property>(PropertyNames.SizeLower).Value;
            SizeUpper = newToken.GetProperty <Int32Property>(PropertyNames.SizeUpper).Value;
            ReqLower  = newToken.GetProperty <Int32Property>(PropertyNames.ReqLower).Value;
            ReqUpper  = newToken.GetProperty <Int32Property>(PropertyNames.ReqUpper).Value;

            base.OnSetRenderInfo(newToken, dstArgs, srcArgs);

            PdnRegion selection = EnvironmentParameters.GetSelection(SrcArgs.Surface.Bounds);

            CustomOnRender(selection.GetRegionScansInt());
        }
Beispiel #2
0
        protected override void OnSetRenderInfo(PropertyBasedEffectConfigToken newToken, RenderArgs dstArgs, RenderArgs srcArgs)
        {
            Modes OldMode = Mode;

            Mode           = (Modes)newToken.GetProperty <StaticListChoiceProperty>(PropertyNames.Mode).Value;
            ModeChanged    = Mode != OldMode;
            LowerThreshold = newToken.GetProperty <Int32Property>(PropertyNames.LowerThreshold).Value;

            UpperThreshold = newToken.GetProperty <Int32Property>(PropertyNames.UpperThreshold).Value;

            float OldTolerance = Tolerance;

            Tolerance        = newToken.GetProperty <Int32Property>(PropertyNames.Tolerance).Value;
            Tolerance       *= Tolerance / toleranceMax / toleranceMax;
            ToleranceChanged = Tolerance != OldTolerance;

            base.OnSetRenderInfo(newToken, dstArgs, srcArgs);

            PdnRegion           selection = EnvironmentParameters.GetSelection(SrcArgs.Surface.Bounds);
            List <RectangleRef> selRects  = RectangleRef.RectanglesToRectangleRefs(selection.GetRegionScansInt());

            CustomOnRender(RectangleRef.SplitSmall(selRects, selection.GetBoundsInt().Bottom / 4));
        }