1
最初の画像は私が持っているものです - Rectangle
の文字列を "強調表示"するためのリストです。 2番目の画像(右)は、私が見たいもののモックアップです。長方形の間で共有される線分を削除する
共有回線セグメントを削除するにはどうすればよいでしょうか?
最初の画像は私が持っているものです - Rectangle
の文字列を "強調表示"するためのリストです。 2番目の画像(右)は、私が見たいもののモックアップです。長方形の間で共有される線分を削除する
共有回線セグメントを削除するにはどうすればよいでしょうか?
[OK]を私は、私はまともな解決策を考え出したと思います。
// create a pen with a width of 2px (half of it will be blanked out so it will
// essentially be a width of 1px)
Pen pen = new Pen(Color.Blue, 2f);
// build a GraphicsPath with the rectangles
GraphicsPath gp = new GraphicsPath();
gp.AddRectangle(...);
gp.AddRectangle(...);
gp.AddRectangle(...);
// g is our Graphics object
// exclude the region so the path doesn't draw over it
Region reg = new Region(gp);
g.ExcludeClip(reg);
// now draw path, it won't show up inside the excluded clipping region
g.DrawPath(pen, gp);
// clean up
g.ResetClip();
pen.Dispose();
gp.Dispose();
reg.Dispose();