/// <inheritdoc/> public Boolean Equals(TextIconInfo other) { return (Icon == other.Icon && Width == other.Width && Height == other.Height); }
/// <summary> /// Registers an icon with the command stream. /// </summary> /// <param name="name">The name that identifies the icon.</param> /// <param name="icon">The icon to register.</param> /// <returns>The index of the icon within the command stream's internal registry.</returns> public Int16 RegisterIcon(StringSegment name, TextIconInfo icon) { if (icons == null) { icons = new List <TextIconInfo>(); } if (iconsByName == null) { iconsByName = new Dictionary <StringSegment, Int16>(); } return(RegisterResource(name, icon, icons, iconsByName)); }
/// <summary> /// Registers an icon with the command stream. /// </summary> /// <param name="name">The name of the icon to register.</param> /// <param name="icon">The icon to register under the specified name.</param> /// <returns>The index of the specified icon within the command stream's internal registry.</returns> public Int16 RegisterIcon(StringSegment name, TextIconInfo icon) => (resources = resources ?? new TextLayoutCommandStreamResources()).RegisterIcon(name, icon);