• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Glyph类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中Glyph的典型用法代码示例。如果您正苦于以下问题:C# Glyph类的具体用法?C# Glyph怎么用?C# Glyph使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Glyph类属于命名空间,在下文中一共展示了Glyph类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: PreviewChanges

 public Solution PreviewChanges(
     string title,
     string helpString,
     string description,
     string topLevelName,
     Glyph topLevelGlyph,
     Solution newSolution,
     Solution oldSolution,
     bool showCheckBoxes = true)
 {
     var engine = new PreviewEngine(
         title,
         helpString,
         description,
         topLevelName,
         topLevelGlyph,
         newSolution,
         oldSolution,
         _componentModel,
         _imageService,
         showCheckBoxes);
     _previewChanges.PreviewChanges(engine);
     engine.CloseWorkspace();
     return engine.FinalSolution;
 }
开发者ID:CAPCHIK,项目名称:roslyn,代码行数:25,代码来源:PreviewService.cs


示例2: FileSystemCompletionHelper

        public FileSystemCompletionHelper(
            CompletionListProvider completionProvider,
            TextSpan textChangeSpan,
            ICurrentWorkingDirectoryDiscoveryService fileSystemDiscoveryService,
            Glyph folderGlyph,
            Glyph fileGlyph,
            ImmutableArray<string> searchPaths,
            IEnumerable<string> allowableExtensions,
            Func<string, bool> exclude = null,
            CompletionItemRules itemRules = null)
        {
            Debug.Assert(searchPaths.All(path => PathUtilities.IsAbsolute(path)));

            _completionProvider = completionProvider;
            _textChangeSpan = textChangeSpan;
            _searchPaths = searchPaths;
            _allowableExtensions = allowableExtensions.Select(e => e.ToLowerInvariant()).ToSet();
            _fileSystemDiscoveryService = fileSystemDiscoveryService;
            _folderGlyph = folderGlyph;
            _fileGlyph = fileGlyph;
            _exclude = exclude;
            _itemRules = itemRules;

            _lazyGetDrives = new Lazy<string[]>(() =>
                IOUtilities.PerformIO(Directory.GetLogicalDrives, SpecializedCollections.EmptyArray<string>()));
        }
开发者ID:noahstein,项目名称:roslyn,代码行数:26,代码来源:FileSystemCompletionHelper.cs


示例3: SymbolCompletionItem

 public SymbolCompletionItem(
     CompletionListProvider completionProvider,
     string displayText,
     string insertionText,
     string filterText,
     TextSpan filterSpan,
     int position,
     List<ISymbol> symbols,
     string sortText,
     AbstractSyntaxContext context,
     Glyph glyph,
     bool preselect = false,
     SupportedPlatformData supportedPlatforms = null,
     CompletionItemRules rules = null)
 : base(completionProvider, displayText, filterSpan,
    descriptionFactory: null, glyph: glyph,
    sortText: sortText, filterText: filterText, preselect: preselect, showsWarningIcon: supportedPlatforms != null, rules: rules,
    filters: GetFilters(symbols))
 {
     this.InsertionText = insertionText;
     this.Position = position;
     this.Symbols = symbols;
     this.Context = context;
     _supportedPlatforms = supportedPlatforms;
 }
开发者ID:Eyas,项目名称:roslyn,代码行数:25,代码来源:SymbolCompletionItem.cs


示例4: Create

        public static CompletionItem Create(
            string displayText,
            TextSpan span,
            Glyph? glyph,
            DeclarationModifiers modifiers,
            int line,
            ISymbol symbol,
            SyntaxToken token,
            int descriptionPosition,
            CompletionItemRules rules)
        {
            var props = ImmutableDictionary<string, string>.Empty
                .Add("Line", line.ToString())
                .Add("Modifiers", modifiers.ToString())
                .Add("TokenSpanEnd", token.Span.End.ToString());

            return SymbolCompletionItem.Create(
                displayText: displayText,
                span: span,
                symbol: symbol,
                glyph: glyph,
                descriptionPosition: descriptionPosition,
                properties: props,
                rules: rules);
        }
开发者ID:CAPCHIK,项目名称:roslyn,代码行数:25,代码来源:MemberInsertingCompletionItem.cs


示例5: Rasterize

		public Bitmap Rasterize(Glyph glyph, TextQuality quality)
		{
			EnsureSurfaceSize(ref glyph_surface, ref glyph_renderer, glyph.Font);
			SetTextRenderingOptions(glyph_renderer, glyph.Font, quality);

			RectangleF r2 = new RectangleF();

			glyph_renderer.Clear(Color.Transparent);

			glyph_renderer.DrawString(glyph.Character.ToString(), glyph.Font, Brushes.White, Point.Empty,  //new Point(glyph_surface.Width, 0),
				glyph.Font.Style == FontStyle.Italic ? load_glyph_string_format : load_glyph_string_format_tight);

			r2 = FindEdges(glyph_surface, true);

			//if ((default_string_format.FormatFlags & StringFormatFlags.DirectionRightToLeft) != 0)
			//{
			//    glyph_renderer.DrawString(glyph.Character.ToString(), glyph.Font, Brushes.White, Point.Empty, //new Point(glyph_surface.Width, 0),
			//        load_glyph_string_format);//glyph.Font.Style == FontStyle.Italic ? load_glyph_string_format : default_string_format);

			//    r2 = FindEdges(glyph_surface, true);
			//}
			//else
			//{
			//    glyph_renderer.DrawString(glyph.Character.ToString(), glyph.Font, Brushes.White, Point.Empty,
			//        load_glyph_string_format_tight); //glyph.Font.Style == FontStyle.Italic ? load_glyph_string_format : default_string_format);

			//    r2 = FindEdges(glyph_surface, false);
			//}

			return glyph_surface.Clone(r2, System.Drawing.Imaging.PixelFormat.Format32bppArgb);
		}
开发者ID:treytomes,项目名称:ASCIIWorld2,代码行数:31,代码来源:GdiPlusGlyphRasterizer.cs


示例6: Crop

        public static void Crop(Glyph glyph)
        {
            // Crop the top.
            while ((glyph.Subrect.Height > 1) && BitmapUtils.IsAlphaEntirely(0, glyph.Bitmap, new Rectangle(glyph.Subrect.X, glyph.Subrect.Y, glyph.Subrect.Width, 1)))
            {
                glyph.Subrect.Y++;
                glyph.Subrect.Height--;

                glyph.YOffset++;
            }

            // Crop the bottom.
            while ((glyph.Subrect.Height > 1) && BitmapUtils.IsAlphaEntirely(0, glyph.Bitmap, new Rectangle(glyph.Subrect.X, glyph.Subrect.Bottom - 1, glyph.Subrect.Width, 1)))
            {
                glyph.Subrect.Height--;
            }

            // Crop the left.
            while ((glyph.Subrect.Width > 1) && BitmapUtils.IsAlphaEntirely(0, glyph.Bitmap, new Rectangle(glyph.Subrect.X, glyph.Subrect.Y, 1, glyph.Subrect.Height)))
            {
                glyph.Subrect.X++;
                glyph.Subrect.Width--;

                glyph.XOffset++;
            }

            // Crop the right.
            while ((glyph.Subrect.Width > 1) && BitmapUtils.IsAlphaEntirely(0, glyph.Bitmap, new Rectangle(glyph.Subrect.Right - 1, glyph.Subrect.Y, 1, glyph.Subrect.Height)))
            {
                glyph.Subrect.Width--;
            }
        }
开发者ID:cg123,项目名称:xenko,代码行数:32,代码来源:GlyphCropper.cs


示例7: PreviewEngine

 public PreviewEngine(
     string title,
     string helpString,
     string description,
     string topLevelItemName,
     Glyph topLevelGlyph,
     Solution newSolution,
     Solution oldSolution,
     IComponentModel componentModel,
     IVsImageService2 imageService,
     bool showCheckBoxes = true)
 {
     _topLevelName = topLevelItemName;
     _topLevelGlyph = topLevelGlyph;
     _title = title;
     _helpString = helpString;
     _description = description;
     _newSolution = newSolution.WithMergedLinkedFileChangesAsync(oldSolution, cancellationToken: CancellationToken.None).Result;
     _oldSolution = oldSolution;
     _diffSelector = componentModel.GetService<ITextDifferencingSelectorService>();
     _editorFactory = componentModel.GetService<IVsEditorAdaptersFactoryService>();
     _componentModel = componentModel;
     this.ShowCheckBoxes = showCheckBoxes;
     _imageService = imageService;
 }
开发者ID:Rickinio,项目名称:roslyn,代码行数:25,代码来源:PreviewEngine.cs


示例8: SymbolGlyphDeferredContent

        public SymbolGlyphDeferredContent(Glyph glyph, IGlyphService glyphService)
        {
            Contract.ThrowIfNull(glyphService);

            _glyph = glyph;
            _glyphService = glyphService;
        }
开发者ID:CAPCHIK,项目名称:roslyn,代码行数:7,代码来源:SymbolGlyphDeferredContent.cs


示例9: Create

 public static CompletionItem Create(
     string displayText,
     ISymbol symbol,
     int contextPosition = -1,
     string sortText = null,
     string insertionText = null,
     Glyph? glyph = null,
     string filterText = null,
     int? matchPriority = null,
     SupportedPlatformData supportedPlatforms = null,
     ImmutableDictionary<string, string> properties = null,
     CompletionItemRules rules = null)
 {
     return Create(
         displayText: displayText,
         symbols: ImmutableArray.Create(symbol),
         contextPosition: contextPosition,
         sortText: sortText,
         insertionText: insertionText,
         glyph: glyph,
         filterText: filterText,
         matchPriority: matchPriority.GetValueOrDefault(),
         supportedPlatforms: supportedPlatforms,
         properties: properties,
         rules: rules);
 }
开发者ID:GuilhermeSa,项目名称:roslyn,代码行数:26,代码来源:SymbolCompletionItem.cs


示例10: Create

 public static CompletionItem Create(
     string displayText,
     TextSpan span,
     ISymbol symbol,
     int contextPosition = -1,
     int descriptionPosition = -1,
     string sortText = null,
     string insertionText = null,
     Glyph? glyph = null,
     string filterText = null,
     bool preselect = false,
     SupportedPlatformData supportedPlatforms = null,
     bool isArgumentName = false,
     ImmutableDictionary<string, string> properties = null,
     CompletionItemRules rules = null)
 {
     return Create(
         displayText: displayText,
         span: span,
         symbols: ImmutableArray.Create(symbol),
         contextPosition: contextPosition,
         descriptionPosition: descriptionPosition,
         sortText: sortText,
         insertionText: insertionText,
         glyph: glyph,
         filterText: filterText,
         preselect: preselect,
         supportedPlatforms: supportedPlatforms,
         isArgumentName: isArgumentName,
         properties: properties,
         rules: rules);
 }
开发者ID:RoryVL,项目名称:roslyn,代码行数:32,代码来源:SymbolCompletionItem.cs


示例11: ReadGlyph

        /// <summary>
        ///     Reads a glyph description from the specified offset.
        /// </summary>
        public Glyph ReadGlyph(int glyphIndex) {
            FontFileStream stream = reader.Stream;

            // Offset from beginning of font file
            uint fileOffset = glyfEntry.Offset + loca[glyphIndex];
            long length = GetGlyphLength(glyphIndex);

            Glyph glyph = new Glyph(reader.IndexMappings.Map(glyphIndex));
            if (length != 0) {
                byte[] glyphData = new byte[length];

                // Read glyph description into byte array
                stream.Position = fileOffset;
                stream.Read(glyphData, 0, glyphData.Length);

                glyph.SetGlyphData(glyphData);

                FontFileStream glyphStream = new FontFileStream(glyphData);

                // This fields dictates whether the glyph is a simple or composite glyph
                bool compositeGlyph = (glyphStream.ReadShort() < 0);

                // Skip font bounding box
                glyphStream.Skip(PrimitiveSizes.Short*4);

                if (compositeGlyph) {
                    ReadCompositeGlyph(glyphStream, glyph);
                }
            }

            return glyph;
        }
开发者ID:nholik,项目名称:Fo.Net,代码行数:35,代码来源:GlyphReader.cs


示例12: RenderGlyph

		public static Surface RenderGlyph (Fnt font, Glyph g, byte[] palette, int offset)
		{
			byte[] buf = new byte[g.Width * g.Height * 4];
			int i = 0;

			for (int y = g.Height - 1; y >= 0; y--) {
				for (int x = g.Width - 1; x >= 0; x--) {
					if (g.Bitmap[y,x] == 0)
						buf [i + 0] = 0;
					else if (g.Bitmap[y,x] == 1)
						buf [i + 0] = 255;
					else
						buf [i + 0] = 128;

					buf[i + 1] = palette[ (g.Bitmap[y,x] + offset) * 3 + 2];
					buf[i + 2] = palette[ (g.Bitmap[y,x] + offset) * 3 + 1];
					buf[i + 3] = palette[ (g.Bitmap[y,x] + offset) * 3 ];

					if (buf[i+1] == 252 && buf[i+2] == 0 && buf[i+3] == 252)
						buf[i + 0] = 0;

					i += 4;
				}
			}

			return CreateSurfaceFromRGBAData (buf, (ushort)g.Width, (ushort)g.Height, 32, g.Width * 4);
		}
开发者ID:carriercomm,项目名称:scsharp,代码行数:27,代码来源:GuiUtil.cs


示例13: CSharpCompletionItem

        public CSharpCompletionItem(
            Workspace workspace,
            CompletionListProvider completionProvider,
            string displayText,
            TextSpan filterSpan,
            Func<CancellationToken, Task<ImmutableArray<SymbolDisplayPart>>> descriptionFactory,
            Glyph? glyph,
            string sortText = null,
            string filterText = null,
            bool preselect = false,
            bool isBuilder = false,
            bool showsWarningIcon = false,
            bool shouldFormatOnCommit = false)
            : base(completionProvider,
                   displayText,
                   filterSpan,
                   descriptionFactory,
                   glyph,
                   sortText,
                   filterText,
                   preselect,
                   isBuilder,
                   showsWarningIcon,
                   shouldFormatOnCommit)
        {
            Contract.ThrowIfNull(workspace);

            this.Workspace = workspace;
        }
开发者ID:CarbonBasedDudeform,项目名称:roslyn,代码行数:29,代码来源:CSharpCompletionItem.cs


示例14: QuickInfoModel

 private QuickInfoModel(SemanticModel semanticModel, TextSpan span, Glyph glyph, SymbolMarkup markup, string documentation)
 {
     SemanticModel = semanticModel;
     Span = span;
     Glyph = glyph;
     Markup = markup;
     Documentation = documentation;
 }
开发者ID:tgjones,项目名称:HlslTools,代码行数:8,代码来源:QuickInfoModel.cs


示例15: EditorNavigationTarget

 public EditorNavigationTarget(string name, SnapshotSpan span, SnapshotSpan seek, Glyph icon, ImageSource glyph)
 {
     Name = name;
     Span = span;
     Seek = seek;
     Icon = icon;
     Glyph = glyph;
 }
开发者ID:tgjones,项目名称:HlslTools,代码行数:8,代码来源:EditorNavigationTarget.cs


示例16: ChangeSignatureResult

 public ChangeSignatureResult(bool succeeded, Solution updatedSolution = null, string name = null, Glyph? glyph = null, bool previewChanges = false)
 {
     this.Succeeded = succeeded;
     this.UpdatedSolution = updatedSolution;
     this.Name = name;
     this.Glyph = glyph;
     this.PreviewChanges = previewChanges;
 }
开发者ID:elemk0vv,项目名称:roslyn-1,代码行数:8,代码来源:ChangeSignatureResult.cs


示例17: Convert

        private void Convert()
        {
            DefineShape shape;
            glyph = new Glyph(GlyphType.Symbol); ;
            Segment seg;
            PointF point0;
            PointF basePoint = new PointF(0, 0);
            PointF curvePoint1, curvePoint2;

            foreach (BaseTag tag in swf.Tags)
            {
                if (tag is DefineShape)
                {
                    shape = (DefineShape)tag;
                    glyph.Rect = shape.Rect.RectangleF;

                    foreach (ShapeRecord record in shape.ShapeWithStyle.Shapes)
                    {
                        if (record is StyleChangeRecord)
                        {
                            basePoint = ((StyleChangeRecord)record).Point0;
                            seg = new Segment(SegmentType.StartPoint, new PointF[] { basePoint });
                            glyph.Segments.Add(seg);
                        }
                        else if (record is StraightEdgeRecord)
                        {
                            point0 = ((StraightEdgeRecord)record).Point0;
                            basePoint.X += point0.X;
                            basePoint.Y += point0.Y;
                            seg = new Segment(SegmentType.Line, new PointF[] { basePoint });
                            glyph.Segments.Add(seg);
                        }
                        else if (record is CurvedEdgeRecord)
                        {
                            point0 = ((CurvedEdgeRecord)record).Point0;
                            curvePoint1 = basePoint;
                            curvePoint1.X += point0.X;
                            curvePoint1.Y += point0.Y;

                            point0 = ((CurvedEdgeRecord)record).Point1;
                            curvePoint2 = curvePoint1;
                            curvePoint2.X += point0.X;
                            curvePoint2.Y += point0.Y;

                            basePoint = curvePoint2;

                            seg = new Segment(SegmentType.QuadraticBezier, new PointF[] { curvePoint1, curvePoint2 });
                            glyph.Segments.Add(seg);
                        }
                    }
                }

                if (tag is ShowFrameTag)
                {
                    break;
                }
            }
        }
开发者ID:foresightbrand,项目名称:brandqq,代码行数:58,代码来源:SwfConverter.cs


示例18: CreateItem

 protected CompletionItem CreateItem(
     Workspace workspace,
     string displayText,
     TextSpan textSpan,
     Func<CancellationToken, Task<ImmutableArray<SymbolDisplayPart>>> descriptionFactory,
     Glyph? glyph)
 {
     return new CompletionItem(this, displayText, textSpan, descriptionFactory, glyph, rules: ObjectInitializerCompletionItemRules.Instance);
 }
开发者ID:noahstein,项目名称:roslyn,代码行数:9,代码来源:AbstractObjectInitializerCompletionProvider.cs


示例19: CompletionItem

 public CompletionItem(string displayText, string insertionText, string description, Glyph? glyph, Symbol symbol, bool isBuilder)
 {
     DisplayText = displayText;
     InsertionText = insertionText;
     Description = description;
     Glyph = glyph;
     Symbol = symbol;
     IsBuilder = isBuilder;
 }
开发者ID:pminiszewski,项目名称:HlslTools,代码行数:9,代码来源:CompletionItem.cs


示例20: InformationQuickInfoContent

		public InformationQuickInfoContent(Glyph? symbolGlyph, Glyph? warningGlyph, ImmutableArray<TaggedText> mainDescription, ImmutableArray<TaggedText> documentation, ImmutableArray<TaggedText> typeParameterMap, ImmutableArray<TaggedText> anonymousTypes, ImmutableArray<TaggedText> usageText, ImmutableArray<TaggedText> exceptionText) {
			SymbolGlyph = symbolGlyph;
			WarningGlyph = warningGlyph;
			MainDescription = mainDescription.IsDefault ? ImmutableArray<TaggedText>.Empty : mainDescription;
			Documentation = documentation.IsDefault ? ImmutableArray<TaggedText>.Empty : documentation;
			TypeParameterMap = typeParameterMap.IsDefault ? ImmutableArray<TaggedText>.Empty : typeParameterMap;
			AnonymousTypes = anonymousTypes.IsDefault ? ImmutableArray<TaggedText>.Empty : anonymousTypes;
			UsageText = usageText.IsDefault ? ImmutableArray<TaggedText>.Empty : usageText;
			ExceptionText = exceptionText.IsDefault ? ImmutableArray<TaggedText>.Empty : exceptionText;
		}
开发者ID:manojdjoshi,项目名称:dnSpy,代码行数:10,代码来源:QuickInfoContent.cs



注:本文中的Glyph类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Gnome类代码示例发布时间:2022-05-24
下一篇:
C# GlobusHttpHelper类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap