Skip to content

fill_decoder.hh

Zhiyuan "Erick" Li edited this page Jun 27, 2019 · 1 revision

fill_decoder.hh

void decodeFillPattern(char **cursor, std::string &jstring, int level, char **tail)

  • 功能 ⚙️

此函数是解码Fill Pattern的主函数。

  • 输入 📥
    • cursor See Public Param
    • jstring See Public Param
    • level See Public Param
    • tail :字符指针char *,需要指向内存中数据块的最后一个字节
  • jstring 键值对 🧲
{
    "symbolType": "fill",
    "color_unknown": {#colorPattern},
    "numberOfLayers": 2,
    "fillLayer": [
        {#fillPattern},
        {#fillPattern}
    ],
    "fillLayerActiveness": [
        1,
        0
    ],
    "fillLayerLock": [
        0,
        1
    ]
}
  • 提示 💡
    • fillLayerActiveness乃是表示对应图层是否被设置为可见;
    • fillLayerLock乃是表示对应图层是否被设置为编辑保护。

void decodeLayer(char **cursor, std::string &jstring, int level, int type)

  • 功能 ⚙️

此函数是用于解码Fill Pattern抑或是Symbol的图层类别(包括Simple Fill, Marker Fill, Line Fill)。

  • 输入 📥
    • cursor See Public Param
    • jstring See Public Param
    • level See Public Param
    • type:整型数int,解码类型:
      • 0:普通图层解码;
      • 1:Mask Symbol解码。

void decodeSimpleFill(char **cursor, std::string &jstring, int level, int type)

  • 功能 ⚙️

此函数乃是Simple Fill的解码函数。

  • 输入 📥
    • cursor See Public Param
    • jstring See Public Param
    • level See Public Param
    • type:整型数int,解码类型:
      • 0:普通图层解码;
      • 1:Mask Symbol解码。
  • jstring 键值对 🧲
{
    "number": #int,
    "fillingType": "Simple Fill",
    "lineProperty_outline": {#linePattern},
    "color_fillingColor": {#colorPattern}
}

void decodeLineFill(char **cursor, std::string &jstring, int level)

  • 功能 ⚙️

此函数乃是Line Fill的解码函数。

  • 输入 📥
    • cursor See Public Param
    • jstring See Public Param
    • level See Public Param
  • jstring 键值对 🧲
{
    "number": #int,
    "fillingType": "Line Fill",
    "lineProperty_fillingLine": {#linePattern},
    "lineProperty_outline": {#linePattern},
    "angle": #double,
    "offset": #double,
    "separation": #double
}

void decodeMarkerFill(char **cursor, std::string &jstring, int level)

  • 功能 ⚙️

此函数乃是Marker Fill的解码函数。

  • 输入 📥
    • cursor See Public Param
    • jstring See Public Param
    • level See Public Param
  • jstring 键值对 🧲
{
    "number": #int,
    "fillingType": "Marker Fill",
    "style": #markerStyles,
    "fillPropertiesOffsetX": #int,
    "fillPropertiesOffsetY": #int,
    "fillPropertiesSeparationX": #int,
    "fillPropertiesSeparationY": #int,
    "markerProperty": {#markerPattern},
    "lineProperty_outline": {#linePattern}
}

Clone this wiki locally