WIL説明書(.NET)  3.1.0
オーバレイ削除と図形の消去

オーバレイ自体を削除する方法とオーバレイ上の図形の消去方法について示します。

1. オーバレイの削除

オーバレイを削除するには Overlays の Remove を使用します。 オーバレイへのハンドルを保管している場合は null で初期化する事を忘れないよう注意してください。
private void overlayDelToolStripMenuItem_Click(object sender, EventArgs e)
{
// オーバレイ(m_overlay1)が生成済みの場合は削除します.
if (true == cFviImageView1.Display.FindOverlay(m_overlay1))
{
cFviImageView1.Display.Overlays.Remove(m_overlay1);
m_overlay1 = null;
}
// オーバレイ(m_overlay2)が生成済みの場合は削除します.
if (true == cFviImageView1.Display.FindOverlay(m_overlay2))
{
cFviImageView1.Display.Overlays.Remove(m_overlay2);
m_overlay2 = null;
}
cFviImageView1.Refresh();
}

2. オーバレイ上の図形の消去

オーバレイ上の図形を消去するには Figures の Clear を使用します。
private void overlayClrToolStripMenuItem_Click(object sender, EventArgs e)
{
// オーバレイ(m_overlay1)が生成済みの場合は図形を消去します.
if (true == cFviImageView1.Display.FindOverlay(m_overlay1))
m_overlay1.Figures.Clear();
// オーバレイ(m_overlay2)が生成済みの場合は図形を消去します.
if (true == cFviImageView1.Display.FindOverlay(m_overlay2))
m_overlay2.Figures.Clear();
cFviImageView1.Refresh();
}


Documentation copyright © 2008 FAST Corporation. [B-001864]
Generated on 2024年10月10日(木) 10時07分53秒 for WIL説明書(.NET) by doxygen 1.8.11