The VRR Programmer's Manual
Table of Contents
The VRR Programmer's Manual
1 Introduction
1.1 About this manual
1.2 Developers' center
1.3 Project background
1.3.1 The original idea
1.3.2 Development history
1.3.3 The present situation
1.3.4 Acknowledgement
2 Development tools
2.1 Source tree
2.2 Bug tracking system
2.3 Project building system
2.3.1 Directory structure preview
2.3.2 Configure script
2.3.3 Makefiles
2.4 Main programming language
2.5 Scripting language
2.6 External programs
2.6.1 Libraries
2.6.1.1 GTK+ library
2.6.1.2 Guile library
2.6.1.3 LibKPathSea library
2.6.1.4 FontConfig
2.6.1.5 Zlib library
2.6.1.6 LibXML library
2.6.1.7 LibPaper library
2.6.1.8 FreeType library
2.6.1.9 Cairo library
2.6.2 Other tools
2.6.2.1
GNU
make
2.6.2.2 Autoconf
2.6.2.3
GNU
awk
2.6.2.4 Perl
2.6.2.5 pdfTeX
3 Project structure overview
3.1
VRRLIB
3.2
GEOMLIB
3.3 Kernel
3.4
GUI
3.5
VCL
3.6
FONTLIB
3.7 Plugins
3.8 Export
3.9 Import
3.10 Scheme
4
VRRLIB
4.1 Main project header
4.2 Logging and debugging
4.3 Memory allocation
4.4 Sorter
4.5 Data structures
4.5.1 Hash table
4.5.2 AVL-Tree
4.5.3 Cache
4.5.4 Linked lists
4.5.5 Growing array
4.6 Miscellanea
5
GEOMLIB
5.1 Overview
5.1.1 Purpose
5.1.2 Error handling
5.1.3 Floating-point arithmetic
5.1.4 Functions input and output
5.1.5 Header files
5.1.6 Self-testing code
5.2 Numerical algorithms
5.2.1 Polynomials in power form
5.2.2 Polynomials in Bernstein form
5.2.3 Matrix routines
5.2.4 Points and vectors
5.2.5 Affine transformations
5.2.5.1 Transformation structure
5.2.5.2 Two-directional transformation structure
5.3 R*-Tree
5.3.1 Structures
5.3.2 Data insertion
5.3.3 Data deletion
5.3.4 Data updates
5.3.5 Rectangular queries
5.3.6 Dynamic rectangular queries
5.3.7 Center pass algorithm
5.4 Objective programming
5.4.1 Introduction
5.4.2 Definition of a new class
5.4.3 Initialization and destruction
5.4.4 Virtual methods
5.4.5 Class hierarchy
5.5 Common curves interface
5.5.1 Items and groups
5.5.2 Curves
5.5.3 Parametrizations
5.5.3.1
TIME
5.5.3.2
BTIME
5.5.3.3
ATIME
5.5.3.4
RATIME
5.5.4 Geometrical methods
5.6 Elementary curves
5.6.1 Rational Bézier curves
5.6.1.1 Definitions
5.6.1.2 Properties of rational Bézier curves
5.6.1.3 Recursive subdivision
5.6.1.4 Evaluation of points and derivation vectors
5.6.1.5 Euclidean arc length
5.6.1.6 Points with a given tangent
5.6.1.7 Bounding box
5.6.1.8 Curve points in a given distance to a point
5.6.1.9 Curve point nearest to a given point
5.6.1.10 Intersections
5.6.1.11 Degree elevation
5.6.2 Segments
5.6.3 Elliptic arcs
5.6.3.1 Definitions
5.6.3.2 Normalized form
5.6.3.3 Initialization
5.6.3.4 Bézier expansion
5.6.3.5 Affine transformation
5.7 Compound paths
5.7.1 Class path
5.7.2 Class fpath
5.8 Special curve types
5.8.1 Point item
5.8.2 Callback-expansion item
6 Kernel
6.1 Kernel overview
6.2 Objects
6.2.1 The object hierarchy
6.2.2 Graphic objects
6.2.2.1 Point
6.2.2.2 Segment
6.2.2.3 Bézier curve
6.2.2.4 Elliptic arc
6.2.2.5 Parametric point
6.2.2.6 Intersection point
6.2.2.7 Text and TeX text
6.2.2.8 Decoration point
6.2.2.9 Arrow
6.2.3 Groups
6.2.4 Paths
6.2.5 Pages
6.2.6 Linking and unlinking
6.3 Transactions and topological sorting
6.3.1 How to use transactions
6.3.2 Undo histories
6.3.3 Geometric dependencies and topological sorting
6.3.4 Using topological sorting
6.4 Hooks
6.4.1 Object hooks
6.4.2 GO hooks
6.4.3 Transaction hooks
6.4.4 Unit hooks
6.5 Properties
6.5.1 Property types and subtypes
6.5.2 Units
6.5.3 Virtual properties
6.6 Clipboard
6.7 Strings
7
GUI
7.1 GUI Overview
7.2 Windows
7.2.1 The View
7.2.2 The Universe Browser
7.2.3 The Property Editor
7.2.4 The Text Editor
7.2.5 The Global Settings
7.2.6 The Undo History Window
7.2.7 The Unit Manager
7.2.8 The Plugin Manager
7.3 The Command Structure
7.3.1 The Context
7.3.2 Command Definitions
7.3.3 Command Editing Actions
7.3.4 Plugin Menu Functions
7.4 The Visualisation
7.5 The GO Factory
7.5.1 State definitions
7.5.1.1 Snap result states
7.5.1.2 Property value states
7.5.2 Transitions between states
7.5.3 Usage of Undo Items
7.5.4 Snap
7.6 Property Editor Widgets
7.6.1 Property Structure Definitions
7.6.2 Unit Lists
7.6.3 Hook Handling and Transactions
7.6.4 Property Recycler
7.7 Transformation Tools and Mouse Event Processing
7.7.1 Step-by-step Transformations
7.7.2 The Experimental Fifi
7.8 Special GTK Objects and Widgets Used
7.8.1 The GtkTreeModel Interface for Internal Structures
7.8.2 Rulers
7.8.3 Color Selection Dialog
8
VCL
8.1 VCL Overview
8.1.1 The purpose of VCL
8.1.2 VCL general usage
8.1.3 Transformations
8.1.4 Interface sightseeing tour
8.1.5 Propagation
8.1.6 VCL Properties
8.1.7 Alive and dead objects
8.1.8 Naming, programming and documentation conventions
8.2 Interface reference
8.2.1 Interface overview
8.2.2 Composite interface
8.2.3 Container interface
8.2.4 Enclosure interface
8.2.5 Mask interface
8.2.6 Node interface
8.2.7 Object interface
8.2.8 Painter interface
8.2.9 Placement interface
8.2.10 Shape interface
8.2.11 Transformation interface
8.3 Class reference
8.3.1 Class overview
8.3.2 Char class
8.3.3 Grid class
8.3.4 Path class
8.3.5 Rect class
8.3.6 Segment class
8.3.7 String class
8.3.8 Affinity class
8.3.9 Group class
8.3.10 Lazy-expanding-area class
8.3.11 Offset class
8.3.12 Property class
8.3.13 TeX-layout
8.3.14 Text-layout
8.3.15 Canvas class
8.3.16 Painter-cairo class
8.3.17 Painter-plainx class
8.4 VCL Miscellanea
8.4.1 Object system implementation
8.4.2 vcl-rectangle
8.4.3 vcl-growing-array
8.4.4 vcl-context
8.4.5 Packed colors
9
FONTLIB
9.1
FONTLIB
overview
9.2
FONTLIB
programmers usage
9.3 FreeType library usage
9.4 Supported font formats
9.4.1 PostScript Type1 fonts
9.4.1.1 Type1 PFA fonts
9.4.1.2 Type1 PFB fonts
9.4.2 TrueType fonts
9.4.3 PostScript Type42 fonts
9.5 Font rendering
9.6 Font conversions
9.6.1 PFA to PFB conversion
9.6.2 PFB to PFA conversion
9.6.3 TrueType to Type42 conversion
9.7 Other
FONTLIB
functionality
10 Plugins
10.1 Plugin mechanism implementation
10.2 Rules for writing plugins
10.3 Implemented plugins
10.4
GUI
Plugin Interface
10.4.1 Basic Features for Plugins
10.4.2 How to Avoid Plugin Problems
10.4.3 An Example of a
GUI
Plugin
11 Export
11.1 PostScript export
11.1.1 Encapsulated PostScript
11.2 PDF export
11.3 SVG export
12 Import
12.1 DVI import
12.2 IPE import
12.3 SVG import
13 Scheme
13.1 Scheme kernel data types
13.2 Scheme
GUI
data types
13.3 Scheme bindings for VRR functions
13.4 Scheme snarfing
13.5 Scheme modules
13.6 Scheme exceptions and transactions
14 Documentation
14.1 Building manuals
14.2 Building source code documentation
15 Future plans
15.1
VRRLIB
15.2
GEOMLIB
15.3 Kernel
15.4
GUI
15.5
VCL
15.6
FONTLIB
15.7 Plugins
15.8 Export and Import
15.9 Scheme
15.10 Other
Appendix A License
A.1 GNU GENERAL PUBLIC LICENSE
Preamble
Index
Next:
Introduction
, Up:
(dir)
The VRR Programmer's Manual
Introduction
: The basic principles behind the VRR guts
Development tools
: What we used for the development
Project structure overview
: The main project parts in brief
VRRLIB
: Underlying low-level library
GEOMLIB
: Geometrical library
Kernel
: Main data structures and principles
GUI
: User interface
VCL
: Rendering routines
FONTLIB
: Font handling
Plugins
: VRR extension modules mechanism
Export
: How VRR exports data
Import
: How VRR imports data
Scheme
: Scripting language
Documentation
: Also documentation system needs to be documented
Future plans
: What we plan to improve/add/change in the future
License
: The distribution and usage terms
Index
: Index