资源说明:graph drawing library for c and c++ (linux)
free_graph - graph drawing library for c/c++ (linux)
=====================================================
using this library you can draw a graph of a equation in given x and y range and
write it into a bitmap of given width and height.
compiling source :
------------------
source of the library are include int he "src" directory. to create object code run,
gcc -Wall -c -fpic free_graph.c fg_error.c structs.h
int he commend line. now to create the library files run,
gcc -Wall -shared -o libfree_graph.so free_graph.o fg_error.o structs.h
then the "libfree_graph.so" file will be created.
copy it to the "/usr/lib" directory.
sudo cp libfree_graph.so /usr/lib
now copy "free_graph.h", "fg_structs.h" and "fg_error.h" files to "/usr/include" directory.
sudo cp free_graph.h /usr/include
sudo cp fg_structs.h /usr/include
sudo cp fg_error.h /usr/include
you can also use already compiled library file and header file in lib directory.
copy the to the above directories.
compiling demo :
----------------
you need gtk to compile "demo" . install it by running,
sudo apt-get install libgtk2.0-dev
on terminal. then simply type make. double click on compiled file to run it
using free_graph:
-----------------
use "fg_init" and "fg_clear_graph" before drwaing any thing (graph or grid or lines).
try to use small x and y ranges to make the graph more accurate.
more inf0:
------------------
http://www.inf0warri0r.blogspot.com
tcg.galahena@gmail.com
licenses:
----------
Copyright 2012 Tharindra Galahena
This file is part of free_graph.
free_graph is free software: you can redistribute it and/or modify it under the terms of
the GNU General Public License as published by the Free Software Foundation, either
version 3 of the License, or any later version. free_graph is distributed in the hope
that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
Public License for more details.
You should have received a copy of the GNU General Public License along with free_graph.
If not, see http://www.gnu.org/licenses/.
本源码包内暂不包含可直接显示的源代码文件,请下载源码包。
English
