Geometry GetMarkerGeometry(WpfHexViewLine line, VST.Span span, bool clipToViewport, Thickness padding, bool isLineGeometry) { if (line == null) { throw new ArgumentNullException(nameof(line)); } if (!lines.Contains(line)) { throw new ArgumentException(); } bool createOutlinedPath = false; PathGeometry geo = null; var textBounds = line.GetNormalizedTextBounds(span); HexMarkerHelper.AddGeometries(hexView, textBounds, isLineGeometry, clipToViewport, padding, 0, ref geo, ref createOutlinedPath); if (createOutlinedPath) { geo = geo.GetOutlinedPathGeometry(); } if (geo != null && geo.CanFreeze) { geo.Freeze(); } return(geo); }
public override Geometry GetMarkerGeometry(HexBufferSpan bufferSpan, HexSpanSelectionFlags flags, bool clipToViewport, Thickness padding) { if (bufferSpan.Buffer != hexView.Buffer) { throw new ArgumentException(); } if (HexMarkerHelper.IsMultiLineSpan(hexView, bufferSpan)) { return(GetLineMarkerGeometry(bufferSpan, flags, clipToViewport, padding)); } return(GetTextMarkerGeometry(bufferSpan, flags, clipToViewport, padding)); }
public override Geometry?GetMarkerGeometry(HexBufferSpan bufferSpan, HexSpanSelectionFlags flags) { if (bufferSpan.Buffer != hexView.Buffer) { throw new ArgumentException(); } if (HexMarkerHelper.IsMultiLineSpan(hexView, bufferSpan)) { return(GetLineMarkerGeometry(bufferSpan, flags)); } return(GetTextMarkerGeometry(bufferSpan, flags)); }
Geometry GetMarkerGeometry(HexBufferSpan bufferSpan, HexSpanSelectionFlags flags, bool clipToViewport, Thickness padding, bool isLineGeometry) { if (bufferSpan.Buffer != hexView.Buffer) { throw new ArgumentException(); } bool createOutlinedPath = false; PathGeometry geo = null; var textBounds = GetNormalizedTextBounds(bufferSpan, flags); HexMarkerHelper.AddGeometries(hexView, textBounds, isLineGeometry, clipToViewport, padding, 0, ref geo, ref createOutlinedPath); if (createOutlinedPath) { geo = geo.GetOutlinedPathGeometry(); } if (geo != null && geo.CanFreeze) { geo.Freeze(); } return(geo); }