The cl-rsvg2 Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The cl-rsvg2 Reference Manual

This is the cl-rsvg2 Reference Manual, version 0.4.1, generated automatically by Declt version 2.3 "Robert April" on Tue Feb 20 08:16:27 2018 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction

cl-rsvg2 is a Common Lisp binding to RSVG Library to allow rendering
SVGs to Cairo surfaces.

It requires cffi, asdf, cl-cairo2, cl-gtk2, trivial-gray-streams, and
naturally, librsvg.

So far it has been tested against librsvg 2.34.1 with SBCL 1.0.54 under
Ubuntu GNU/Linux.

It is a fork of cl-rsvg by Sasha Kovar which was using cl-cairo instead
of cl-cairo2.  It also uses the cl-gtk2-glib system of cl-gtk2 for a
few definitions that cl-rsvg made itself.  If anyone should want to use
the library but like to avoid this dependency, contact me so I can make
a light version without it.

The mapping was somewhat minimal in cl-rsvg.  I added FFI declarations
for most (non-deprecated) functions of the RSVG Library, but tested only
some of them.  The GdkPixmap functions are in a seperate sytem which
depends upon cl-ftk2-gdk.  The well supported functionaly consists only
of what is required to load SVG files and render them to Cairo.  The
highest level wrappers are DRAW-SVG-DATA and DRAW-SVG-FILE, the later of
which is doing just that.  If you have used some of the untested
functionality and noticed problems, or wish for more functionality,
contact me!

The newest functionality (in highly experimental state) is the
HANDLE-DATA-STREAM class.  As of yet, it is completely untested.
Its purpose is to make it possible to treat a RsvgHandle as a stream,
i.e. feed it data with WRITE-SEQUENCE and WRITE-BYTE.

tests/cairo-test.lisp contains example usage.

See also:
http://developer.gnome.org/rsvg/stable/index.html (Reference Manual)
http://librsvg.sourceforge.net
http://www.cairographics.org
http://common-lisp.net/project/cl-cairo2/

TODO:
* Add docstrings for all exported functions.

Enjoy!
Rörd Hinrichsen 


Next: , Previous: , Up: Top   [Contents][Index]

2 Systems

The main system appears first, followed by any subsystem dependency.


Previous: , Up: Systems   [Contents][Index]

2.1 cl-rsvg2

Maintainer

Rörd Hinrichsen <roerdhh@gmail.com>

Author

Sasha Kovar <sasha-rsvg@arcocene.org>

License

LLGPL

Description

Bindings for RSVG Library.

Version

0.4.1

Dependencies
Source

cl-rsvg2.asd (file)

Components

Next: , Previous: , Up: Top   [Contents][Index]

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

3.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.1 cl-rsvg2.asd

Location

cl-rsvg2.asd

Systems

cl-rsvg2 (system)


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.2 cl-rsvg2/package.lisp

Parent

cl-rsvg2 (system)

Location

package.lisp

Packages

cl-rsvg2


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.3 cl-rsvg2/cl-rsvg2-ffi.lisp

Dependency

package.lisp (file)

Parent

cl-rsvg2 (system)

Location

cl-rsvg2-ffi.lisp

Exported Definitions
Internal Definitions

Previous: , Up: Lisp files   [Contents][Index]

3.1.4 cl-rsvg2/cl-rsvg2.lisp

Dependency

cl-rsvg2-ffi.lisp (file)

Parent

cl-rsvg2 (system)

Location

cl-rsvg2.lisp

Exported Definitions

Next: , Previous: , Up: Top   [Contents][Index]

4 Packages

Packages are listed by definition order.


Previous: , Up: Packages   [Contents][Index]

4.1 cl-rsvg2

Source

package.lisp (file)

Nickname

rsvg2

Use List
Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

5.1 Exported definitions


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.1 Macros

Macro: with-handle (VAR HANDLE) &body BODY
Package

cl-rsvg2

Source

cl-rsvg2.lisp (file)

Macro: with-handle-data-stream (STREAM) &body BODY
Package

cl-rsvg2

Source

cl-rsvg2.lisp (file)

Macro: with-handle-from-data (HANDLE DATA DATA-LEN) &body BODY
Package

cl-rsvg2

Source

cl-rsvg2.lisp (file)

Macro: with-handle-from-file (HANDLE FILESPEC) &body BODY
Package

cl-rsvg2

Source

cl-rsvg2.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.2 Functions

Function: draw-svg SVG &optional CONTEXT
Package

cl-rsvg2

Source

cl-rsvg2.lisp (file)

Function: draw-svg-data DATA DATA-LEN &optional CONTEXT

Draw SVG data on a Cairo surface. DATA needs to be an uint8 C array, and DATA-LEN its length, in bytes. Return the SVGs width and height.

Package

cl-rsvg2

Source

cl-rsvg2.lisp (file)

Function: draw-svg-file FILESPEC &optional CONTEXT

Draw a SVG file on a Cairo surface. Return its width and height.

Package

cl-rsvg2

Source

cl-rsvg2.lisp (file)

Function: draw-svg-sub SVG ID &optional CONTEXT
Package

cl-rsvg2

Source

cl-rsvg2.lisp (file)

Function: handle-close* HANDLE
Package

cl-rsvg2

Source

cl-rsvg2.lisp (file)

Function: handle-get-base-uri HANDLE
Package

cl-rsvg2

Source

cl-rsvg2-ffi.lisp (file)

Function: handle-get-desc HANDLE
Package

cl-rsvg2

Source

cl-rsvg2-ffi.lisp (file)

Function: handle-get-dimension-values HANDLE
Package

cl-rsvg2

Source

cl-rsvg2.lisp (file)

Function: handle-get-metadata HANDLE
Package

cl-rsvg2

Source

cl-rsvg2-ffi.lisp (file)

Function: handle-get-sub-dimension-values HANDLE ID
Package

cl-rsvg2

Source

cl-rsvg2.lisp (file)

Function: handle-get-sub-position-values HANDLE ID
Package

cl-rsvg2

Source

cl-rsvg2.lisp (file)

Function: handle-get-title HANDLE
Package

cl-rsvg2

Source

cl-rsvg2-ffi.lisp (file)

Function: handle-has-sub HANDLE ID
Package

cl-rsvg2

Source

cl-rsvg2-ffi.lisp (file)

Function: handle-new ()
Package

cl-rsvg2

Source

cl-rsvg2-ffi.lisp (file)

Function: handle-set-base-uri HANDLE BASE-URI
Package

cl-rsvg2

Source

cl-rsvg2-ffi.lisp (file)

Function: handle-set-dpi HANDLE DPI
Package

cl-rsvg2

Source

cl-rsvg2-ffi.lisp (file)

Function: handle-set-dpi-x-y HANDLE DPI-X DPI-Y
Package

cl-rsvg2

Source

cl-rsvg2-ffi.lisp (file)

Function: handle-write-data HANDLE BUF COUNT
Package

cl-rsvg2

Source

cl-rsvg2.lisp (file)

Function: set-default-dpi DPI
Package

cl-rsvg2

Source

cl-rsvg2-ffi.lisp (file)

Function: set-default-dpi-x-y DPI-X DPI-Y
Package

cl-rsvg2

Source

cl-rsvg2-ffi.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.3 Generic functions

Generic Function: handle OBJECT
Package

cl-rsvg2

Methods
Method: handle (HANDLE-DATA-STREAM handle-data-stream)

automatically generated reader method

Source

cl-rsvg2.lisp (file)


Previous: , Up: Exported definitions   [Contents][Index]

5.1.4 Classes

Class: handle-data-stream ()
Package

cl-rsvg2

Source

cl-rsvg2.lisp (file)

Direct superclasses
  • trivial-gray-stream-mixin (class)
  • fundamental-binary-output-stream (class)
Direct methods
  • stream-write-byte (method)
  • stream-write-sequence (method)
  • close (method)
  • stream-element-type (method)
  • handle (method)
Direct slots
Slot: handle
Initargs

:handle

Readers

handle (generic function)


Previous: , Up: Definitions   [Contents][Index]

5.2 Internal definitions


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.1 Functions

Function: handle-close HANDLE ERROR
Package

cl-rsvg2

Source

cl-rsvg2-ffi.lisp (file)

Function: handle-get-dimensions HANDLE DIMENSION-DATA
Package

cl-rsvg2

Source

cl-rsvg2-ffi.lisp (file)

Function: handle-get-dimensions-sub HANDLE DIMENSION-DATA ID
Package

cl-rsvg2

Source

cl-rsvg2-ffi.lisp (file)

Function: handle-get-position-sub HANDLE POSITION-DATA ID
Package

cl-rsvg2

Source

cl-rsvg2-ffi.lisp (file)

Function: handle-new-from-data DATA DATA_LEN ERROR
Package

cl-rsvg2

Source

cl-rsvg2-ffi.lisp (file)

Function: handle-new-from-file FILE_NAME ERROR
Package

cl-rsvg2

Source

cl-rsvg2-ffi.lisp (file)

Function: handle-render-cairo HANDLE CR
Package

cl-rsvg2

Source

cl-rsvg2-ffi.lisp (file)

Function: handle-render-cairo-sub HANDLE CR ID
Package

cl-rsvg2

Source

cl-rsvg2-ffi.lisp (file)

Function: handle-write HANDLE BUF COUNT ERROR
Package

cl-rsvg2

Source

cl-rsvg2-ffi.lisp (file)


Previous: , Up: Internal definitions   [Contents][Index]

5.2.2 Classes

Class: dimension-data-tclass ()
Package

cl-rsvg2

Source

cl-rsvg2-ffi.lisp (file)

Direct superclasses
  • translatable-foreign-type (class)
  • foreign-struct-type (class)
Class: position-data-tclass ()
Package

cl-rsvg2

Source

cl-rsvg2-ffi.lisp (file)

Direct superclasses
  • translatable-foreign-type (class)
  • foreign-struct-type (class)

Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   C   F   L  
Index Entry  Section

C
cl-rsvg2.asd: The cl-rsvg2<dot>asd file
cl-rsvg2/cl-rsvg2-ffi.lisp: The cl-rsvg2/cl-rsvg2-ffi<dot>lisp file
cl-rsvg2/cl-rsvg2.lisp: The cl-rsvg2/cl-rsvg2<dot>lisp file
cl-rsvg2/package.lisp: The cl-rsvg2/package<dot>lisp file

F
File, Lisp, cl-rsvg2.asd: The cl-rsvg2<dot>asd file
File, Lisp, cl-rsvg2/cl-rsvg2-ffi.lisp: The cl-rsvg2/cl-rsvg2-ffi<dot>lisp file
File, Lisp, cl-rsvg2/cl-rsvg2.lisp: The cl-rsvg2/cl-rsvg2<dot>lisp file
File, Lisp, cl-rsvg2/package.lisp: The cl-rsvg2/package<dot>lisp file

L
Lisp File, cl-rsvg2.asd: The cl-rsvg2<dot>asd file
Lisp File, cl-rsvg2/cl-rsvg2-ffi.lisp: The cl-rsvg2/cl-rsvg2-ffi<dot>lisp file
Lisp File, cl-rsvg2/cl-rsvg2.lisp: The cl-rsvg2/cl-rsvg2<dot>lisp file
Lisp File, cl-rsvg2/package.lisp: The cl-rsvg2/package<dot>lisp file

Jump to:   C   F   L  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   D   F   G   H   M   S   W  
Index Entry  Section

D
draw-svg: Exported functions
draw-svg-data: Exported functions
draw-svg-file: Exported functions
draw-svg-sub: Exported functions

F
Function, draw-svg: Exported functions
Function, draw-svg-data: Exported functions
Function, draw-svg-file: Exported functions
Function, draw-svg-sub: Exported functions
Function, handle-close: Internal functions
Function, handle-close*: Exported functions
Function, handle-get-base-uri: Exported functions
Function, handle-get-desc: Exported functions
Function, handle-get-dimension-values: Exported functions
Function, handle-get-dimensions: Internal functions
Function, handle-get-dimensions-sub: Internal functions
Function, handle-get-metadata: Exported functions
Function, handle-get-position-sub: Internal functions
Function, handle-get-sub-dimension-values: Exported functions
Function, handle-get-sub-position-values: Exported functions
Function, handle-get-title: Exported functions
Function, handle-has-sub: Exported functions
Function, handle-new: Exported functions
Function, handle-new-from-data: Internal functions
Function, handle-new-from-file: Internal functions
Function, handle-render-cairo: Internal functions
Function, handle-render-cairo-sub: Internal functions
Function, handle-set-base-uri: Exported functions
Function, handle-set-dpi: Exported functions
Function, handle-set-dpi-x-y: Exported functions
Function, handle-write: Internal functions
Function, handle-write-data: Exported functions
Function, set-default-dpi: Exported functions
Function, set-default-dpi-x-y: Exported functions

G
Generic Function, handle: Exported generic functions

H
handle: Exported generic functions
handle: Exported generic functions
handle-close: Internal functions
handle-close*: Exported functions
handle-get-base-uri: Exported functions
handle-get-desc: Exported functions
handle-get-dimension-values: Exported functions
handle-get-dimensions: Internal functions
handle-get-dimensions-sub: Internal functions
handle-get-metadata: Exported functions
handle-get-position-sub: Internal functions
handle-get-sub-dimension-values: Exported functions
handle-get-sub-position-values: Exported functions
handle-get-title: Exported functions
handle-has-sub: Exported functions
handle-new: Exported functions
handle-new-from-data: Internal functions
handle-new-from-file: Internal functions
handle-render-cairo: Internal functions
handle-render-cairo-sub: Internal functions
handle-set-base-uri: Exported functions
handle-set-dpi: Exported functions
handle-set-dpi-x-y: Exported functions
handle-write: Internal functions
handle-write-data: Exported functions

M
Macro, with-handle: Exported macros
Macro, with-handle-data-stream: Exported macros
Macro, with-handle-from-data: Exported macros
Macro, with-handle-from-file: Exported macros
Method, handle: Exported generic functions

S
set-default-dpi: Exported functions
set-default-dpi-x-y: Exported functions

W
with-handle: Exported macros
with-handle-data-stream: Exported macros
with-handle-from-data: Exported macros
with-handle-from-file: Exported macros

Jump to:   D   F   G   H   M   S   W  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables

Jump to:   H   S  
Index Entry  Section

H
handle: Exported classes

S
Slot, handle: Exported classes

Jump to:   H   S  

Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   C   D   H   P   S  
Index Entry  Section

C
cl-rsvg2: The cl-rsvg2 system
cl-rsvg2: The cl-rsvg2 package
Class, dimension-data-tclass: Internal classes
Class, handle-data-stream: Exported classes
Class, position-data-tclass: Internal classes

D
dimension-data-tclass: Internal classes

H
handle-data-stream: Exported classes

P
Package, cl-rsvg2: The cl-rsvg2 package
position-data-tclass: Internal classes

S
System, cl-rsvg2: The cl-rsvg2 system

Jump to:   C   D   H   P   S