Skip to content

Commit 52a337f

Browse files
Start removing numerical parameters part
1 parent 443c2f5 commit 52a337f

File tree

1 file changed

+24
-38
lines changed

1 file changed

+24
-38
lines changed

spec/vt-good-image-protocol.tex

Lines changed: 24 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -417,19 +417,7 @@ \subsection{DCS Message Format}
417417

418418
\subsection{Upload Image}
419419

420-
Syntax: \code{DCS <numerical parameters> u <named parameters> ST}
421-
422-
\subsubsection*{Numerical Parameters}
423-
424-
\begin{tabular}{ |c|c|l| }
425-
\hline
426-
\textbf{parameter} & \textbf{Key} & \textbf{Value} \\
427-
\hline
428-
fmt & 1 & enum (see section \ref{sec:supported-image-formtats}) \\
429-
width & 2 & Uint32 \\
430-
height & 3 & Uint32 \\
431-
\hline
432-
\end{tabular}
420+
Syntax: \code{DCS u <named parameters> ST}
433421

434422
The payload's format is mandated by the \code{fmt}'s value. However, since it must not contain
435423
any C0 or C1 escape codes, the transport is further protected by encoding it via Base64.
@@ -438,9 +426,12 @@ \subsubsection*{Named Parameters}
438426

439427
\begin{tabular}{ |c|c|l| }
440428
\hline
441-
\textbf{parameter} & \textbf{Value} \\
429+
\textbf{parameter} & description \\
442430
\hline
443-
id & image Id as string \\
431+
fmt & enum (see section \ref{sec:supported-image-formtats}) \\
432+
width & number of image width of the uploaded image (not needed for PNG) \\
433+
height & number of image height of the uploaded image (not needed for PNG) \\
434+
n & unique name of the image \\
444435
p & Base64 encoded image data \\
445436
\hline
446437
\end{tabular}
@@ -455,41 +446,36 @@ \subsubsection*{Example}
455446
local ImageId=$(echo -ne "org.binutils.ls.$1" | base64 -)
456447
local ImageData=$(base64 "$2")
457448
local ImageFormat=3 # 3=PNG
458-
echo -ne "\033P1:${ImageFormat}uid=${ImageId};p=${ImageData}\033\\"
449+
echo -ne "\033Puf=${ImageFormat},n=${ImageId};!${ImageData}\033\\"
459450
}
460451
\end{verbatim}
461452

462453
\subsection{Render Image}
463454

464-
Syntax: \code{DCS <numerical parameters> r <named parameters> ST}
465-
466-
\subsubsection*{Numerical parameters}
467-
468-
\begin{tabular}{ |c|c|l| }
469-
\hline
470-
\textbf{parameter} & \textbf{Key} & \textbf{Value} \\
471-
\hline
472-
grid-width & 1 & UInt32 \\
473-
grid-height & 2 & UInt32 \\
474-
x & 3 & UInt32 \\
475-
y & 4 & UInt32 \\
476-
width & 5 & UInt32 \\
477-
height & 6 & UInt32 \\
478-
resize & 7 & 1 (NoResize), 2 (ResizeToFit), 3 (ResizeToFill), 4 (StretchToFill) \\
479-
alignment & 8 & 1 (MiddleCenter), 2 (MiddleStart), 3 (MiddleEnd), \\
480-
& & 4 (TopStart), 5 (TopCenter), 6 (TopEnd), \\
481-
& & 7 (BottomStart), 8 (BottomCenter), 9 (BottomEnd) \\
482-
reqStatus & 9 & 0 (Success), 1 (Image not available) \\
483-
\hline
484-
\end{tabular}
455+
Syntax: \code{DCS r <named parameters> ST}
485456

486457
\subsubsection*{Named parameters}
487458

488459
\begin{tabular}{ |c|c|l| }
489460
\hline
490461
\textbf{parameter} & \textbf{Value} \\
491462
\hline
492-
id & image Id as string \\
463+
name & image Id as string \\
464+
c & number of columns this image will be printed on \\
465+
r & number of rows the image will be printed on \\
466+
x & x-offset into the referenced image in screen coordinates \\
467+
y & y-offset into the referenced image in screen coordinates \\
468+
w & width of the referenced image in screen coordinates \\
469+
h & height of the referenced image in screen coordinates \\
470+
z & resize policy (default: 2), one of: \\ % TODO: defaults should have the lowest value (=> 1)
471+
& 1 (NoResize), 2 (ResizeToFit), 3 (ResizeToFill), 4 (StretchToFill) \\
472+
a & alignment policy (default: 1), one of: \\
473+
& 1 (MiddleCenter), 2 (MiddleStart), 3 (MiddleEnd), \\
474+
& 4 (TopStart), 5 (TopCenter), 6 (TopEnd), \\
475+
& 7 (BottomStart), 8 (BottomCenter), 9 (BottomEnd) \\
476+
s & optionally request a status whether the image was been rendered \\
477+
& default is no response will be sent, values are one of: \\
478+
& 0 (Success), 1 (Image not available) \\
493479
\hline
494480
\end{tabular}
495481

0 commit comments

Comments
 (0)