/// <summary> /// Initializes a new instance of the <see cref="TextLayoutIconCommand"/> structure. /// </summary> /// <param name="iconIndex">The index of the icon within the command stream's icon registry.</param> /// <param name="iconX">The x-coordinate of the icon's origin relative to its layout area.</param> /// <param name="iconY">The y-coordinate of the icon's origin relative to its layout area.</param> /// <param name="iconWidth">The icon's width in pixels.</param> /// <param name="iconHeight">The icon's height in pixels.</param> public TextLayoutIconCommand(Int16 iconIndex, Int32 iconX, Int32 iconY, Int16 iconWidth, Int16 iconHeight) { this.commandType = TextLayoutCommandType.Icon; this.iconIndex = iconIndex; this.iconX = iconX; this.iconY = iconY; this.iconWidth = iconWidth; this.iconHeight = iconHeight; }
/// <summary> /// Initializes a new instance of the <see cref="TextLayoutTextCommand"/> structure. /// </summary> /// <param name="textOffset">The offset from the beginning of the source string to the beginning of the /// substring which will be rendered by this command.</param> /// <param name="textLength">The number of characters that will be rendered by this command.</param> /// <param name="textX">The x-coordinate of the top-left corner of the text relative to its layout area.</param> /// <param name="textY">The y-coordinate of the top-left corner of the text relative to its layout area.</param> /// <param name="textWidth">The width of the text in pixels.</param> /// <param name="textHeight">The height of the text in pixels.</param> public TextLayoutTextCommand(Int32 textOffset, Int32 textLength, Int32 textX, Int32 textY, Int16 textWidth, Int16 textHeight) { this.commandType = TextLayoutCommandType.Text; this.textOffset = textOffset; this.textLength = textLength; this.textX = textX; this.textY = textY; this.textWidth = textWidth; this.textHeight = textHeight; }
/// <summary> /// Initializes a new instance of the <see cref="TextLayoutGlyphShaderCommand"/> structure. /// </summary> /// <param name="glyphShaderIndex">The index of the glyph shader within the command stream's glyph shader registry.</param> public TextLayoutGlyphShaderCommand(Int16 glyphShaderIndex) { this.commandType = TextLayoutCommandType.PushGlyphShader; this.glyphShaderIndex = glyphShaderIndex; }
/// <summary> /// Initializes a new instance of the <see cref="TextLayoutLinkCommand"/> structure. /// </summary> /// <param name="linkTargetIndex">The index of the link target within the command stream's link target registry.</param> public TextLayoutLinkCommand(Int16 linkTargetIndex) { this.commandType = TextLayoutCommandType.PushLink; this.linkTargetIndex = linkTargetIndex; }
/// <summary> /// Initializes a new instance of the <see cref="TextLayoutCustomCommand"/> structure. /// </summary> /// <param name="id">The custom command's identifier.</param> /// <param name="value">The custom command's associated value.</param> public TextLayoutCustomCommand(Byte id, Int32 value) { this.commandType = TextLayoutCommandType.Custom; this.id = id; this.value = value; }