Anti-Grain Geometry (AGG, libagg) は本家ウェブサイトにリファレンス・マニュアルが置いてないっぽいので(ソースコードそのままぐらいしか無い)、 Doxygen で作ってみた。
Doxygen をインストール
Mac OS Snow Leopard に brew で Doxygen をインストール (いちおう Graphviz もインストール)。
$ brew install doxygen
==> Downloading http://ftp.stack.nl/pub/users/dimitri/doxygen-1.7.5.1.src.tar.gz
######################################################################## 100.0%
==> ./configure --prefix /usr/local/Cellar/doxygen/1.7.5.1
==> make
==> make install
/usr/local/Cellar/doxygen/1.7.5.1: 7 files, 10M, built in 5.9 minutes
$ brew install graphviz
==> Downloading http://www.graphviz.org/pub/graphviz/stable/SOURCES/graphviz-2.2
######################################################################## 100.0%
==> Downloading patches
######################################################################## 100.0%
==> Patching
patching file macosx/graphviz.xcodeproj/project.pbxproj
patching file lib/gvc/Makefile.in
patching file plugin/quartz/Makefile.in
==> ./configure --disable-debug --prefix=/usr/local/Cellar/graphviz/2.28.0 --wit
==> make install
==> xcodebuild -configuration Release SYMROOT=build PREFIX=/usr/local/Cellar/gra
==> Caveats
GraphViz.app was installed in:
/usr/local/Cellar/graphviz/2.28.0
To symlink into ~/Applications, you can do:
brew linkapps
==> Summary
/usr/local/Cellar/graphviz/2.28.0: 432 files, 13M, built in 5.7 minutes
$ mkdir ~/Applications
$ brew linkapps
Linking /usr/local/Cellar/graphviz/2.28.0/GraphViz.app
Doxygen を起動してみる。
$ doxygen
Doxyfile not found and no input file specified!
Doxygen version 1.7.5.1
Copyright Dimitri van Heesch 1997-2011
You can use doxygen in a number of ways:
1) Use doxygen to generate a template configuration file:
doxygen [-s] -g [configName]
If - is used for configName doxygen will write to standard output.
2) Use doxygen to update an old configuration file:
doxygen [-s] -u [configName]
3) Use doxygen to generate documentation using an existing configuration file:
doxygen [configName]
If - is used for configName doxygen will read from standard input.
4) Use doxygen to generate a template file controlling the layout of the
generated documentation:
doxygen -l layoutFileName.xml
5) Use doxygen to generate a template style sheet file for RTF, HTML or Latex.
RTF: doxygen -w rtf styleSheetFile
HTML: doxygen -w html headerFile footerFile styleSheetFile [configFile]
LaTeX: doxygen -w latex headerFile footerFile styleSheetFile [configFile]
6) Use doxygen to generate an rtf extensions file
RTF: doxygen -e rtf extensionsFile
If -s is specified the comments in the config file will be omitted.
If configName is omitted `Doxyfile' will be used as a default.
AGG 2.5 をダウンロードして展開
$ wget http://www.antigrain.com/agg-2.5.tar.gz
$ tar zxvf ./agg-2.5.tar.gz
Doxygen の設定ファイルを準備
設定ファイルの雛形を生成。
$ doxygen -g doxyfile4agg
Configuration file `doxyfile4agg' created.
Now edit the configuration file and enter
doxygen doxyfile4agg
to generate the documentation for your project
設定ファイルを弄る前にバックアップコピーしておく。
$ cp ./doxyfile4agg ./doxyfile4agg.org
設定ファイルの必要な箇所を修正して、バックアップしておいたものと比較。
$ diff ./doxyfile4agg.org ./doxyfile4agg
29c29
< PROJECT_NAME =
---
> PROJECT_NAME = "Anti-Grain Geometry - AGG (libagg)"
35c35
< PROJECT_NUMBER =
---
> PROJECT_NUMBER = 2.5
331c331
< EXTRACT_ALL = NO
---
> EXTRACT_ALL = YES
632c632
< INPUT =
---
> INPUT = agg-2.5/src/ agg-2.5/include/
841c841
< HTML_OUTPUT = html
---
> HTML_OUTPUT = htmldocs
AGG のソースコードは agg-2.5/src/ と agg-2.5/include/ の2つのディレクトリ以下にあるので注意。
Doxygen でリファレンス・ドキュメントを生成
$ doxygen ./doxyfile4agg
あ、 latex ディレクトリも生成されちゃった。まぁいいか。
HTML版のリファレンスが設定ファイルで指定した htmldocs ディレクトリに作られる。全部で30MBぐらいの量。
installdox という Perl スクリプトも htmldocs ディレクトリに入っているけど不要っぽいので削除しておく。また、 htmldocs/search には index.html がないので一応ダミーの index.html を置いておく。
出来上がったリファレンスをここに設置。
⇒ Anti-Grain Geometry - AGG (libagg) Documentation 2.5
ちなみに、本家のドキュメントは、このへん。
- Anti-Grain Geometry - AGG (libagg) Reference Manual
- Anti-Grain Geometry - Tips and Tricks
- Anti-Grain Geometry - Research
もうちょっとドキュメントが欲しい。。。
tags: doxygen mac_os_x agg
Posted by NI-Lab. (@nilab)