ArchitectureColoredPainting.../1st_encode/byte.html

897 lines
36 KiB
HTML
Raw Permalink Normal View History

2022-07-29 10:43:47 +08:00
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>&#x6574;&#x4f53;&#x7ed3;&#x6784;&#x603b;&#x89c8;</title>
<style>
/* From extension vscode.github */
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
.vscode-dark img[src$=\#gh-light-mode-only],
.vscode-light img[src$=\#gh-dark-mode-only] {
display: none;
}
/* From extension vscode.markdown-math */
@font-face{font-family:KaTeX_AMS;font-style:normal;font-weight:400;src:url(fonts/KaTeX_AMS-Regular.woff2) format("woff2"),url(fonts/KaTeX_AMS-Regular.woff) format("woff"),url(fonts/KaTeX_AMS-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Caligraphic;font-style:normal;font-weight:700;src:url(fonts/KaTeX_Caligraphic-Bold.woff2) format("woff2"),url(fonts/KaTeX_Caligraphic-Bold.woff) format("woff"),url(fonts/KaTeX_Caligraphic-Bold.ttf) format("truetype")}@font-face{font-family:KaTeX_Caligraphic;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Caligraphic-Regular.woff2) format("woff2"),url(fonts/KaTeX_Caligraphic-Regular.woff) format("woff"),url(fonts/KaTeX_Caligraphic-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Fraktur;font-style:normal;font-weight:700;src:url(fonts/KaTeX_Fraktur-Bold.woff2) format("woff2"),url(fonts/KaTeX_Fraktur-Bold.woff) format("woff"),url(fonts/KaTeX_Fraktur-Bold.ttf) format("truetype")}@font-face{font-family:KaTeX_Fraktur;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Fraktur-Regular.woff2) format("woff2"),url(fonts/KaTeX_Fraktur-Regular.woff) format("woff"),url(fonts/KaTeX_Fraktur-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:normal;font-weight:700;src:url(fonts/KaTeX_Main-Bold.woff2) format("woff2"),url(fonts/KaTeX_Main-Bold.woff) format("woff"),url(fonts/KaTeX_Main-Bold.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:italic;font-weight:700;src:url(fonts/KaTeX_Main-BoldItalic.woff2) format("woff2"),url(fonts/KaTeX_Main-BoldItalic.woff) format("woff"),url(fonts/KaTeX_Main-BoldItalic.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:italic;font-weight:400;src:url(fonts/KaTeX_Main-Italic.woff2) format("woff2"),url(fonts/KaTeX_Main-Italic.woff) format("woff"),url(fonts/KaTeX_Main-Italic.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Main-Regular.woff2) format("woff2"),url(fonts/KaTeX_Main-Regular.woff) format("woff"),url(fonts/KaTeX_Main-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Math;font-style:italic;font-weight:700;src:url(fonts/KaTeX_Math-BoldItalic.woff2) format("woff2"),url(fonts/KaTeX_Math-BoldItalic.woff) format("woff"),url(fonts/KaTeX_Math-BoldItalic.ttf) format("truetype")}@font-face{font-family:KaTeX_Math;font-style:italic;font-weight:400;src:url(fonts/KaTeX_Math-Italic.woff2) format("woff2"),url(fonts/KaTeX_Math-Italic.woff) format("woff"),url(fonts/KaTeX_Math-Italic.ttf) format("truetype")}@font-face{font-family:"KaTeX_SansSerif";font-style:normal;font-weight:700;src:url(fonts/KaTeX_SansSerif-Bold.woff2) format("woff2"),url(fonts/KaTeX_SansSerif-Bold.woff) format("woff"),url(fonts/KaTeX_SansSerif-Bold.ttf) format("truetype")}@font-face{font-family:"KaTeX_SansSerif";font-style:italic;font-weight:400;src:url(fonts/KaTeX_SansSerif-Italic.woff2) format("woff2"),url(fonts/KaTeX_SansSerif-Italic.woff) format("woff"),url(fonts/KaTeX_SansSerif-Italic.ttf) format("truetype")}@font-face{font-family:"KaTeX_SansSerif";font-style:normal;font-weight:400;src:url(fonts/KaTeX_SansSerif-Regular.woff2) format("woff2"),url(fonts/KaTeX_SansSerif-Regular.woff) format("woff"),url(fonts/KaTeX_SansSerif-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Script;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Script-Regular.woff2) format("woff2"),url(fonts/KaTeX_Script-Regular.woff) format("woff"),url(fonts/KaTeX_Script-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Size1;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Size1-Regular.woff2) format("woff2"),url(fonts/KaTeX_Size1-Regular.woff) format("woff"),url(fonts/KaTeX_Size1-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Size2;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Size2-Regular.woff2) format("woff2"),url(fonts/KaTeX_Size2-Regular.woff) format("woff"),url(fonts/KaTeX_Size2-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Size3;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Size3-Regular.wo
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
.katex-error {
color: var(--vscode-editorError-foreground);
}
/* From extension ms-toolsai.jupyter */
/* These classnames are inherited from bootstrap, but are present in most notebook renderers */
.alert {
width: auto;
padding: 1em;
margin-top: 1em;
margin-bottom: 1em;
}
.alert > *:last-child {
margin-bottom: 0;
}
#preview > .alert:last-child {
/* Prevent this being set to zero by the default notebook stylesheet */
padding-bottom: 1em;
}
.alert-success {
/* Note there is no suitable color available, so we just copy "info" */
background-color: var(--theme-info-background);
color: var(--theme-info-foreground);
}
.alert-info {
background-color: var(--theme-info-background);
color: var(--theme-info-foreground);
}
.alert-warning {
background-color: var(--theme-warning-background);
color: var(--theme-warning-foreground);
}
.alert-danger {
background-color: var(--theme-error-background);
color: var(--theme-error-foreground);
}
</style>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/Microsoft/vscode/extensions/markdown-language-features/media/markdown.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/Microsoft/vscode/extensions/markdown-language-features/media/highlight.css">
<style>
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe WPC', 'Segoe UI', system-ui, 'Ubuntu', 'Droid Sans', sans-serif;
font-size: 14px;
line-height: 1.6;
}
</style>
<style>
.task-list-item { list-style-type: none; } .task-list-item-checkbox { margin-left: -20px; vertical-align: middle; }
</style>
</head>
<body class="vscode-body vscode-light">
<h1 id="整体结构总览">整体结构总览</h1>
<blockquote>
<p>所有x、y坐标都为有符号整数实际处理时需要除以1000变回小数</p>
</blockquote>
<table>
<thead>
<tr>
<th>说明</th>
<th>位数</th>
<th>备注</th>
</tr>
</thead>
<tbody>
<tr>
<td>图像宽度 width</td>
<td>16</td>
<td>实际位数+11记为W</td>
</tr>
<tr>
<td>图像高度 height</td>
<td>16</td>
<td>实际位数+11记为H</td>
</tr>
<tr>
<td>elements列表长度</td>
<td>16</td>
<td>标记了该图像上的所有元素原型</td>
</tr>
<tr>
<td>&gt; 元素种类 type</td>
<td>4</td>
<td></td>
</tr>
<tr>
<td>&gt; 元素信息 data</td>
<td></td>
<td>详见<a href="#elements">elements</a></td>
</tr>
<tr>
<td>map列表长度</td>
<td>16</td>
<td>标记了该图像上所有元素原型在图像中的信息</td>
</tr>
<tr>
<td>&gt; 元素id element</td>
<td>16</td>
<td></td>
</tr>
<tr>
<td>&gt; 坐标 position</td>
<td>0</td>
<td></td>
</tr>
<tr>
<td>&gt;&gt; x坐标</td>
<td>W</td>
<td></td>
</tr>
<tr>
<td>&gt;&gt; y坐标</td>
<td>H</td>
<td></td>
</tr>
<tr>
<td>&gt; 所处层数 level</td>
<td>16</td>
<td>从0x00FF开始递增置入底层操作直接移到当前最下</td>
</tr>
<tr>
<td>&gt; 附加信息 attached 列表长度</td>
<td>8</td>
<td>详见<a href="#map-attached">map-attached</a></td>
</tr>
<tr>
<td>iterate列表长度</td>
<td>16</td>
<td>标记该图像中应用迭代函数系统的信息</td>
</tr>
<tr>
<td>&gt; 是否为元素组 element-group</td>
<td>1</td>
<td>若为1则在elements中寻找组的原始map信息</td>
</tr>
<tr>
<td>&gt; 原始元素mapId target</td>
<td>16</td>
<td></td>
</tr>
<tr>
<td>&gt; 迭代次数 times</td>
<td>32</td>
<td></td>
</tr>
<tr>
<td>&gt; 迭代操作 operations 列表长度</td>
<td>8</td>
<td>详见<a href="#iterate-operations">iterate-operations</a></td>
</tr>
</tbody>
</table>
<h1 id="elements">elements</h1>
<h2 id="type">type</h2>
<table>
<thead>
<tr>
<th>id</th>
<th>说明</th>
<th>备注</th>
</tr>
</thead>
<tbody>
<tr>
<td>0</td>
<td>路径 path</td>
<td>起点为(0,0)</td>
</tr>
<tr>
<td>1</td>
<td>多边形 polygon</td>
<td>起点为(0,0)</td>
</tr>
<tr>
<td>2</td>
<td>圆形 round</td>
<td>圆心为(0,0)</td>
</tr>
<tr>
<td>3</td>
<td>元素组 group</td>
<td></td>
</tr>
</tbody>
</table>
<h2 id="data">data</h2>
<h3 id="path">path</h3>
<table>
<thead>
<tr>
<th>说明</th>
<th>位数</th>
<th>备注</th>
</tr>
</thead>
<tbody>
<tr>
<td>路径操作 operations 列表长度</td>
<td>16</td>
<td></td>
</tr>
<tr>
<td>&gt; 操作种类 type</td>
<td>4</td>
<td></td>
</tr>
<tr>
<td>&gt; 操作信息 data</td>
<td></td>
<td>详见<a href="#path-operations">path-operations</a></td>
</tr>
</tbody>
</table>
<blockquote>
<h4 id="path-operations">path-operations</h4>
<h5 id="type-1">type</h5>
<table>
<thead>
<tr>
<th>id</th>
<th>说明</th>
<th>备注</th>
</tr>
</thead>
<tbody>
<tr>
<td>0</td>
<td>直线 line</td>
<td></td>
</tr>
<tr>
<td>1</td>
<td>三次贝塞尔曲线 curve</td>
<td>非列表头时,默认使用平滑曲线</td>
</tr>
<tr>
<td>2</td>
<td>平滑三次贝塞尔曲线 curve-smooth</td>
<td></td>
</tr>
<tr>
<td>3</td>
<td>二次贝塞尔曲线 quadratic</td>
<td>非列表头时,默认使用平滑曲线</td>
</tr>
<tr>
<td>4</td>
<td>平滑二次贝塞尔曲线 quadratic-smooth</td>
<td></td>
</tr>
<tr>
<td>5</td>
<td>圆弧 arc</td>
<td></td>
</tr>
<tr>
<td>6</td>
<td>封闭图形 zeal</td>
<td>用直线连接当前点与起点,封闭该图形,必须为列表尾</td>
</tr>
</tbody>
</table>
<h5 id="line">line</h5>
<table>
<thead>
<tr>
<th>说明</th>
<th>位数</th>
<th>备注</th>
</tr>
</thead>
<tbody>
<tr>
<td>目标坐标 target</td>
<td>0</td>
<td></td>
</tr>
<tr>
<td>&gt; x坐标</td>
<td>W</td>
<td></td>
</tr>
<tr>
<td>&gt; y坐标</td>
<td>H</td>
<td></td>
</tr>
</tbody>
</table>
<h5 id="curve">curve</h5>
<table>
<thead>
<tr>
<th>说明</th>
<th>位数</th>
<th>备注</th>
</tr>
</thead>
<tbody>
<tr>
<td>目标坐标 target</td>
<td>0</td>
<td></td>
</tr>
<tr>
<td>&gt; x坐标</td>
<td>W</td>
<td></td>
</tr>
<tr>
<td>&gt; y坐标</td>
<td>H</td>
<td></td>
</tr>
<tr>
<td>控制点 control</td>
<td>0</td>
<td></td>
</tr>
<tr>
<td>&gt; 起点控制点 start</td>
<td>0</td>
<td></td>
</tr>
<tr>
<td>&gt;&gt; x坐标</td>
<td>W</td>
<td></td>
</tr>
<tr>
<td>&gt;&gt; y坐标</td>
<td>H</td>
<td></td>
</tr>
<tr>
<td>&gt; 终点控制点 end</td>
<td>0</td>
<td></td>
</tr>
<tr>
<td>&gt;&gt; x坐标</td>
<td>W</td>
<td></td>
</tr>
<tr>
<td>&gt;&gt; y坐标</td>
<td>H</td>
<td></td>
</tr>
</tbody>
</table>
<h5 id="curve-smooth">curve-smooth</h5>
<table>
<thead>
<tr>
<th>说明</th>
<th>位数</th>
<th>备注</th>
</tr>
</thead>
<tbody>
<tr>
<td>目标坐标 target</td>
<td>0</td>
<td></td>
</tr>
<tr>
<td>&gt; x坐标</td>
<td>W</td>
<td></td>
</tr>
<tr>
<td>&gt; y坐标</td>
<td>H</td>
<td></td>
</tr>
<tr>
<td>控制点 control</td>
<td>0</td>
<td></td>
</tr>
<tr>
<td>&gt; x坐标</td>
<td>W</td>
<td></td>
</tr>
<tr>
<td>&gt; y坐标</td>
<td>H</td>
<td></td>
</tr>
</tbody>
</table>
<h5 id="quadratic">quadratic</h5>
<table>
<thead>
<tr>
<th>说明</th>
<th>位数</th>
<th>备注</th>
</tr>
</thead>
<tbody>
<tr>
<td>目标坐标 target</td>
<td>0</td>
<td></td>
</tr>
<tr>
<td>&gt; x坐标</td>
<td>W</td>
<td></td>
</tr>
<tr>
<td>&gt; y坐标</td>
<td>H</td>
<td></td>
</tr>
<tr>
<td>控制点 control</td>
<td>0</td>
<td></td>
</tr>
<tr>
<td>&gt; x坐标</td>
<td>W</td>
<td></td>
</tr>
<tr>
<td>&gt; y坐标</td>
<td>H</td>
<td></td>
</tr>
</tbody>
</table>
<h5 id="quadratic-smooth">quadratic-smooth</h5>
<table>
<thead>
<tr>
<th>说明</th>
<th>位数</th>
<th>备注</th>
</tr>
</thead>
<tbody>
<tr>
<td>目标坐标 target</td>
<td>0</td>
<td></td>
</tr>
<tr>
<td>&gt; x坐标</td>
<td>W</td>
<td></td>
</tr>
<tr>
<td>&gt; y坐标</td>
<td>H</td>
<td></td>
</tr>
</tbody>
</table>
<h5 id="arc">arc</h5>
<blockquote>
<p>circle = true</p>
</blockquote>
<table>
<thead>
<tr>
<th>说明</th>
<th>位数</th>
<th>备注</th>
</tr>
</thead>
<tbody>
<tr>
<td>是否为正圆 circle</td>
<td>1</td>
<td>否则为椭圆</td>
</tr>
<tr>
<td>圆心坐标 center</td>
<td>0</td>
<td></td>
</tr>
<tr>
<td>&gt; x坐标</td>
<td>W</td>
<td></td>
</tr>
<tr>
<td>&gt; y坐标</td>
<td>H</td>
<td></td>
</tr>
<tr>
<td>半径 radius</td>
<td>max(W,H)</td>
<td>用无符号整数存小数结果除100</td>
</tr>
<tr>
<td>取线角度 angle</td>
<td>17</td>
<td>用17位有符号整数存小数结果除100</td>
</tr>
</tbody>
</table>
<blockquote>
<p>circle = false</p>
</blockquote>
<table>
<thead>
<tr>
<th>说明</th>
<th>位数</th>
<th>备注</th>
</tr>
</thead>
<tbody>
<tr>
<td>是否为正圆 circle</td>
<td>1</td>
<td>否则为椭圆</td>
</tr>
<tr>
<td>圆心坐标 center</td>
<td>0</td>
<td></td>
</tr>
<tr>
<td>&gt; x坐标</td>
<td>W</td>
<td></td>
</tr>
<tr>
<td>&gt; y坐标</td>
<td>H</td>
<td></td>
</tr>
<tr>
<td>轴长 axis-length</td>
<td>0</td>
<td>用无符号整数存小数结果除100</td>
</tr>
<tr>
<td>&gt; x轴</td>
<td>max(W,H)</td>
<td></td>
</tr>
<tr>
<td>&gt; y轴</td>
<td>max(W,H)</td>
<td></td>
</tr>
<tr>
<td>取线角度 angle</td>
<td>17</td>
<td>用17位有符号整数存小数结果除100</td>
</tr>
</tbody>
</table>
</blockquote>
<h3 id="polygon">polygon</h3>
<table>
<thead>
<tr>
<th>说明</th>
<th>位数</th>
<th>备注</th>
</tr>
</thead>
<tbody>
<tr>
<td>点坐标 points 列表长度</td>
<td>16</td>
<td>逆时针排列</td>
</tr>
<tr>
<td>&gt; x坐标</td>
<td>W</td>
<td></td>
</tr>
<tr>
<td>&gt; y坐标</td>
<td>H</td>
<td></td>
</tr>
</tbody>
</table>
<h3 id="round">round</h3>
<blockquote>
<p>circle = true</p>
</blockquote>
<table>
<thead>
<tr>
<th>说明</th>
<th>位数</th>
<th>备注</th>
</tr>
</thead>
<tbody>
<tr>
<td>是否为正圆 circle</td>
<td>1</td>
<td>否则为椭圆</td>
</tr>
<tr>
<td>半径 radius</td>
<td>max(W,H)</td>
<td>用无符号整数存小数结果除100</td>
</tr>
<tr>
<td>取线角度 angle</td>
<td>17</td>
<td>用17位有符号整数存小数结果除100</td>
</tr>
</tbody>
</table>
<blockquote>
<p>circle = false</p>
</blockquote>
<table>
<thead>
<tr>
<th>说明</th>
<th>位数</th>
<th>备注</th>
</tr>
</thead>
<tbody>
<tr>
<td>是否为正圆 circle</td>
<td>1</td>
<td>否则为椭圆</td>
</tr>
<tr>
<td>轴长 axis-length</td>
<td>0</td>
<td>用无符号整数存小数结果除100</td>
</tr>
<tr>
<td>&gt; x轴</td>
<td>max(W,H)</td>
<td></td>
</tr>
<tr>
<td>&gt; y轴</td>
<td>max(W,H)</td>
<td></td>
</tr>
<tr>
<td>取线角度 angle</td>
<td>17</td>
<td>用17位有符号整数存小数结果除100</td>
</tr>
</tbody>
</table>
<h3 id="group">group</h3>
<table>
<thead>
<tr>
<th>说明</th>
<th>位数</th>
<th>备注</th>
</tr>
</thead>
<tbody>
<tr>
<td>组成员 members 列表长度</td>
<td>16</td>
<td></td>
</tr>
<tr>
<td>&gt; 是否是map中元素 of-map</td>
<td>1</td>
<td>否则为iterate中元素</td>
</tr>
<tr>
<td>&gt; 元素id id</td>
<td>16</td>
<td></td>
</tr>
</tbody>
</table>
<h1 id="map-attached">map-attached</h1>
<h2 id="type-2">type</h2>
<table>
<thead>
<tr>
<th>id</th>
<th>说明</th>
<th>备注</th>
</tr>
</thead>
<tbody>
<tr>
<td>0</td>
<td>旋转 rotate</td>
<td></td>
</tr>
<tr>
<td>1</td>
<td>缩放 zoom</td>
<td></td>
</tr>
<tr>
<td>2</td>
<td>翻转 flip</td>
<td>无data</td>
</tr>
<tr>
<td>3</td>
<td>阴影 shadow</td>
<td>未实现</td>
</tr>
<tr>
<td>4</td>
<td>边框 border</td>
<td>未实现</td>
</tr>
</tbody>
</table>
<h2 id="data-1">data</h2>
<h3 id="rotate">rotate</h3>
<table>
<thead>
<tr>
<th>说明</th>
<th>位数</th>
<th>备注</th>
</tr>
</thead>
<tbody>
<tr>
<td>旋转角度 angle</td>
<td>17</td>
<td>用17位有符号整数存小数结果除100</td>
</tr>
</tbody>
</table>
<h3 id="zoom">zoom</h3>
<table>
<thead>
<tr>
<th>说明</th>
<th>位数</th>
<th>备注</th>
</tr>
</thead>
<tbody>
<tr>
<td>缩放比例 zoom</td>
<td>32</td>
<td>单精度浮点数</td>
</tr>
</tbody>
</table>
<h1 id="iterate-operations">iterate-operations</h1>
<h2 id="type-3">type</h2>
<table>
<thead>
<tr>
<th>id</th>
<th>说明</th>
<th>备注</th>
</tr>
</thead>
<tbody>
<tr>
<td>0</td>
<td>移动 move</td>
<td></td>
</tr>
<tr>
<td>1</td>
<td>旋转 rotate</td>
<td></td>
</tr>
<tr>
<td>2</td>
<td>缩放 zoom</td>
<td></td>
</tr>
<tr>
<td>3</td>
<td>翻转 flip</td>
<td>无data</td>
</tr>
</tbody>
</table>
<h2 id="data-2">data</h2>
<h3 id="move">move</h3>
<table>
<thead>
<tr>
<th>说明</th>
<th>位数</th>
<th>备注</th>
</tr>
</thead>
<tbody>
<tr>
<td>x轴增量dx</td>
<td>W</td>
<td></td>
</tr>
<tr>
<td>y轴增量dy</td>
<td>H</td>
<td></td>
</tr>
</tbody>
</table>
<h3 id="rotate-1">rotate</h3>
<table>
<thead>
<tr>
<th>说明</th>
<th>位数</th>
<th>备注</th>
</tr>
</thead>
<tbody>
<tr>
<td>旋转中心坐标 center</td>
<td>0</td>
<td></td>
</tr>
<tr>
<td>&gt; x坐标</td>
<td>W</td>
<td></td>
</tr>
<tr>
<td>&gt; y坐标</td>
<td>H</td>
<td></td>
</tr>
<tr>
<td>旋转角度 angle</td>
<td>17</td>
<td>用17位有符号整数存小数结果除100</td>
</tr>
</tbody>
</table>
<h3 id="zoom-1">zoom</h3>
<table>
<thead>
<tr>
<th>说明</th>
<th>位数</th>
<th>备注</th>
</tr>
</thead>
<tbody>
<tr>
<td>缩放比例 zoom</td>
<td>32</td>
<td>单精度浮点数</td>
</tr>
</tbody>
</table>
</body>
</html>