Code Monkey home page Code Monkey logo

laxkit's Introduction

THE LAXKIT

Version 0.0.8.1
Released under the LGPL
http://github.com/Laidout/laxkit

WHAT IS IT

The Laxkit is a C++ gui toolkit currently in the form of an Xlib wrapper. It has a number of user interfaces for manipulating various common two dimensional vector art objects like bezier curves with variable widths, gradients, and meshes.

The main driving force behind development is to provide the windowing backend for the desktop publishing program Laidout (http://www.laidout.org).

The goal of the kit is to make the creation of art related programs easy, by providing basic, but adaptible and efficient interfaces that can be used as building blocks for more complex interfaces. Examples of efficiency would be having a lot of configurability in shortcuts, using combinations of key modifiers during mouse actions to change scroll speeds, and providing draggable visual elements to change drawable object properties instead of low level input boxes off to the side.

There is copius documentation of the source accessible through doxygen by running 'make docs'.

COMPILING RELEASES (NOT GIT)

To compile development git source, see the next section.

You will need the development files for:
Imlib2, harfbuzz, freetype2, fontconfig, cairo, x11, ssl, cups, and optionally sqlite3

On Debian systems, you can get them with this command:

apt-get install g++ pkg-config libpng12-dev libreadline-dev libx11-dev libxext-dev libxi-dev libxft-dev libcups2-dev libimlib2-dev libfontconfig-dev libfreetype6-dev libssl-dev libcairo2-dev libharfbuzz-dev libsqlite3-dev

On Fedora, it looks more like this:

sudo dnf install -y cairo-devel cups-devel fontconfig-devel ftgl-devel glibc-headers harfbuzz-devel imlib2-devel lcms-devel libpng-devel libX11-devel libXext-devel libXft-devel libXi-devel mesa-libGL-devel mesa-libGLU-devel openssl-devel readline-devel sqlite-devel xorg-x11-proto-devel zlib-devel GraphicsMagick-c++-devel libstdc++-devel freetype-devel imake

Now simply do:

./configure
make
make install

If you type ./configure --prefix=/your/own/install/path, then the laxkit will get installed in prefix/include, prefix/share/doc, prefix/lib, etc. What files were installed are put into the file install.log.

By default, make install will plop down everything in /usr/local/include and /usr/local/lib. The end result is two libraries:

liblaxkit.a          The laxkit core      
liblaxinterfaces.a   The laxkit interfaces

COMPILING FROM GIT

The development version of the Laxkit is currently kept on github. To access, you will need git installed, as well as all the extra packages listed above. Then do:

git clone http://github.com/Laidout/laxkit.git laxkit-git

cd laxkit-git
./configure 
make
make icons  ##<- this requires you have Inkscape installed
make docs   ##<- optional

By default, running the Laxkit directly from git code will pump out lots of debugging information to the terminal. To prevent this, do make hidegarbage before make.

If you make any changes to include statements in source files, you should run make depends which updates dependency checks when compiling.

CONTRIBUTING

If you are interested in translating, please look in lax/po/README, which gives a rough overview of how to go about that. The Laxkit uses gettext for translations.

Bug reports and reviews are welcome! You can post to Laxkit's github issue tracker: https://github.com/Laidout/laxkit/issues

DOCUMENTATION

The Laxkit source code contains a lot of doxygen style documentation. 'make install' will not generate or install this documentation. You must do that yourself with:

make docs

This uses doxygen to generate lots of docs in the docs/html directory. This assumes you have the dot tool, a part of Graphviz, which generates collaboration diagrams of the classes, which can be very handy. Also, there are some writeups in the documentation, particularly math related to bezier curves and patches, that need latex installed in order to be generated correctly. On Debian systems, as of Feb. 2010, you'll need the texlive-latex-base package.

AUTHORS

Tom Lechner, http://tomlechner.com

laxkit's People

Contributors

tomlechner avatar alexmyczko avatar akisakurai avatar xoryo avatar

Stargazers

Xhark avatar Morgoth avatar Abe Kazemzadeh avatar Martin Kaltenbrunner avatar

Watchers

James Cloos avatar  avatar Julieñ avatar  avatar

laxkit's Issues

freetype dependence fixes

I think the missing FT_done_face error you saw is due to 2nd of the below.

diff --git a/lax/lax-config b/lax/lax-config
index f9cf77f..73da540 100755
--- a/lax/lax-config
+++ b/lax/lax-config
@@ -5,7 +5,7 @@ $LaxkitVersion="0.0.8.1";
 $prefix="/home/tom/p/sourceforge/laxkit/lax";
 $iprefix="/interfaces";

-$imlibflags=`imlib2-config --libs`;
+$imlibflags=`imlib2-config --libs` `freetype-config --libs`;
 $ldsoflags  ="-L/usr/X11R6/lib -lX11 -lm -lXpm -lpng -lcups $imlibflags -llaxinterfaces -llaxkit\n";
 $ldflags="-L/usr/X11R6/lib -lX11 -lm -lXpm -lpng -lcups $imlibflags $prefix$iprefix/liblaxinterfaces.a $prefix/liblaxkit.a\n";
 $cppflags = "";
diff --git a/laxinput/Makefile b/laxinput/Makefile
index e2b66d8..8ac77af 100644
--- a/laxinput/Makefile
+++ b/laxinput/Makefile
@@ -15,7 +15,7 @@ LAXIDIR=$(LAXDIR)/interfaces
 LAXOBJDIR=$(LAXDIR)

 LD=g++
-LDFLAGS= -L/usr/X11R6/lib -lX11 -lm -lcairo   `imlib2-config --libs` -lfontconfig -lXext -lXi -lXft -lssl -L$(LAXDIR) -L$(LAXIDIR)
+LDFLAGS= -L/usr/X11R6/lib -lX11 -lm -lcairo   `imlib2-config --libs` `freetype-config --libs` -lsqlite3 -lfontconfig -lXext -lXi -lXft -lssl -L$(LAXDIR) -L$(LAXIDIR)
 DEBUGFLAGS= -g -Wall
 CPPFLAGS= $(DEBUGFLAGS) -I. -I.. -I$(LAXDIR)/.. -I../include -I../src -I/usr/include/freetype2

Trying to compile laxkit on FreeBSD (fails)

Trying to compile laxkit on FreeBSD with the ultimate objective of compiling Laidout on FreeBSD.

Issue 1: Hardcoded path to cups

FreeBSD% ./configure     
(...)
Checking for cups......You need to install the development package of Cups.

Debugging using truss, it turns out /usr/include/cups is hardcoded:

FreeBSD% truss ./configure --disable-sqlite --relocatable 2>&1 | grep cups
Checking for cups......write(1,"Checking for cups......",23) = 23 (0x17)
fstatat(AT_FDCWD,"/usr/include/cups",0x7fffffffe0f8,0x0) ERR#2 'No such file or directory'

On FreeBSD, the string /usr/include/cups must be changed to /usr/local/include/cups in configure. Then it runs without issues.

A better solution would be not to hardcode this string.

Issue 2: Includes are not found

gmake
(...)
fileutils.cc:815:10: error: use of undeclared identifier 'get_current_dir_name'   

I don't know how to fix this. Adding #define _GNU_SOURCE at the top of the file did not help.

Missing laxzip.cc (guessing)

make: *** No rule to make target 'laxzip.o', needed by 'almostall'. Stop.

When I touchd laxzip.cc and laxzip.h to make empty files, there were errors elsewhere against ZipWriter and ZipReader. Checking out HEAD^ then touching lax/laxzip.cc at least allowed the build to complete.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.