예제 #1
0
 protected override void ResetOverride(IPaintShopRenderer renderer)
 {
     renderer.OverrideTexture(DetailsTexture, null);
     if (PatternTexture != null)
     {
         renderer.OverrideTexture(PatternTexture, null);
     }
 }
예제 #2
0
            protected override void ResetOverride(IPaintShopRenderer renderer)
            {
                if (DiffuseTexture != null)
                {
                    renderer.OverrideTexture(DiffuseTexture, null);
                }

                if (NormalsTexture != null)
                {
                    renderer.OverrideTexture(NormalsTexture, null);
                }

                _onlyPreviewModeChanged = false;
                _flatNormals            = false;
            }
예제 #3
0
 protected override void ResetOverride(IPaintShopRenderer renderer)
 {
     foreach (var replacement in Replacements)
     {
         renderer.OverrideTexture(replacement.Key, null);
     }
 }
예제 #4
0
 protected override void ResetOverride(IPaintShopRenderer renderer)
 {
     foreach (var tex in AffectedTextures)
     {
         renderer.OverrideTexture(tex, null);
     }
 }
예제 #5
0
 protected override void ApplyOverride(IPaintShopRenderer renderer)
 {
     foreach (var replacement in _replacements)
     {
         renderer.OverrideTexture(replacement.Key, replacement.Value);
     }
 }
예제 #6
0
 protected override void ApplyOverride(IPaintShopRenderer renderer)
 {
     foreach (var texture in _textures)
     {
         renderer.OverrideTexture(texture, _color.ToColor(), _opacity);
     }
 }
예제 #7
0
            protected override void ApplyOverride(IPaintShopRenderer renderer)
            {
                var value = Value.Value;

                if (value == null)
                {
                    return;
                }
                foreach (var pair in value)
                {
                    renderer.OverrideTexture(pair.Key, pair.Value);
                }
            }
예제 #8
0
            protected override void ApplyOverride(IPaintShopRenderer renderer)
            {
                var value = Value.Value;

                if (value == null)
                {
                    return;
                }
                foreach (var tex in _textures)
                {
                    renderer.OverrideTexture(tex, value);
                }
            }
예제 #9
0
            protected void ApplyColor(IPaintShopRenderer renderer)
            {
                if (_previousColor != Color || _previousFlakes != Flakes)
                {
                    _previousColor  = Color;
                    _previousFlakes = Flakes;

                    if (SupportsFlakes && Flakes > 0d)
                    {
                        renderer.OverrideTextureFlakes(DetailsTexture, Color.ToColor(), FlakesSize, Flakes);
                    }
                    else
                    {
                        renderer.OverrideTexture(DetailsTexture, Color.ToColor(), 1d);
                    }
                }
            }
예제 #10
0
            protected void ApplyPattern(IPaintShopRenderer renderer)
            {
                if (!_patternChanged || PatternTexture == null)
                {
                    return;
                }
                _patternChanged = false;

                if (PatternEnabled && CurrentPattern != null)
                {
                    renderer.OverrideTexturePattern(PatternTexture, PatternBase ?? PaintShopSource.InputSource, CurrentPattern.Source,
                                                    CurrentPattern.Overlay ?? PatternOverlay, CurrentPattern.Colors.DrawingColors);
                }
                else
                {
                    renderer.OverrideTexture(PatternTexture, null);
                }
            }
예제 #11
0
            protected override void ApplyOverride(IPaintShopRenderer renderer)
            {
                base.ApplyOverride(renderer);
                if (_previousComplexMode != _complexMode || Math.Abs(_previousReflection - Reflection) > 0.001 || Math.Abs(_previousGloss - Gloss) > 0.001 ||
                    Math.Abs(_previousSpecular - Specular) > 0.001)
                {
                    if (ComplexMode)
                    {
                        renderer.OverrideTextureMaps(MapsTexture, Reflection, Gloss, Specular, FixGloss,
                                                     MapsDefaultTexture, MapsMask);
                    }
                    else
                    {
                        renderer.OverrideTexture(MapsTexture, null);
                    }

                    _previousComplexMode = _complexMode;
                    _previousReflection  = Reflection;
                    _previousGloss       = Gloss;
                    _previousSpecular    = Specular;
                }
            }
예제 #12
0
 protected override void ResetOverride(IPaintShopRenderer renderer)
 {
     base.ResetOverride(renderer);
     renderer.OverrideTexture(MapsTexture, null);
 }