using System; using HalconDotNet; using System.Collections; namespace Bro.UI.HalconDisplay.ViewROI { public enum HobjType { IMAGE, REGION, XLD, OTHER } /// /// This class is an auxiliary class, which is used to /// link a graphical context to an HALCON object. The graphical /// context is described by a hashtable, which contains a list of /// graphical modes (e.g GC_COLOR, GC_LINEWIDTH and GC_PAINT) /// and their corresponding values (e.g "blue", "4", "3D-plot"). These /// graphical states are applied to the window before displaying the /// object. /// public class HObjectEntry { /// Hashlist defining the graphical context for HObj public Hashtable gContext; /// HALCON object public HObject HObj; public HobjType Type; public string ColorCode; /// /// HALCON object that is linked to the graphical context gc. /// Hashlist of graphical states that are applied before the object is displayed. /// public HObjectEntry(HObject obj, Hashtable gc,HobjType type = HobjType.OTHER,string code = "#e53019") { gContext = gc; HObj = obj; Type = type; ColorCode = code; } /// /// Clears the entries of the class members Hobj and gContext /// public void clear() { gContext.Clear(); HObj.Dispose(); } }//end of class }//end of namespace