﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<?application progid="SMath Studio" version="0.90"?>
<regions>
  <settings>
    <editable>true</editable>
    <metadata lang="rus">
      <title>Конвертер веб-цветов</title>
      <author>Андрей Ивашов</author>
      <description>Расширяет возможности программы функцией для конвертирования кодов веб-цветов в числовые идентификаторы цветов, которые можно затем использовать для указания цвета объектов холста графиков.</description>
      <company>SMath, http://smath.info/</company>
    </metadata>
    <metadata lang="eng">
      <title>Web-colors converter</title>
      <author>Andrey Ivashov</author>
      <description>Extends program with a function to convert web-colors codes to the numeric color IDs to use them within SMath Studio Plot Regions.</description>
      <company>SMath, http://smath.info/</company>
    </metadata>
    <calculation>
      <precision>4</precision>
      <fractions>decimal</fractions>
      <recalculation>true</recalculation>
    </calculation>
    <dependences>
      <assembly name="SMath Studio" version="0.90" guid="a37cba83-b69c-4c71-9992-55ff666763bd" />
    </dependences>
  </settings>
  <region id="0" top="9" color="#000000" background-color="#ffffff">
    <area name="Web-colors converter" is-collapsed="true">
      <region id="1" left="9" top="27" width="324" height="24" color="#000000" background-color="#ffff80" font-size="10">
        <text lang="rus">
          <p>Конвертирует число из шестнадцатиричной системы счисления в десятиричную</p>
        </text>
        <text lang="eng">
          <p>Converts hexadecimal number to decimal</p>
        </text>
      </region>
      <region id="2" left="9" top="45" width="476" height="157" color="#000000" background-color="#ffffff" font-size="10">
        <math fraction-type="none" optimize="1">
          <input>
            <e type="operand">str</e>
            <e type="function" args="1">hex2dec</e>
            <e type="operand">output</e>
            <e type="operand">0</e>
            <e type="operator" args="2">←</e>
            <e type="operand">hex</e>
            <e type="operand" style="string">0123456789ABCDEF</e>
            <e type="operator" args="2">←</e>
            <e type="operand">count</e>
            <e type="operand">str</e>
            <e type="function" preserve="true" args="1">strlen</e>
            <e type="operator" args="2">←</e>
            <e type="operand">k</e>
            <e type="operand">1</e>
            <e type="operator" args="2">←</e>
            <e type="operand">k</e>
            <e type="operand">count</e>
            <e type="operator" args="2">≤</e>
            <e type="operand">k</e>
            <e type="operand">k</e>
            <e type="operand">1</e>
            <e type="operator" args="2">+</e>
            <e type="operator" args="2">←</e>
            <e type="operand">num</e>
            <e type="operand">hex</e>
            <e type="operand">str</e>
            <e type="operand">k</e>
            <e type="operand">1</e>
            <e type="function" preserve="true" args="3">substr</e>
            <e type="function" preserve="true" args="2">findstr</e>
            <e type="operand">1</e>
            <e type="function" preserve="true" args="2">el</e>
            <e type="operand">1</e>
            <e type="operator" args="2">-</e>
            <e type="operator" args="2">←</e>
            <e type="operand">output</e>
            <e type="operand">output</e>
            <e type="operand">num</e>
            <e type="operand">16</e>
            <e type="operand">count</e>
            <e type="operand">k</e>
            <e type="operator" args="2">-</e>
            <e type="operator" args="2">^</e>
            <e type="operator" args="2">*</e>
            <e type="operator" args="2">+</e>
            <e type="operator" args="2">←</e>
            <e type="operand">2</e>
            <e type="operand">1</e>
            <e type="function" preserve="true" args="4">line</e>
            <e type="function" preserve="true" args="4">for</e>
            <e type="operand">output</e>
            <e type="operand">5</e>
            <e type="operand">1</e>
            <e type="function" preserve="true" args="7">line</e>
            <e type="operator" args="2">←</e>
          </input>
        </math>
      </region>
      <region id="3" left="9" top="207" width="397" height="24" color="#000000" background-color="#ffff80" font-size="10">
        <text lang="rus">
          <p>Конвертирует цвет, представленный веб-кодом в числовой идентификатор цвета</p>
        </text>
        <text lang="eng">
          <p>Converts web-color code to the color numeric id</p>
        </text>
      </region>
      <region id="4" left="9" top="225" width="469" height="201" color="#000000" background-color="#ffffff" font-size="10">
        <math fraction-type="none" optimize="1">
          <input>
            <e type="operand">webColor</e>
            <e type="function" args="1">colorNum</e>
            <e type="operand">resultCode</e>
            <e type="operand">webColor</e>
            <e type="function" preserve="true" args="1">strlen</e>
            <e type="operand">8</e>
            <e type="operator" args="2">≡</e>
            <e type="operand">webColor</e>
            <e type="operand" style="string">FF</e>
            <e type="operand">webColor</e>
            <e type="function" preserve="true" args="2">concat</e>
            <e type="function" preserve="true" args="3">if</e>
            <e type="operator" args="2">←</e>
            <e type="operand">resultNum</e>
            <e type="operand">resultCode</e>
            <e type="function" args="1">hex2dec</e>
            <e type="operator" args="2">←</e>
            <e type="operand">maxNum</e>
            <e type="operand" style="string">FFFFFFFF</e>
            <e type="function" args="1">hex2dec</e>
            <e type="operator" args="2">←</e>
            <e type="operand">resultNum</e>
            <e type="operand">maxNum</e>
            <e type="operand">2</e>
            <e type="operator" args="2">/</e>
            <e type="operator" args="2">≥</e>
            <e type="operand">resultNum</e>
            <e type="operand">maxNum</e>
            <e type="operator" args="2">-</e>
            <e type="operand">1</e>
            <e type="operator" args="2">-</e>
            <e type="operand">resultNum</e>
            <e type="function" preserve="true" args="3">if</e>
            <e type="operand">4</e>
            <e type="operand">1</e>
            <e type="function" preserve="true" args="6">line</e>
            <e type="operator" args="2">←</e>
          </input>
        </math>
      </region>
      <region id="5" top="432" color="#000000" background-color="#ffffff">
        <area terminator="true" />
      </region>
    </area>
  </region>
  <region id="6" left="9" top="450" width="352" height="148" color="#000000" background-color="#ffffff" font-size="10">
    <math fraction-type="none" optimize="1">
      <input>
        <e type="operand">plotter</e>
        <e type="operand">4</e>
        <e type="operand">2</e>
        <e type="operand" style="string">.</e>
        <e type="operand">200</e>
        <e type="operand" style="string">55FFFF00</e>
        <e type="function" args="1">colorNum</e>
        <e type="operand">4</e>
        <e type="operand">1</e>
        <e type="operand" style="string">.</e>
        <e type="operand">80</e>
        <e type="operand" style="string">88FF0000</e>
        <e type="function" args="1">colorNum</e>
        <e type="operand">4</e>
        <e type="operand">2</e>
        <e type="operand" style="string">.</e>
        <e type="operand">80</e>
        <e type="operand" style="string">8800FF00</e>
        <e type="function" args="1">colorNum</e>
        <e type="operand">4</e>
        <e type="operand">3</e>
        <e type="operand" style="string">.</e>
        <e type="operand">80</e>
        <e type="operand" style="string">880000FF</e>
        <e type="function" args="1">colorNum</e>
        <e type="operand">4</e>
        <e type="operand">1</e>
        <e type="operand" style="string">.</e>
        <e type="operand">40</e>
        <e type="operand" style="string">FF0000</e>
        <e type="function" args="1">colorNum</e>
        <e type="operand">4</e>
        <e type="operand">2</e>
        <e type="operand" style="string">.</e>
        <e type="operand">40</e>
        <e type="operand" style="string">00FF00</e>
        <e type="function" args="1">colorNum</e>
        <e type="operand">4</e>
        <e type="operand">3</e>
        <e type="operand" style="string">.</e>
        <e type="operand">40</e>
        <e type="operand" style="string">0000FF</e>
        <e type="function" args="1">colorNum</e>
        <e type="operand">7</e>
        <e type="operand">5</e>
        <e type="function" preserve="true" args="37">mat</e>
        <e type="operator" args="2">←</e>
      </input>
    </math>
  </region>
  <region id="7" left="9" top="603" width="178" height="116" color="#000000" background-color="#ffffff" font-size="10">
    <plot type="2d" render="lines" scale_x="3.34973530705442" scale_y="3.34973530705442" scale_z="3.34973530705442" rotate_x="0" rotate_y="0" rotate_z="0" transpose_x="-126" transpose_y="-58" transpose_z="0">
      <input>
        <e type="operand">plotter</e>
      </input>
    </plot>
  </region>
</regions>