Features:
- Parse slide file format (.sld) version 2.0 and version 1.0
- Parse slide library file format (.slb) version 1.0
- Create slide library from slides | Example
- Import slides to slide library | Example
- Export slides from slide library | Example
- Delete slides from slide library | Example
- Convert slide to PNG and SVG | Example
- Create slide from text records | Example
- Print various info about slide | Example
- Print various info about slide library | Example
- Draw slide on Cairo surface | Example
- Draw slide on Cairo surface via GObject Introspection | Example
- Backend for the
slide_image
function in VeLisp - Windows, MacOS and Linux support
You can find the latest release here.
- Download https://github.com/ten0s/slide/releases/download/0.10.1/slide-0.10.1-win-x64-setup.zip
- Open Downloads folder
- Double-click on slide-0.10.1-win-x64-setup.zip to open the archive
- Run slide-0.10.1-win-x64-setup.exe
- Follow the installation wizard. Default options are ok for most users
- Download https://github.com/ten0s/slide/releases/download/0.10.1/slide-0.10.1-win-x64.zip
- Open Downloads folder
- Select slide-0.10.1-win-x64.zip
- Press the right mouse button
- Click 'Extract All...'
- Enter 'C:'
- Click 'Extract'
- Press 'Windows + Break' to open the System Info
- Click 'Advanced system settings'
- Click 'Environment Variables...'
- Select 'Path' inside the User variables block
- Click 'Edit...'
- Click 'New...'
- Enter 'C:\slide-0.10.1-win-x64\bin'
- Click 'OK'
- Click 'OK'
You should have Homebrew installed.
% brew tap ten0s/velisp
% brew install slide
$ make
$ make install [PREFIX=$PWD/install]
$ cat test/square.txt
(COLOR 1) ; red
(SOLID_FILL_POLYGON 10 10 10 190 190 190 190 10)
(COLOR 2) ; yellow
(SOLID_FILL_POLYGON 20 20 20 180 180 180 180 20)
(COLOR 3) ; green
(SOLID_FILL_POLYGON 30 30 30 170 170 170 170 30)
(COLOR 5) ; blue
(SOLID_FILL_POLYGON 40 40 40 160 160 160 160 40)
(COLOR 255) ; white
(SOLID_FILL_POLYGON 50 50 50 150 150 150 150 50)
$ slide-create --width 200 --height 200 square.sld test/square.txt
$ cat test/triangle.txt
(COLOR 1) ; red
(VECTOR 10 10 100 190)
(VECTOR 100 190 190 10)
(VECTOR 190 10 10 10)
(VECTOR 20 20 100 180)
(VECTOR 100 180 180 20)
(VECTOR 180 20 20 20)
(VECTOR 40 40 100 160)
(VECTOR 100 160 160 40)
(VECTOR 160 40 40 40)
(VECTOR 80 80 100 120)
(VECTOR 100 120 120 80)
(VECTOR 120 80 80 80)
$ slide-create --width 200 --height 200 triangle.sld test/triangle.txt
$ slidelib-create mylib.slb
$ slidelib-create mylib.slb square.sld
$ slidelib-create mylib.slb *.sld
$ slide-info square.sld
Type : AutoCAD Slide 2.0
Name : square
Size : 223
Width : 200
Height : 200
Ratio : 1
Endian : Little
$ slide-info --what=records mylib.slb square
(COLOR 1)
(SOLID_FILL_POLYGON 10 10 10 190 190 190 190 10)
(COLOR 2)
(SOLID_FILL_POLYGON 20 20 20 180 180 180 180 20)
(COLOR 3)
(SOLID_FILL_POLYGON 30 30 30 170 170 170 170 30)
(COLOR 5)
(SOLID_FILL_POLYGON 40 40 40 160 160 160 160 40)
(COLOR 255)
(SOLID_FILL_POLYGON 50 50 50 150 150 150 150 50)
(END_OF_FILE)
$ slide-info --what=all mylib.slb 0
Info:
Type : AutoCAD Slide 2.0
Name : SQUARE
Size : 223
Width : 200
Height : 200
Ratio : 1
Endian : Little
Records:
(COLOR 1)
(SOLID_FILL_POLYGON 10 10 10 190 190 190 190 10)
(COLOR 2)
(SOLID_FILL_POLYGON 20 20 20 180 180 180 180 20)
(COLOR 3)
(SOLID_FILL_POLYGON 30 30 30 170 170 170 170 30)
(COLOR 5)
(SOLID_FILL_POLYGON 40 40 40 160 160 160 160 40)
(COLOR 255)
(SOLID_FILL_POLYGON 50 50 50 150 150 150 150 50)
(END_OF_FILE)
$ slide-info mylib.slb
Type : AutoCAD Slide Library 1.0
Name : mylib
Size : 327
Slides : 1
$ slide-info --what=names mylib.slb
SQUARE
$ slide-info --what=all mylib.slb
Info:
Type : AutoCAD Slide Library 1.0
Name : mylib
Size : 327
Slides : 1
Names:
SQUARE
$ slidelib-import mylib.slb triangle.sld
$ slide-info --what=all mylib.slb
Info:
Type : AutoCAD Slide Library 1.0
Name : mylib
Size : 494
Slides : 2
Names:
SQUARE
TRIANGLE
$ slidelib-import mylib.slb *.sld
$ slidelib-export mylib.slb square
$ slidelib-export --all mylib.slb
$ slidelib-delete mylib.slb triangle
$ slide-info --what=all mylib.slb
Info:
Type : AutoCAD Slide Library 1.0
Name : mylib
Size : 327
Slides : 1
Names:
SQUARE
$ slide-convert --to=png square.sld
$ slide-convert --to=svg mylib.slb square
Draw slide on Cairo surface
$ slide-view square.sld
$ slide-view mylib.slb square
$ slile-view mylib.slb 0
Draw slide on Cairo surface via GObject Introspection
$ export LD_LIBRARY_PATH=$PWD/install/lib GI_TYPELIB_PATH=$PWD/install/lib/girepository-1.0
$ python3 -m venv env
$ source env/bin/activate
$ pip3 install -r test/requirements.txt
$ python3 test/gtk-cairo-test.py
The project is licensed under the GNU General Public License v3.0 or later. See LICENSE or https://spdx.org/licenses/GPL-3.0-or-later.html for full license information.