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); }
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)); }
MarkerElement TryCreateMarkerElement(WpfHexViewLine line, VST.Span span, HexMarkerTag tag) { Debug.Assert(tag.Type != null); return(TryCreateMarkerElementCore(wpfHexView.WpfHexViewLines.GetLineMarkerGeometry(line, span), line.BufferSpan, tag)); }
MarkerElement TryCreateMarkerElement(HexBufferSpan span, HexSpanSelectionFlags flags, HexMarkerTag tag) { Debug.Assert(tag.Type != null); return(TryCreateMarkerElementCore(wpfHexView.WpfHexViewLines.GetMarkerGeometry(span, flags), span, tag)); }