/// <summary>Paints the ROI into the supplied window</summary> /// <param name="window">HALCON window</param> public override void draw(hvppleDotNet.HWindow window, int imageWidth, int imageHeight) { double littleRecSize = getHandleWidth(imageWidth, imageHeight); window.DispRectangle2(midR, midC, -phi, length1, length2); window.DispArrow(midR, midC, midR + (Math.Sin(phi) * length1 * 1.2), midC + (Math.Cos(phi) * length1 * 1.2), littleRecSize); window.SetDraw("fill"); for (int i = 0; i < NumHandles; i++) { window.DispRectangle2(rows[i].D, cols[i].D, -phi, littleRecSize, littleRecSize); Application.DoEvents(); } window.SetDraw("margin"); }
/// <summary> /// Paints the active handle of the ROI object into the supplied window /// </summary> /// <param name="window">HALCON window</param> public override void displayActive(hvppleDotNet.HWindow window, int imageWidth, int imageHeight) { double littleRecSize = getHandleWidth(imageWidth, imageHeight); window.SetDraw("fill"); window.DispRectangle2(rows[activeHandleIdx].D, cols[activeHandleIdx].D, -phi, littleRecSize, littleRecSize); if (activeHandleIdx == 5) { window.DispArrow(midR, midC, midR + (Math.Sin(phi) * length1 * 1.2), midC + (Math.Cos(phi) * length1 * 1.2), littleRecSize); } window.SetDraw("margin"); }