Commit 42bb72cb authored by Fabrice Salvaire's avatar Fabrice Salvaire

doc

parent fc32991d
......@@ -160,11 +160,12 @@ class QtPainter(Painter):
def paint(self, painter):
self._logger.info('paint')
self._logger.info('Start painting')
self._painter = painter
if self._show_grid:
self._paint_grid()
super().paint()
self._logger.info('Paint done')
##############################################
......
.. include:: /abbreviation.txt
.. _design-note-page:
==============
Design Notes
==============
This section contains design notes.
Contents:
.. toctree::
:maxdepth: 2
question-answer.rst
performance.rst
.. include:: /abbreviation.txt
.. _design-note-performance-page:
==============
Performances
==============
SVG Import
----------
For the complex dress pattern "Veravenus" of the file
:file:`veravenus-little-bias-dress.pattern-a0.svg` made of 270 SVG paths and 1051 segments, the
parsing and rendering time is of the order of one seconde ( cf. following log ). In comparison,
Inkscape launched in parallel using a shell script, takes a little more times to start and open this
file. Of course the comparison is not perfect since Inkscape is a heavier software to load, but it
shows a full Python implementation ( excepted the work done by Qt ) is competitive for a such file.
.. image:: /_static/patro-svg-import.png
:alt: Patro SVG Import
:width: 300px
:height: 300px
:align: center
.. code-block:: text
> ./bin/patro --user-script examples/file-format/svg/test-svg-import.py
... :mm:ss,sss
... :11:26,528 - __main__.<module> - INFO - Started Patro
... :11:27,111 - Patro.QtApplication.QmlApplication.Application._message_handler - INFO - main.qml onCompleted
... :11:27,113 - Patro.QtApplication.QmlApplication.Application._post_init - INFO - post init
... :11:27,113 - Patro.QtApplication.QmlApplication.Application.execute_user_script - INFO - Execute user script:
... patro/examples/file-format/svg/test-svg-import.py
... :11:27,361 - builtins.SceneImporter.__init__ - INFO - Number of SVG item: 270
... :11:27,361 - builtins.SceneImporter.__init__ - INFO - Number of scene item: 1051
... :11:27,361 - Patro.QtApplication.QmlApplication.QmlApplication.scene - INFO - set scene
... :11:27,362 - Patro.GraphicEngine.Painter.QtPainter.QtQuickPaintedSceneItem.scene - INFO - set scene
... :11:27,362 - Patro.QtApplication.QmlApplication.Application.execute_user_script - INFO - User script done
... :11:27,387 - Patro.GraphicEngine.Painter.QtPainter.QtQuickPaintedSceneItem.paint - INFO - Start painting
... :11:27,530 - Patro.GraphicEngine.Painter.QtPainter.QtQuickPaintedSceneItem.paint - INFO - Paint done
.. include:: abbreviation.txt
.. include:: /abbreviation.txt
.. _design-note-page:
.. _design-note-question-answer-page:
==============
Design Notes
==============
==================================
Design Notes Questions & Answers
==================================
Originally, Patro was a Python implementation of the Valentina pattern making software, which only
focus to implement the core engine and not the graphical user interface.
......
.. include:: /abbreviation.txt
.. _examples-dxf-import-page:
============
DXF Import
============
This screenshot show the file :file:`.dxf`.
.. image:: /_static/patro-dxf-import.png
:alt: Patro DXF Import
:align: center
.. include:: abbreviation.txt
.. include:: /abbreviation.txt
.. _examples-page:
......@@ -7,3 +7,11 @@
==========
The *examples* directory contains several Python scripts showing how to use Patro.
Contents:
.. toctree::
:maxdepth: 2
svg-import.rst
dxf-import.rst
.. include:: /abbreviation.txt
.. _examples-svg-import-page:
============
SVG Import
============
This screenshot show the complex dress pattern "Veravenus" of the file
:file:`veravenus-little-bias-dress.pattern-a0.svg` made of 270 SVG paths and 1051 segments.
.. image:: /_static/patro-svg-import.png
:alt: Patro SVG Import
:align: center
.. image:: /_static/patro-svg-import-selection.png
:alt: Patro SVG Import Item Selection
:align: center
.. include:: project-links.txt
.. include:: abbreviation.txt
.. _graphic-engine-review-page:
=======================
Graphic Engine Review
=======================
Common Features
---------------
* transformation: reflect, slant
* clipping path
* path
* pen: invisible, hex
* arrow tips
* marker
* label
Tikz
----
* circle on path
* sin parabola path
* filling: shading
* scope : style, transformation
* label : anchor, alignment, position on path
* pen
* line width : ultra thin, very thin, thin, semithick, thick, very thick, ultra thick
* line cape / join
* dash pattern
* double line
* node : edge, anchor, shape
Asymptote
---------
http://asymptote.sourceforge.net
Examples::
draw((0,0)--(100,100));
draw((0,0)--(2,1),Arrow);
draw((0,0)--(1,0)--(1,1)--(0,1)--cycle);
label("$A$",(0,0),SW);
DPic
----
......@@ -146,9 +146,9 @@ If you want to donate to the project or need a more professional support.
news.rst
roadmap.rst
installation.rst
examples.rst
examples/index.rst
faq.rst
design-notes.rst
design-notes/index.rst
resources/index.rst
reference-manual.rst
development.rst
......
.. include:: ../../abbreviation.txt
.. include:: /abbreviation.txt
.. _bezier-geometry-ressources-page:
......
.. include:: ../../abbreviation.txt
.. include:: /abbreviation.txt
.. _geometry-ressources-page:
......
.. include:: ../../abbreviation.txt
.. include:: /abbreviation.txt
.. _spline-geometry-ressources-page:
......
.. include:: ../../abbreviation.txt
.. include:: /abbreviation.txt
.. _transformation-geometry-ressources-page:
......
.. include:: ../abbreviation.txt
.. include:: /abbreviation.txt
.. _ressources-page:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment