コード例 #1
0
 /// <summary>
 /// Writes a <see cref="TextLayoutCommandType.Custom"/> command to the current position in the stream.
 /// </summary>
 /// <param name="command">The command to write to the stream.</param>
 public void WriteCustomCommand(TextLayoutCustomCommand command)
 {
     stream.Reserve(sizeof(TextLayoutCustomCommand));
     *(TextLayoutCustomCommand *)stream.Data = command;
     *(TextLayoutCommandType *)stream.Data   = TextLayoutCommandType.Custom;
     stream.FinalizeObject(sizeof(TextLayoutCustomCommand));
 }
コード例 #2
0
        /// <summary>
        /// Handles a |delay| command.
        /// </summary>
        private Boolean HandleDelayCommand(TextLayoutCustomCommand cmd)
        {
            delay = (cmd.Value == 0) ? DefaultDelay : cmd.Value;
            charsVisible = (Int32)charsVisible;

            return false;
        }
コード例 #3
0
        /// <summary>
        /// Handles a |speed| command.
        /// </summary>
        private Boolean HandleSpeedCommand(TextLayoutCustomCommand cmd)
        {
            charsPerSecond = (cmd.Value == 0) ? DefaultSpeed : cmd.Value;
            charsVisible = (Int32)charsVisible;

            return false;
        }
コード例 #4
0
 /// <summary>
 /// Writes a <see cref="TextLayoutCommandType.Custom"/> command to the current position in the stream.
 /// </summary>
 /// <param name="command">The command to write to the stream.</param>
 public void WriteCustomCommand(TextLayoutCustomCommand command)
 {
     stream.Reserve(sizeof(TextLayoutCustomCommand));
     *(TextLayoutCustomCommand*)stream.Data = command;
     *(TextLayoutCommandType*)stream.Data = TextLayoutCommandType.Custom;
     stream.FinalizeObject(sizeof(TextLayoutCustomCommand));
 }