コード例 #1
0
 public DrawSettings(DrawFormat drawFormat, Font font, Color color, IColorizer colorizer)
 {
     DrawFormat = drawFormat;
     Font       = font;
     Color      = color;
     Colorizer  = colorizer;
 }
コード例 #2
0
 public QRAnimationCreator(
     IQRCodeEncoder qrCodeEncoder,
     IBinarizer binarizer, ITriparizer triparizer, IColorizer colorizer, IMerger merger,
     IBitMatrixDrawer bitMatrixDrawer, ITripMatrixDrawer tripMatrixDrawer,
     Func <IReadOnlyList <IRgb24BitmapFrame>, IRgb24BitmapBase> frameMerger)
     : base(qrCodeEncoder, binarizer, triparizer, colorizer, merger, bitMatrixDrawer, tripMatrixDrawer)
 {
     FrameMerger = frameMerger;
 }
コード例 #3
0
ファイル: Orange.cs プロジェクト: toddcoder/Orange
 public Orange(string source, IColorizer colorizer = null, IFileCache fileCache = null, IConsole console = null)
 {
     this.source    = source.Trim();
     this.colorizer = colorizer;
     this.fileCache = fileCache;
     this.console   = console;
     verboseText    = "";
     block          = null;
 }
コード例 #4
0
        public static PresentedInfo TryAppendDeclaredElement(
            [NotNull] this IColorizer colorizer,
            [CanBeNull] IDeclaredElement element,
            [CanBeNull] ISubstitution substitution,
            [NotNull] PresenterOptions options)
        {
            if (element == null || substitution == null)
            {
                return(new PresentedInfo());
            }

            return(colorizer.AppendDeclaredElement(element, substitution, options));
        }
コード例 #5
0
        public static PresentedInfo TryAppendDeclaredElement(
            this IColorizer colorizer,
            IDeclaredElement?element,
            ISubstitution?substitution,
            PresenterOptions options,
            ITreeNode?contextualNode)
        {
            if (element is null || substitution is null)
            {
                return(new PresentedInfo());
            }

            return(colorizer.AppendDeclaredElement(element, substitution, options, contextualNode));
        }
コード例 #6
0
        public Orange(string source, IColorizer colorizer = null, IFileCache fileCache = null, IConsole console = null)
        {
            this.source    = source.Trim();
            this.colorizer = colorizer;
            this.fileCache = fileCache;
            this.console   = console;

            verboseText   = "";
            block         = null;
            Text          = "";
            ModuleFolders = new string[0];
            LastValue     = "";
            LastType      = "";
        }
コード例 #7
0
        public RichText TryPresent([NotNull] DeclaredElementInstance declaredElementInstance, [NotNull] PresenterOptions options,
                                   [NotNull] PsiLanguageType languageType, bool useReSharperColors, [NotNull] out PresentedInfo presentedInfo)
        {
            var        richText  = new RichText();
            IColorizer colorizer = TryCreateColorizer(richText, languageType, useReSharperColors);

            if (colorizer == null)
            {
                presentedInfo = new PresentedInfo();
                return(null);
            }

            presentedInfo = colorizer.AppendDeclaredElement(declaredElementInstance.Element, declaredElementInstance.Substitution, options);
            return(richText);
        }
コード例 #8
0
        public RichText TryPresent([NotNull] DeclaredElementInstance declaredElementInstance, [NotNull] PresenterOptions options,
                                   [NotNull] PsiLanguageType languageType, [CanBeNull] string nameHighlightingAttributeId, [NotNull] out PresentedInfo presentedInfo)
        {
            var richText = new RichText();

            presentedInfo = new PresentedInfo();
            IColorizer colorizer = TryCreateColorizer(richText, options, languageType, presentedInfo);

            if (colorizer == null)
            {
                return(null);
            }

            colorizer.AppendDeclaredElement(declaredElementInstance.Element, declaredElementInstance.Substitution, nameHighlightingAttributeId);
            return(richText);
        }
コード例 #9
0
        public RichText TryPresent(
            [NotNull] ITreeNode presentableNode,
            [NotNull] PresenterOptions options,
            [NotNull] PsiLanguageType languageType,
            [NotNull] HighlighterIdProvider highlighterIdProvider)
        {
            var        richText  = new RichText();
            IColorizer colorizer = TryCreateColorizer(richText, languageType, highlighterIdProvider);

            if (colorizer == null)
            {
                return(null);
            }

            colorizer.AppendPresentableNode(presentableNode, options);
            return(richText);
        }
コード例 #10
0
        public RichText TryPresent(
            [NotNull] DeclaredElementInstance declaredElementInstance,
            [NotNull] PresenterOptions options,
            [NotNull] PsiLanguageType languageType,
            [NotNull] HighlighterIdProvider highlighterIdProvider,
            [CanBeNull] ITreeNode contextualNode,
            [NotNull] out PresentedInfo presentedInfo)
        {
            var        richText  = new RichText();
            IColorizer colorizer = TryCreateColorizer(richText, languageType, highlighterIdProvider);

            if (colorizer == null)
            {
                presentedInfo = new PresentedInfo();
                return(null);
            }

            presentedInfo = colorizer.AppendDeclaredElement(declaredElementInstance.Element, declaredElementInstance.Substitution, options, contextualNode);
            return(richText);
        }
コード例 #11
0
ファイル: QRArtCreator.cs プロジェクト: triplelog/qr-art
 public QRArtCreator(
     IQRCodeEncoder qrCodeEncoder,
     IBinarizer binarizer, ITriparizer triparizer, IColorizer colorizer, IMerger merger,
     IBitMatrixDrawer bitMatrixDrawer, ITripMatrixDrawer tripMatrixDrawer)
 {
     if (qrCodeEncoder == null)
     {
         throw new ArgumentNullException(nameof(qrCodeEncoder));
     }
     if (binarizer == null)
     {
         throw new ArgumentNullException(nameof(binarizer));
     }
     if (colorizer == null)
     {
         throw new ArgumentNullException(nameof(colorizer));
     }
     if (triparizer == null)
     {
         throw new ArgumentNullException(nameof(triparizer));
     }
     if (merger == null)
     {
         throw new ArgumentNullException(nameof(merger));
     }
     if (bitMatrixDrawer == null)
     {
         throw new ArgumentNullException(nameof(bitMatrixDrawer));
     }
     QRCodeEncoder    = qrCodeEncoder;
     Binarizer        = binarizer;
     Triparizer       = triparizer;
     Colorizer        = colorizer;
     Merger           = merger;
     BitMatrixDrawer  = bitMatrixDrawer;
     TripMatrixDrawer = tripMatrixDrawer;
 }
コード例 #12
0
ファイル: Terrain.cs プロジェクト: deanljohnson/EnviroGen
 public Terrain(HeightMap map, IColorizer colorizer)
     : base(map)
 {
     Colorizer = colorizer;
     Image = new Image(colorizer.Colorize(this));
 }
コード例 #13
0
ファイル: ColorizerCollection.cs プロジェクト: AppleePie/fp
 private void Add(IColorizer item) => List.Add(item);