Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        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);
        }