tests/python/py_ext_0@py_ext/pyfile.xml
author Andrey Skvortsov <andrej.skvortzov@gmail.com>
Fri, 13 Jan 2017 19:51:36 +0300
changeset 1631 940e20a8865b
parent 1452 7a2b344de8cf
child 2680 6bfed6757495
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).
1436
e15ca67197b9 py_ext user python code can now know about global variables shared with PLC. updated tests/python accordingly
Edouard Tisserant
parents:
diff changeset
     1
<?xml version='1.0' encoding='utf-8'?>
e15ca67197b9 py_ext user python code can now know about global variables shared with PLC. updated tests/python accordingly
Edouard Tisserant
parents:
diff changeset
     2
<PyFile xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
e15ca67197b9 py_ext user python code can now know about global variables shared with PLC. updated tests/python accordingly
Edouard Tisserant
parents:
diff changeset
     3
  <variables>
e15ca67197b9 py_ext user python code can now know about global variables shared with PLC. updated tests/python accordingly
Edouard Tisserant
parents:
diff changeset
     4
    <variable name="SomeVarName" type="DINT"/>
e15ca67197b9 py_ext user python code can now know about global variables shared with PLC. updated tests/python accordingly
Edouard Tisserant
parents:
diff changeset
     5
    <variable name="Grumpf" type="STRING"/>
e15ca67197b9 py_ext user python code can now know about global variables shared with PLC. updated tests/python accordingly
Edouard Tisserant
parents:
diff changeset
     6
  </variables>
e15ca67197b9 py_ext user python code can now know about global variables shared with PLC. updated tests/python accordingly
Edouard Tisserant
parents:
diff changeset
     7
  <globals>
e15ca67197b9 py_ext user python code can now know about global variables shared with PLC. updated tests/python accordingly
Edouard Tisserant
parents:
diff changeset
     8
    <xhtml:p><![CDATA[
1452
7a2b344de8cf Fixed build of tests/python.
Edouard Tisserant
parents: 1436
diff changeset
     9
print "All python PLC globals variables :", PLCGlobalsDesc
7a2b344de8cf Fixed build of tests/python.
Edouard Tisserant
parents: 1436
diff changeset
    10
print "Current extention name :", __ext_name__
1436
e15ca67197b9 py_ext user python code can now know about global variables shared with PLC. updated tests/python accordingly
Edouard Tisserant
parents:
diff changeset
    11
]]></xhtml:p>
e15ca67197b9 py_ext user python code can now know about global variables shared with PLC. updated tests/python accordingly
Edouard Tisserant
parents:
diff changeset
    12
  </globals>
e15ca67197b9 py_ext user python code can now know about global variables shared with PLC. updated tests/python accordingly
Edouard Tisserant
parents:
diff changeset
    13
  <init>
e15ca67197b9 py_ext user python code can now know about global variables shared with PLC. updated tests/python accordingly
Edouard Tisserant
parents:
diff changeset
    14
    <xhtml:p><![CDATA[
e15ca67197b9 py_ext user python code can now know about global variables shared with PLC. updated tests/python accordingly
Edouard Tisserant
parents:
diff changeset
    15
]]></xhtml:p>
e15ca67197b9 py_ext user python code can now know about global variables shared with PLC. updated tests/python accordingly
Edouard Tisserant
parents:
diff changeset
    16
  </init>
e15ca67197b9 py_ext user python code can now know about global variables shared with PLC. updated tests/python accordingly
Edouard Tisserant
parents:
diff changeset
    17
  <cleanup>
e15ca67197b9 py_ext user python code can now know about global variables shared with PLC. updated tests/python accordingly
Edouard Tisserant
parents:
diff changeset
    18
    <xhtml:p><![CDATA[
e15ca67197b9 py_ext user python code can now know about global variables shared with PLC. updated tests/python accordingly
Edouard Tisserant
parents:
diff changeset
    19
]]></xhtml:p>
e15ca67197b9 py_ext user python code can now know about global variables shared with PLC. updated tests/python accordingly
Edouard Tisserant
parents:
diff changeset
    20
  </cleanup>
e15ca67197b9 py_ext user python code can now know about global variables shared with PLC. updated tests/python accordingly
Edouard Tisserant
parents:
diff changeset
    21
  <start>
e15ca67197b9 py_ext user python code can now know about global variables shared with PLC. updated tests/python accordingly
Edouard Tisserant
parents:
diff changeset
    22
    <xhtml:p><![CDATA[
e15ca67197b9 py_ext user python code can now know about global variables shared with PLC. updated tests/python accordingly
Edouard Tisserant
parents:
diff changeset
    23
]]></xhtml:p>
e15ca67197b9 py_ext user python code can now know about global variables shared with PLC. updated tests/python accordingly
Edouard Tisserant
parents:
diff changeset
    24
  </start>
e15ca67197b9 py_ext user python code can now know about global variables shared with PLC. updated tests/python accordingly
Edouard Tisserant
parents:
diff changeset
    25
  <stop>
e15ca67197b9 py_ext user python code can now know about global variables shared with PLC. updated tests/python accordingly
Edouard Tisserant
parents:
diff changeset
    26
    <xhtml:p><![CDATA[
e15ca67197b9 py_ext user python code can now know about global variables shared with PLC. updated tests/python accordingly
Edouard Tisserant
parents:
diff changeset
    27
]]></xhtml:p>
e15ca67197b9 py_ext user python code can now know about global variables shared with PLC. updated tests/python accordingly
Edouard Tisserant
parents:
diff changeset
    28
  </stop>
e15ca67197b9 py_ext user python code can now know about global variables shared with PLC. updated tests/python accordingly
Edouard Tisserant
parents:
diff changeset
    29
</PyFile>