No longer mention cairo in the docs

Especially the installation docs
This commit is contained in:
Florian Festi 2020-05-18 22:18:39 +02:00
parent 2fc59b48df
commit cf052f408b
9 changed files with 22 additions and 55 deletions

View File

@ -87,9 +87,10 @@ These also are simple drawing commands. Some of them get ``x``, ``y`` and
at the current coordinate origin. Often these commands create holes or
hole patterns.
Cairo
.....
Back end
........
Boxes.py uses cairo as graphics library. It is not fully encapsulated
Boxes.py used to use cairo as graphics library. It now uses its own -
pure Python - back end. It is not fully encapsulated
within the drawing methods of the Boxes class. Although this is the
long term goal. Boxes.ctx is the cairo context all drawing is made on.
long term goal. Boxes.ctx is the context all drawing is made on.

View File

@ -9,7 +9,7 @@ Generators are sub classes of
Most code is directly in this class. Sub class are supposed to over
write the ``.__init__()`` and ``.render()`` method.
The Boxes class keeps a cairo canvas object (self.ctx) that all
The Boxes class keeps a canvas object (self.ctx) that all
drawing is made on. In addition it keeps a couple of global settings
used for various drawing operations. See the ``.__init__()`` method
for the details.

View File

@ -1,7 +1,7 @@
Navigation
----------
The cairo library can both move the origin and the current point from
The back end can both move the origin and the current point from
which the next line is going to start. Boxes.py hides this by using
Turtle Graphics commands that also move the origin to the end of the
last line. Other drawing commands restore the current position after
@ -35,7 +35,7 @@ It can be used with the following code pattern:
# continue above the row
Parts of the code still directly use the cairo primitives **Boxes.ctx.save()**
Parts of the code still directly use the back end primitives **Boxes.ctx.save()**
and **Boxes.ctx.restore()**. But this has several disadvantages and is
discouraged. For one it requires matchiung calls. It also does not
reset the starting point of the next line. This is "healed" by a

View File

@ -9,11 +9,10 @@ installing or building binary formats.
Requirements
------------
Cairo
.....
Boxes.py is based on the cairo graphics library. It supports both the PyPi
version :code:`cairocffi` and :code:`python-cairo` that might be shipped with
your distribution.
Affine
........
:code:`Affine` (package name may be :code:`python-affine` or
:code:`python3-affine`) is used for vector calculation.
Markdown
........

View File

@ -23,14 +23,15 @@ General
2. Install cairio:
.. code::
brew install cairo pkg-config
brew install pkg-config
3. Install required Python modules:
.. code::
pip3 install pycairo cairocffi Markdown lxml
pip3 install Markdown lxml affine
4. Download Boxes.py via Git:

View File

@ -1,11 +1,6 @@
Windows
=======
While there is no known reason why Boxes.py should not run on Windows
there is no upstream experience with doing so. The tricky part is
getting the cairo library installed and to run with the Python version
used. Python version and the architecture (32 or 64 bit) must match.
Getting the Inkscape plugins to run will likely need manual
installation (see above). Note that Inkscape may come with its own
Python. If you run into trouble or have better installation
@ -32,47 +27,18 @@ Following steps are known to work under Windows 10 (64-bit):
:alt: Screenshot of Python 3.7 (64-bit) installer with PATH checked
:align: center
3. Go to https://www.lfd.uci.edu/~gohlke/pythonlibs/#cairocffi
and download :code:`cairocffi1.0.2cp37cp37mwin_amd64.whl`
.. figure:: windows_browser_download_pycairo.png
:scale: 50%
:alt: Screenshot of download for Python wheel of pycairo
:align: center
4. Go to https://www.lfd.uci.edu/~gohlke/pythonlibs/#pycairo
and download `pycairo1.18.0cp37cp37mwin_amd64.whl`
.. figure:: windows_browser_download_cairocffi.png
:scale: 50%
:alt: Screenshot of download for Python wheel of cairocffi
:align: center
5. Open the Command Prompt
(i.e. via the shortcut Windows + R and then typing "cmd"
and pressing Enter)
6. Change to the folder where the .whl files from step 3 and 4 are located
(e.g. with the command :code:`cd \Users\[USERNAME]\Downloads`
where `[USERNAME]` is your username and `Downloads` the folder where
the .whl files are located)
7. Run the command :code:`pip install cairocffi1.0.2cp37cp37mwin_amd64.whl
pycairo1.18.0cp37cp37mwin_amd64.whl Markdown lxml`
3. Run the command :code:`pip install Markdown lxml affine`
(Note: If the command pip is not found, you probably forgot to add the
Python installation to the PATH environment variable in step 2)
.. figure:: windows_cmd_pip_install_dependencies.png
:scale: 50%
:alt: Command Prompt with pip installing dependencies
:align: center
8. Download Boxes.py as ZIP archive from GitHub
4. Download Boxes.py as ZIP archive from GitHub
.. figure:: windows_browser_download_boxespy.png
:scale: 50%
:alt: Screenshot of download from Boxes.py project on GitHub
:align: center
9. Extract the ZIP archive
5. Extract the ZIP archive
(e.g. via the built-in Windows feature or other tools like 7-Zip)
.. figure:: windows_boxespy_zip_extract.png
@ -80,9 +46,9 @@ Following steps are known to work under Windows 10 (64-bit):
:alt: Screenshot of Windows tools to extract the ZIP archive
:align: center
10. Change into the folder for Boxes.py,
6. Change into the folder for Boxes.py,
e.g. with the command :code:`cd \Users\[USERNAME]\Downloads\boxes-master`
11. Run the development server with the command
7. Run the development server with the command
:code:`python scripts\boxesserver`
Note: You likely will be notified by your firewall that it blocked network
access. If you want to use boxesserver you need to allow connections.
@ -92,7 +58,7 @@ Following steps are known to work under Windows 10 (64-bit):
:alt: Screenshot of command for running boxesserver and firewall notice
:align: center
12. Open the address http://localhost:8000/ in your browser and have fun :)
8. Open the address http://localhost:8000/ in your browser and have fun :)
.. figure:: windows_browser_boxespy.png
:scale: 50%

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 79 KiB