Esempio n. 1
0
        MarkerElement TryCreateMarkerElementCore(Geometry geo, HexBufferSpan span, HexMarkerTag tag)
        {
            if (geo == null)
            {
                return(null);
            }

            var type          = tag.Type ?? string.Empty;
            var props         = editorFormatMap.GetProperties(type);
            int zIndex        = props[VSTC.MarkerFormatDefinition.ZOrderId] as int? ?? 0;
            var markerElement = new MarkerElement(span, type, zIndex, geo);

            markerElement.BackgroundBrush = GetBackgroundBrush(props);
            markerElement.Pen             = GetPen(props);
            return(markerElement);
        }
Esempio n. 2
0
        MarkerElement TryCreateMarkerElement(HexBufferSpan span, HexSpanSelectionFlags flags, HexMarkerTag tag)
        {
            Debug.Assert(tag.Type != null);
            var overlap = wpfHexView.WpfHexViewLines.FormattedSpan.Overlap(span);

            if (overlap == null)
            {
                return(null);
            }
            return(TryCreateMarkerElementCore(wpfHexView.WpfHexViewLines.GetMarkerGeometry(overlap.Value, flags), overlap.Value, tag));
        }
Esempio n. 3
0
 MarkerElement TryCreateMarkerElement(WpfHexViewLine line, VST.Span span, HexMarkerTag tag)
 {
     Debug.Assert(tag.Type != null);
     return(TryCreateMarkerElementCore(wpfHexView.WpfHexViewLines.GetLineMarkerGeometry(line, span), line.BufferSpan, tag));
 }
Esempio n. 4
0
 MarkerElement TryCreateMarkerElement(HexBufferSpan span, HexSpanSelectionFlags flags, HexMarkerTag tag)
 {
     Debug.Assert(tag.Type != null);
     return(TryCreateMarkerElementCore(wpfHexView.WpfHexViewLines.GetMarkerGeometry(span, flags), span, tag));
 }