canfestival/test_config/master.od
author Andrey Skvortsov <andrej.skvortzov@gmail.com>
Fri, 13 Jan 2017 19:51:36 +0300
changeset 1631 940e20a8865b
parent 721 ecf4d203c4d4
permissions -rw-r--r--
fix issue with printing scheme (FBD, LD or SFC) with comment element on GNU/Linux

If you draw FBD scheme and place comment on it and then try to print
it, then no wires will be printed and comment box is empty (text is
missing). This happens only for wx.PrinterDC and not on wx.MemoryDC
that is used to draw print preview window in Beremiz IDE.
Looks like a bug in wxPython or wxWidgets.

There were found several workaround for this issue.
1) If some dc.DrawLines call is placed before dc.DrawPolygon, then the
problem is gone.

...
dc.DrawLines(polygon)
dc.DrawPolygon(polygon)
...

2) Reseting DC brush solves the problem as well (see this changeset).
<?xml version="1.0"?>
<!DOCTYPE PyObject SYSTEM "PyObjects.dtd">
<PyObject module="node" class="Node" id="148584620">
<attr name="Profile" type="dict" id="148589396" >
</attr>
<attr name="Description" type="string" value="" />
<attr name="Dictionary" type="dict" id="148592132" >
  <entry>
    <key type="numeric" value="4096" />
    <val type="numeric" value="302" />
  </entry>
  <entry>
    <key type="numeric" value="4097" />
    <val type="numeric" value="0" />
  </entry>
  <entry>
    <key type="numeric" value="6144" />
    <val type="list" id="148585004" >
      <item type="string" value="{True:&quot;$NODEID+0x%X80&quot;%(base+1),False:0x80000000}[base&lt;4]" />
      <item type="numeric" value="0" />
      <item type="numeric" value="0" />
      <item type="numeric" value="0" />
      <item type="numeric" value="0" />
    </val>
  </entry>
  <entry>
    <key type="numeric" value="5120" />
    <val type="list" id="148586060" >
      <item type="numeric" value="448" />
      <item type="numeric" value="1" />
      <item type="numeric" value="0" />
      <item type="numeric" value="0" />
      <item type="numeric" value="0" />
    </val>
  </entry>
  <entry>
    <key type="numeric" value="4101" />
    <val type="numeric" value="1073741952" />
  </entry>
  <entry>
    <key type="numeric" value="4102" />
    <val type="numeric" value="50000" />
  </entry>
  <entry>
    <key type="numeric" value="8192" />
    <val type="numeric" value="0" />
  </entry>
  <entry>
    <key type="numeric" value="6656" />
    <val type="list" id="148585228" >
      <item type="numeric" value="268501000" />
    </val>
  </entry>
  <entry>
    <key type="numeric" value="5632" />
    <val type="list" id="148585036" >
      <item type="numeric" value="536870920" />
    </val>
  </entry>
  <entry>
    <key type="numeric" value="4120" />
    <val type="list" id="148585292" >
      <item type="numeric" value="0" />
      <item type="numeric" value="0" />
      <item type="numeric" value="0" />
      <item type="numeric" value="0" />
    </val>
  </entry>
  <entry>
    <key type="numeric" value="4118" />
    <val type="list" id="148585100" >
      <item type="numeric" value="4195804" />
    </val>
  </entry>
</attr>
<attr name="SpecificMenu" type="list" id="148584044" >
</attr>
<attr name="ParamsDictionary" type="dict" id="148592268" >
</attr>
<attr name="UserMapping" type="dict" id="148592404" >
  <entry>
    <key type="numeric" value="8192" />
    <val type="dict" id="148592540" >
      <entry>
        <key type="string" value="need" />
        <val type="False" value="" />
      </entry>
      <entry>
        <key type="string" value="values" />
        <val type="list" id="148585868" >
          <item type="dict" id="148592676" >
            <entry>
              <key type="string" value="access" />
              <val type="string" value="rw" />
            </entry>
            <entry>
              <key type="string" value="pdo" />
              <val type="True" value="" />
            </entry>
            <entry>
              <key type="string" value="type" />
              <val type="numeric" value="5" />
            </entry>
            <entry>
              <key type="string" value="name" />
              <val type="string">Read Inputs</val>
            </entry>
          </item>
        </val>
      </entry>
      <entry>
        <key type="string" value="name" />
        <val type="string">Read Inputs</val>
      </entry>
      <entry>
        <key type="string" value="struct" />
        <val type="numeric" value="1" />
      </entry>
    </val>
  </entry>
</attr>
<attr name="DS302" type="dict" id="148592812" >
  <entry>
    <key type="numeric" value="7968" />
    <val type="dict" id="148592948" >
      <entry>
        <key type="string" value="need" />
        <val type="False" value="" />
      </entry>
      <entry>
        <key type="string" value="values" />
        <val type="list" id="148584684" >
          <item type="dict" id="148593084" >
            <entry>
              <key type="string" value="access" />
              <val type="string" value="ro" />
            </entry>
            <entry>
              <key type="string" value="pdo" />
              <val type="False" value="" />
            </entry>
            <entry>
              <key type="string" value="type" />
              <val type="numeric" value="5" />
            </entry>
            <entry>
              <key type="string" value="name" />
              <val type="string" value="Number of Entries" />
            </entry>
          </item>
          <item type="dict" id="148593220" >
            <entry>
              <key type="string" value="access" />
              <val type="string" value="rw" />
            </entry>
            <entry>
              <key type="string" value="pdo" />
              <val type="False" value="" />
            </entry>
            <entry>
              <key type="string" value="type" />
              <val type="numeric" value="15" />
            </entry>
            <entry>
              <key type="string" value="name" />
              <val type="string" value="Store DCF for node %d[(sub)]" />
            </entry>
            <entry>
              <key type="string" value="nbmax" />
              <val type="numeric" value="127" />
            </entry>
          </item>
        </val>
      </entry>
      <entry>
        <key type="string" value="name" />
        <val type="string" value="Store DCF" />
      </entry>
      <entry>
        <key type="string" value="struct" />
        <val type="numeric" value="7" />
      </entry>
    </val>
  </entry>
  <entry>
    <key type="numeric" value="7969" />
    <val type="dict" id="148593356" >
      <entry>
        <key type="string" value="need" />
        <val type="False" value="" />
      </entry>
      <entry>
        <key type="string" value="values" />
        <val type="list" id="148585516" >
          <item type="dict" id="148593492" >
            <entry>
              <key type="string" value="access" />
              <val type="string" value="ro" />
            </entry>
            <entry>
              <key type="string" value="pdo" />
              <val type="False" value="" />
            </entry>
            <entry>
              <key type="string" value="type" />
              <val type="numeric" value="5" />
            </entry>
            <entry>
              <key type="string" value="name" />
              <val type="string" value="Number of Entries" />
            </entry>
          </item>
          <item type="dict" id="148593628" >
            <entry>
              <key type="string" value="access" />
              <val type="string" value="rw" />
            </entry>
            <entry>
              <key type="string" value="pdo" />
              <val type="False" value="" />
            </entry>
            <entry>
              <key type="string" value="type" />
              <val type="numeric" value="2" />
            </entry>
            <entry>
              <key type="string" value="name" />
              <val type="string" value="Storage Format for Node %d[(sub)]" />
            </entry>
            <entry>
              <key type="string" value="nbmax" />
              <val type="numeric" value="127" />
            </entry>
          </item>
        </val>
      </entry>
      <entry>
        <key type="string" value="name" />
        <val type="string" value="Storage Format" />
      </entry>
      <entry>
        <key type="string" value="struct" />
        <val type="numeric" value="7" />
      </entry>
    </val>
  </entry>
  <entry>
    <key type="numeric" value="7970" />
    <val type="dict" id="148593764" >
      <entry>
        <key type="string" value="need" />
        <val type="False" value="" />
      </entry>
      <entry>
        <key type="string" value="values" />
        <val type="list" id="148594956" >
          <item type="dict" id="148593900" >
            <entry>
              <key type="string" value="access" />
              <val type="string" value="ro" />
            </entry>
            <entry>
              <key type="string" value="pdo" />
              <val type="False" value="" />
            </entry>
            <entry>
              <key type="string" value="type" />
              <val type="numeric" value="5" />
            </entry>
            <entry>
              <key type="string" value="name" />
              <val type="string" value="Number of Entries" />
            </entry>
          </item>
          <item type="dict" id="148594036" >
            <entry>
              <key type="string" value="access" />
              <val type="string" value="rw" />
            </entry>
            <entry>
              <key type="string" value="pdo" />
              <val type="False" value="" />
            </entry>
            <entry>
              <key type="string" value="type" />
              <val type="numeric" value="15" />
            </entry>
            <entry>
              <key type="string" value="name" />
              <val type="string" value="Concise DCF for Node %d[(sub)]" />
            </entry>
            <entry>
              <key type="string" value="nbmax" />
              <val type="numeric" value="127" />
            </entry>
          </item>
        </val>
      </entry>
      <entry>
        <key type="string" value="name" />
        <val type="string" value="Concise DCF" />
      </entry>
      <entry>
        <key type="string" value="struct" />
        <val type="numeric" value="7" />
      </entry>
    </val>
  </entry>
</attr>
<attr name="ProfileName" type="string" value="None" />
<attr name="Type" type="string">master</attr>
<attr name="ID" type="numeric" value="0" />
<attr name="Name" type="string">TestMaster</attr>
</PyObject>