This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project gfxprim.git.
The branch, master has been updated via 54d4ce312d1bff5105486a429ab4dc326408908b (commit) via bb4d5c588bb10bfc481e1f767406054f11c47f44 (commit) via a6f2101f0ee7bec3d15f1a03fa40cf712f375218 (commit) via d0214b0c148d1489af0fe551953665f6c840cd26 (commit) from af3ab64dd671ec59cc44f58490401b96f48c66bc (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- http://repo.or.cz/w/gfxprim.git/commit/54d4ce312d1bff5105486a429ab4dc3264089...
commit 54d4ce312d1bff5105486a429ab4dc326408908b Author: Cyril Hrubis metan@ucw.cz Date: Fri Oct 18 23:48:07 2013 +0200
build: Add --mandir to configure and install.mk
Now spiv is installed by make target rather than by the ugly install.sh script, also prepare for man page installation.
Signed-off-by: Cyril Hrubis metan@ucw.cz
diff --git a/Makefile b/Makefile index 33cc33c..2747b51 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,7 @@ TOP_MAKE=1 ifneq ($(MAKECMDGOALS),install) SUBDIRS=include libs tests pylib demos build else -SUBDIRS=pylib +SUBDIRS=pylib demos endif
libs: include diff --git a/configure b/configure index 5af836e..2e8164b 100755 --- a/configure +++ b/configure @@ -312,7 +312,8 @@ if __name__ == '__main__': 'prefix' : ['', 'Installation prefix'], 'bindir' : ['/usr/bin', 'Where to install binaries'], 'libdir' : ['', 'Where to install libraries'], - 'includedir' : ['/usr/include', 'Where to install headers']} + 'includedir' : ['/usr/include', 'Where to install headers'], + 'mandir' : ['/usr/share/man', 'Where to install man pages']}
# # Library detection/enable disable diff --git a/demos/spiv/Makefile b/demos/spiv/Makefile index 80cfa29..4fc57aa 100644 --- a/demos/spiv/Makefile +++ b/demos/spiv/Makefile @@ -11,8 +11,12 @@ LDLIBS+=$(LDLIBS_LOADERS) $(LDLIBS_BACKENDS)
APPS=spiv
+INSTALL_BIN=spiv +#INSTALL_MAN=spiv.1 + spiv: cpu_timer.o image_cache.o image_list.o image_actions.o spiv_help.o image_loader.o cfg.o spiv_config.o
include $(TOPDIR)/app.mk +include $(TOPDIR)/install.mk include $(TOPDIR)/post.mk diff --git a/install.sh b/install.sh index 0b3020a..14c9835 100755 --- a/install.sh +++ b/install.sh @@ -40,4 +40,3 @@ done echo "INSTALL binaries" install -m 775 -d "$BIN_LOC" install -m 755 gfxprim-config "$BIN_LOC" -install -m 755 demos/spiv/spiv "$BIN_LOC"
http://repo.or.cz/w/gfxprim.git/commit/bb4d5c588bb10bfc481e1f767406054f11c47...
commit bb4d5c588bb10bfc481e1f767406054f11c47f44 Author: Cyril Hrubis metan@ucw.cz Date: Fri Oct 18 23:20:24 2013 +0200
pywrap: text: Do not wrap GP_Print and GP_VPrint
Python has it's own way of producing formatted strings, moreover trying to wrap these produces build errors.
Signed-off-by: Cyril Hrubis metan@ucw.cz
diff --git a/pylib/gfxprim/text/text.i b/pylib/gfxprim/text/text.i index 485c31c..7134eec 100644 --- a/pylib/gfxprim/text/text.i +++ b/pylib/gfxprim/text/text.i @@ -11,6 +11,8 @@
%ignore GP_GlyphBitmap::bitmap; %ignore GP_FontFace::glyph_offsets; +%ignore GP_Print; +%ignore GP_VPrint; %include "GP_Text.h" %include "GP_Font.h" %include "GP_DefaultFont.h"
http://repo.or.cz/w/gfxprim.git/commit/a6f2101f0ee7bec3d15f1a03fa40cf712f375...
commit a6f2101f0ee7bec3d15f1a03fa40cf712f375218 Author: Cyril Hrubis metan@ucw.cz Date: Fri Oct 18 23:14:14 2013 +0200
tests: Makefile: Fix parallel build.
Add missing framework dependency.
Signed-off-by: Cyril Hrubis metan@ucw.cz
diff --git a/tests/Makefile b/tests/Makefile index 56d5c28..799b033 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -7,5 +7,6 @@ loaders: framework gfx: framework core: framework filters: framework +input: framework
include $(TOPDIR)/post.mk
http://repo.or.cz/w/gfxprim.git/commit/d0214b0c148d1489af0fe551953665f6c840c...
commit d0214b0c148d1489af0fe551953665f6c840cd26 Author: Cyril Hrubis metan@ucw.cz Date: Fri Oct 18 00:15:23 2013 +0200
doc: Redo the pages style, new logo, etc.
Signed-off-by: Cyril Hrubis metan@ucw.cz
diff --git a/doc/Makefile b/doc/Makefile index c07d94a..a9121f7 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -1,10 +1,10 @@ -SOURCES=general.txt context.txt loaders.txt filters.txt basic_types.txt - drawing_api.txt backends.txt gamma.txt grabbers.txt - environment_variables.txt debug.txt core.txt api.txt input.txt +SOURCES=index.html about.txt context.txt loaders.txt filters.txt + basic_types.txt gfx.txt backends.txt gamma.txt grabbers.txt + environment_variables.txt debug.txt core.txt input.txt gen.txt pixels.txt coordinate_system.txt coding_style.txt - get_put_pixel.txt blits.txt progress_callback.txt text_api.txt + get_put_pixel.txt blits.txt progress_callback.txt text.txt event_queue.txt compilation.txt filters_resize.txt - filters_dithering.txt filters_python.txt + filters_dithering.txt filters_python.txt spiv.txt
SOURCES+=core_python.txt gfx_python.txt loaders_python.txt backends_python.txt
@@ -24,7 +24,7 @@ PAGES+=$(subst .txt,.html,$(EXAMPLE_SOURCES))
.PHONY: toolcheck clean
-all: toolcheck examples.html $(PAGES) api.html +all: toolcheck examples.html $(PAGES)
$(PAGES): asciidoc.conf
@@ -74,5 +74,3 @@ CLEAN+=$(PAGES)
clean: rm -f $(CLEAN) - rm -f api_links.html api.html examples.html - rm -f api.xml api.fo api.pdf diff --git a/doc/general.txt b/doc/about.txt similarity index 90% rename from doc/general.txt rename to doc/about.txt index a2a9167..fc4d176 100644 --- a/doc/general.txt +++ b/doc/about.txt @@ -1,15 +1,15 @@ General information -=================== +-------------------
Gfxprim is simple modular 2D bitmap graphics library with emphasis on speed and correctness.
-One of the key points of the library is meta-programming. Most of the -operations and filters are written in http://jinja.pocoo.org/%5BJinja] -templating language that is used to generate specialized code in C -programmming language. Creating code that works with less usuall pixel types -should be as easy as adding pixel definition into the configuration and -rebuilding the library. Read more link:gen.html[here]. +One of the key points of the library are code generators. Most of the +graphics operations are written using http://jinja.pocoo.org/%5BJinja] +templating engine which is used to create specialized C code. So, +for an example, once you add pixel definition into configuration file, +creating specialized filters, loaders and conversions to other pixel +formats is just a matter of typing +make rebuild+.
Core ---- @@ -21,9 +21,9 @@ The most important part of the core is link:context.html[CP_Context] structure that represents in-memory pixmap.
The Core also contains generated code for basic operations such as -link:get_put_pixel.html[GetPixel] and link:get_put_pixel.html[PutPixel] and -optimized functions for writing continous line of pixels 'GP_WritePixels' that -are base for the more complex drawing primitives in GFX or for graphics +link:get_put_pixel.html[GP_GetPixel] and link:get_put_pixel.html[GP_PutPixel] +and optimized functions for writing continous line of pixels 'GP_WritePixels' +that are base for the more complex drawing primitives in GFX or for graphics operations in Filters.
link:blits.html[Blits] are functions used to copy part of one bitmap into @@ -48,7 +48,7 @@ that are used from different parts of the library. Gfx ---
-link:drawing_api.html[Gfx] is part of the library that implements basic +link:gfx.html[Gfx] is part of the library that implements basic graphics primitives such as lines, circles, polygons, etc. Clasicall primitives are nearly finished. Work on anti aliased primitives has been started. @@ -56,7 +56,7 @@ started. Text ----
-link:text_api.html[Text] part of the library implements basic support for +link:text.html[Text] part of the library implements basic support for printing text into the bitmap. There are two bitmap fonts compiled directly into the library and we support True Type fonts through link:http://freetype.org%5BFreeType] (so far ASCII printable characters only). diff --git a/doc/api.txt b/doc/api.txt deleted file mode 100644 index 709bb92..0000000 --- a/doc/api.txt +++ /dev/null @@ -1,86 +0,0 @@ -GFXprim API ------------ - -. link:basic_types.html[Basic library types] - + - Describes how colors and pixels are handled also describes progress callback - in great detail. - + -. link:coordinate_system.html[Coordinate system] - + - Describes briefly coordinate system and relation to pixels. - + -. link:core.html[Library Core overview] - + - Describes functions and macros in library core. - + -. link:pixels.html[Pixel Types] - + - Describes pixel types. - + -. link:debug.html[Debug Messages] - + - Interface to debug layer. - + -. link:context.html[Context] - + - The Context is description of in-memory bitmap including some meta-data - (size, pixel format, etc...). - + -. link:environment_variables.html[Environment Variables] - + - Description of environment variables that affects GFXprim behavior. - + -. link:gamma.html[Gamma correction] - + - The gama correction description and handling in GFXprim. - + -. link:drawing_api.html[Drawing primitives] - + - Drawing API for primitives such as lines, polygons and circles as well as - text drawing. - + -. link:filters.html[Context filters] - + - Context filters, basically all algorithms that takes an Context as an input - and returns Context as output. - + - Includes resampling, convolutions, low pass (blur) filters, dithering and - more. - + -. link:loaders.html[Context loaders] - + - Handles loading and saving images in standard formats. - + -. link:backends.html[Backends] - + - Backends API for drawing on the screen or into a window. - + -. link:input.html[Input Events] - + - Input event handling such as key presses, mouse coordinates, touchscreens - and window manager events such as window close or window resize. - + -. link:grabbers.html[Grabbers] - + - Video grabbers interface such as V4L2. - + - -TIP: There is also a nice page with code link:examples.html[examples]. - -GFXprim Internals ------------------ - -. link:gen.html[Templating engine] - + - Describes structure and basic usage of the templating engine (C code - generator). - + - -Development ------------ - -. link:coding_style.html[Coding Style] - + - C and Python coding style. - + diff --git a/doc/asciidoc.conf b/doc/asciidoc.conf index 4f58bfc..4cc241a 100644 --- a/doc/asciidoc.conf +++ b/doc/asciidoc.conf @@ -22,101 +22,63 @@ endif::quirks[] ifdef::pygments[<link rel="stylesheet" href="{stylesdir=.}/pygments.css" type="text/css" />] ifdef::toc2[<link rel="stylesheet" href="{stylesdir=.}/toc2.css" type="text/css" />] <link rel="stylesheet" href="{stylesdir=.}/{stylesheet}" type="text/css" /> -ifndef::disable-javascript[] -<script type="text/javascript" src="{scriptsdir=.}/asciidoc.js"></script> -<script type="text/javascript"> -# Escape as CDATA to pass validators. -/*<![CDATA[*/ -asciidoc.install({toc,toc2?{toclevels}}); -/*]]>*/ -</script> -endif::disable-javascript[] {docinfo1,docinfo2#}{include:{docdir}/docinfo.html} {docinfo,docinfo2#}{include:{docdir}/{docname}-docinfo.html} </head> -<body class="{doctype}" style="max-width:55em; margin-left: auto; margin-right: auto;"> - -# Article, book header. -# Left menu -<div class="left-menu"> - <h4>Navigation</h4> - <ul> - <li><a href="general.html">Home</a></li> - <li><a href="compilation.html">Compilation</a></li> - </ul> - <h4>API Pages</h4> - <ul> - <li><a href="drawing_api.html">Gfx</a></li> - <li><a href="text_api.html">Text</a></li> - <li><a href="filters.html">Filters</a></li> - <li><a href="loaders.html">Loaders</a></li> - <li><a href="backends.html">Backends</a></li> - <li><a href="input.html">Input</a></li> - </ul> - <h4>Python bindings</h4> - <ul> - <li><a href="core_python.html">Core</a></li> - <li><a href="loaders_python.html">Loaders</a></li> - <li><a href="filters_python.html">Filters</a></li> - <li><a href="gfx_python.html">Gfx</a></li> - <li><a href="backends_python.html">Backends</a></li> - </ul> -</div> - -# Rest of the content - <div class="logo"> - <h1>GFXprim documentation</h1> - </div> - - <div id="header"> - -ifndef::notitle[<h1>{doctitle}</h1>] -ifdef::doctitle[] - <span id="author">{author}</span><br /> - <span id="email"><tt><<a href="mailto:{email}">{email}</a>></tt></span><br /> - <span id="revnumber">version {revnumber}{revdate?,}</span> - <span id="revdate">{revdate}</span> - <br /><span id="revremark">{revremark}</span> -endif::doctitle[] - -ifdef::toc,toc2[{template:toc}] - - </div> - - <div class="content"> - +<body> + <div class="page-container"> + <div class="logo"> + <div class="logo_picture"> + <img src="gfxprim_logo.png" alt="GFXprim"> + </div> + <div class="upper-menu"> + <a href="http://repo.or.cz/w/gfxprim.git">repo.or.cz</a> / + <a href="https://github.com/gfxprim/gfxprim">GitHub</a> / + <a href="about.html">C API</a> / + <a href="core_python.html">Pyton API</a> / + <a href="http://www.ucw.cz/mailman/listinfo/gfxprim">Mailing List</a> + </div> + </div> + <div class="left-menu"> + Navigation + <ul> + <li><a href="index.html">Home</a></li> + <li><a href="about.html">About</a></li> + <li><a href="compilation.html">Compilation</a></li> + </ul> + C API Pages + <ul> + <li><a href="gfx.html">Gfx</a></li> + <li><a href="text.html">Text</a></li> + <li><a href="filters.html">Filters</a></li> + <li><a href="loaders.html">Loaders</a></li> + <li><a href="backends.html">Backends</a></li> + <li><a href="input.html">Input</a></li> + <li><a href="grabbers.html">Grabbers</a></li> + </ul> + Python bindings + <ul> + <li><a href="core_python.html">Core</a></li> + <li><a href="loaders_python.html">Loaders</a></li> + <li><a href="filters_python.html">Filters</a></li> + <li><a href="gfx_python.html">Gfx</a></li> + <li><a href="backends_python.html">Backends</a></li> + </ul> + Applications + <ul> + <li><a href="spiv.html">spiv</a></li> + </ul> + </div> + <div id="page-content"> + <h1>{doctitle}</h1>
[footer] - <div id="footer"> - <div id="footer-text"> -template::[footer-text] -</div> -ifdef::badges[] -<div id="footer-badges"> -ifndef::icons[] -Valid <a href="http://validator.w3.org/check?uri=referer">XHTML</a> -and <a href="http://jigsaw.w3.org/css-validator/check/referer">CSS</a>. -endif::icons[] -ifdef::icons[] -<a href="http://validator.w3.org/check?uri=referer"> - <img style="border:0;width:88px;height:31px" - src="http://www.w3.org/Icons/valid-xhtml11-blue" - alt="Valid XHTML 1.1" height="31" width="88" /> -</a> -<a href="http://jigsaw.w3.org/css-validator/"> - <img style="border:0;width:88px;height:31px" - src="http://jigsaw.w3.org/css-validator/images/vcss-blue" - alt="Valid CSS!" /> -</a> -<a href="http://www.mozilla.org/products/firefox/"> - <img style="border:none; width:110px; height:32px;" - src="http://www.spreadfirefox.com/community/images/affiliates/Buttons/110x32/safer.gif" - alt="Get Firefox!" /> -</a> -endif::icons[] -</div> -endif::badges[] -</div> -</div> + </div> + <div> </div> + <div id="footer"> + Current release is <em>1.0.0-rc0</em>. + </div> + </div> + </div> </body> </html> diff --git a/doc/asciidoc.css b/doc/asciidoc.css index 37a9d07..11089de 100644 --- a/doc/asciidoc.css +++ b/doc/asciidoc.css @@ -1,9 +1,7 @@ -/* Shared CSS for AsciiDoc xhtml11 and html5 backends */ - /* Default font. */ body { font-family: Georgia,serif; - background: white; + background: #bbb; }
/* Title font. */ @@ -11,42 +9,47 @@ h1, h2, h3, h4, h5, h6, div.title, caption.title, thead, p.table.header, #toctitle, -#author, #revnumber, #revdate, #revremark, -#footer { +#author, #revnumber, #revdate, #revremark { font-family: Arial,Helvetica,sans-serif; + clear: both; }
body { - margin: 1em 5% 1em 5%; + margin: 1em 10% 1em 10%; }
-a { - color: blue; - text-decoration: underline; +a, a:visited { + color: #333; + font-weight: bolder; + text-decoration: none; } -a:visited { - color: fuchsia; + +a:hover { + font-weight: bolder; + text-decoration: none; + color: OrangeRed ! important; }
em { - font-style: italic; - color: navy; + font-style: normal; + font-weight: 600; + color: #444; }
strong { font-weight: bold; - color: #083194; + color: #223; }
h1, h2, h3, h4, h5, h6 { - color: #527bbd; + color: #334; margin-top: 1.2em; margin-bottom: 0.5em; line-height: 1.3; }
h1, h2, h3 { - border-bottom: 2px solid silver; + border-bottom: 2px solid #aaa; } h2 { padding-top: 0.5em; @@ -66,7 +69,7 @@ div.sectionbody { }
hr { - border: 1px solid silver; + border: 1px solid #aaa; }
p { @@ -96,18 +99,11 @@ pre { }
#footer { - font-size: small; - border-top: 2px solid silver; - padding-top: 0.5em; - margin-top: 4.0em; -} -#footer-text { - float: left; - padding-bottom: 0.5em; -} -#footer-badges { - float: right; - padding-bottom: 0.5em; + background-color: #fa0; + text-align: center; + border-top: 1px solid Black; + border-bottom: 1px solid Black; + clear: both; }
#preamble { @@ -115,19 +111,69 @@ pre { margin-bottom: 1.5em; }
-div.left-menu { +div.page-container { + background-color: White; position: relative; - top: 90pt; - left: -110pt; - height: 0; - width: 110pt; }
-div.logo h1 { +div.left-menu { + position: absolute; + left: 1.5em; + top: 190px; + border: 1px solid Black; + background-color: #ddd; + padding-left: 0.5em; + padding-right: 0.5em; + padding-top: 0.5em; +} + +div.left-menu a,a:visited,a:hover { + text-decoration: none; +} + +div.left-menu a,a:visited { + color: #111; +} + +div.left-menu a:hover { + color: OrangeRed; +} + +div.left-menu ul { + padding: 0 0 0 0.4em; +} + +div.left-menu li { + list-style-type: none; +} + +#page-content { + border: 0; + padding-left: 13em; + padding-right: 2em; +} + +div.logo { border-bottom: 0px; margin-top: 1em; - margin-bottom: 0em; - color: gray; + padding-left: 1em; + color: #444; + background-color: #fa0; + border-top: 1px solid Black; + border-bottom: 1px solid Black; + position: relative; +} + +div.logo_picture { + display: inline; +} + +div.upper-menu { + display: inline; + float: right; + position: absolute; + bottom: 0; + right: 1em; }
div.imageblock, div.exampleblock, div.verseblock, @@ -144,12 +190,12 @@ div.admonitionblock { }
div.content { /* Block element content. */ - padding: 0em; + padding: 1em; }
/* Block element titles. */ div.title, caption.title { - color: #527bbd; + color: #444; font-weight: bold; text-align: left; margin-top: 1.0em; @@ -178,7 +224,7 @@ div.sidebarblock > div.content {
div.listingblock > div.content { border: 1px solid #dddddd; - border-left: 5px solid #f0f0f0; + border-left: 5px solid #99a; background: #f8f8f8; padding: 0.5em; } @@ -204,10 +250,6 @@ div.verseblock > div.attribution { padding-top: 0.75em; text-align: left; } -/* DEPRECATED: Pre version 8.2.7 verse style literal block. */ -div.verseblock + div.attribution { - text-align: left; -}
div.admonitionblock .icon { vertical-align: top; @@ -219,7 +261,7 @@ div.admonitionblock .icon { } div.admonitionblock td.content { padding-left: 0.5em; - border-left: 3px solid #dddddd; + border-left: 3px solid #bbc; }
div.exampleblock > div.content { @@ -342,10 +384,6 @@ div.colist td img { margin-top: 0.3em; }
-@media print { - #footer-badges { display: none; } -} - #toc { margin-bottom: 2.5em; } @@ -425,7 +463,7 @@ span.line-through { text-decoration: line-through; } tt { font-family: monospace; font-size: inherit; - color: navy; + color: #333; }
div.tableblock { @@ -433,11 +471,11 @@ div.tableblock { margin-bottom: 1.5em; } div.tableblock > table { - border: 3px solid #527bbd; + border: 3px solid #336; } thead, p.table.header { font-weight: bold; - color: #527bbd; + color: #334; } p.table { margin-top: 0; @@ -454,72 +492,3 @@ div.tableblock > table[frame="vsides"] { border-top-style: none; border-bottom-style: none; } - - -/* - * html5 specific - * - * */ - -.monospaced { - font-family: monospace; - font-size: inherit; - color: navy; -} - -table.tableblock { - margin-top: 1.0em; - margin-bottom: 1.5em; -} -thead, p.tableblock.header { - font-weight: bold; - color: #527bbd; -} -p.tableblock { - margin-top: 0; -} -table.tableblock { - border-width: 3px; - border-spacing: 0px; - border-style: solid; - border-color: #527bbd; - border-collapse: collapse; -} -th.tableblock, td.tableblock { - border-width: 1px; - padding: 4px; - border-style: solid; - border-color: #527bbd; -} - -table.tableblock.frame-topbot { - border-left-style: hidden; - border-right-style: hidden; -} -table.tableblock.frame-sides { - border-top-style: hidden; - border-bottom-style: hidden; -} -table.tableblock.frame-none { - border-style: hidden; -} - -th.tableblock.halign-left, td.tableblock.halign-left { - text-align: left; -} -th.tableblock.halign-center, td.tableblock.halign-center { - text-align: center; -} -th.tableblock.halign-right, td.tableblock.halign-right { - text-align: right; -} - -th.tableblock.valign-top, td.tableblock.valign-top { - vertical-align: top; -} -th.tableblock.valign-middle, td.tableblock.valign-middle { - vertical-align: middle; -} -th.tableblock.valign-bottom, td.tableblock.valign-bottom { - vertical-align: bottom; -} diff --git a/doc/backends.txt b/doc/backends.txt index 197c71e..e124cca 100644 --- a/doc/backends.txt +++ b/doc/backends.txt @@ -1,5 +1,5 @@ Drawing Backends -================ +----------------
Drawing backends provide means to draw on computer screen or into a window. Instead of having one unified initialization interface each backend has it's diff --git a/doc/compilation.txt b/doc/compilation.txt index bd8a1b3..b5eb7fc 100644 --- a/doc/compilation.txt +++ b/doc/compilation.txt @@ -1,43 +1,39 @@ -Compilation ------------ +Dependencies +------------
-GFXprim needs following tools to compile: -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +*Base dependencies*
* C compiler (tested with 'gcc' or 'clang') * GNU make * Python (2.6 or newer) * Jinja2
-Additional dependencies: -~~~~~~~~~~~~~~~~~~~~~~~~ - -Image loaders -^^^^^^^^^^^^^ +*Optional Image loaders*
* libjpeg * libpng * giflib * libtiff +* openjpeg >= 2.0.0 +* zlib (usually installed as libpng dependency)
-Text rendering -^^^^^^^^^^^^^^ +*Optinal Text rendering*
* FreeType
-Backends -^^^^^^^^ +*Optional Backends*
* X11 -* SDL (not recomended, SDL is known to be slow and buggy) +* AA-lib +* SDL-1.2 (not recomended, known to be slow and buggy)
-Python Bindings -^^^^^^^^^^^^^^^ +*Python Bindings*
* Swig +* Python (devel library)
Compilation -~~~~~~~~~~~ +-----------
Once devel packages are installed the compilation is as simple as running +configure+ and +make+. @@ -65,7 +61,7 @@ The +make install+ command will install GFXprim libraries and devel headers into your system.
OpenSUSE & Fedora -~~~~~~~~~~~~~~~~~ +-----------------
Instruction to install required packages on link:http://www.opensuse.org/%5BOpenSUSE]. @@ -78,7 +74,7 @@ Works for link:http://www.fedoraproject.org/%5BFedora] too if you substitute zypper in gcc make python-jinja2 -------------------------------------------------------------------------------
-.Install jpeg and png devel libraries +.Install image devel libraries ------------------------------------------------------------------------------- zypper in libjpeg-devel libpng-devel giflib-devel libtiff-devel ------------------------------------------------------------------------------- @@ -106,7 +102,7 @@ zypper in gcc make python-Jinja2 libjpeg-devel libpng-devel giflib-devel -------------------------------------------------------------------------------
Debian -~~~~~~ +------
Instruction to install required packages on link:http://www.debian.org%5BDebian] and other Debian based distributions. @@ -116,7 +112,7 @@ and other Debian based distributions. apt-get install gcc make python-jinja2 -------------------------------------------------------------------------------
-.Install jpeg and png devel libraries +.Install image devel libraries ------------------------------------------------------------------------------- apt-get install libjpeg-dev libpng-dev libgif-dev libtiff-dev ------------------------------------------------------------------------------- diff --git a/doc/favicon.png b/doc/favicon.png index 3ceab57..ad24515 100644 Binary files a/doc/favicon.png and b/doc/favicon.png differ diff --git a/doc/get_put_pixel.txt b/doc/get_put_pixel.txt index f96354f..3c5e716 100644 --- a/doc/get_put_pixel.txt +++ b/doc/get_put_pixel.txt @@ -12,4 +12,38 @@ GP_Pixel GP_GetPixel(const GP_Context *context, GP_Coord x, GP_Coord y); void GP_PutPixel(GP_Context *context, GP_Coord x, GP_Coord y, GP_Pixel p); --------------------------------------------------------------------------------
-TODO: This is stub. +Gets, puts a pixel value. GP_Pixel is a number which holds a pixel value. + +This functions are clipped, GetPixel outside of the context returns zero, +PutPixel outside the context is no-op. + +This functions honour link:context.html[context rotation flags]. + +Generally these function are safe to use but rather slow in innner cycles. + +[source,c] +-------------------------------------------------------------------------------- +#include <GP.h> +/* or */ +#include <core/GP_GetPutPixel.h> + +GP_Pixel GP_GetPixel_Raw(const GP_Context *context, GP_Coord x, GP_Coord y); + +void GP_PutPixel_Raw(GP_Context *context, GP_Coord x, GP_Coord y, GP_Pixel p); + +/* + * Substitute {{ bpp }} for specific bits per pixel (1BPP_LE, 24BPP, ...) + * + * These macros are generated to core/GP_GetPutPixel.gen.h + */ +GP_Pixel GP_GetPixel_Raw_{{ bpp }}(const GP_Context *c, int x, int y); + +void GP_PutPixel_Raw_{{ bpp }}(GP_Context *c, GP_Coord x, GP_Coord y, + GP_Pixel p); +-------------------------------------------------------------------------------- + +These functions are generally fast, but does not honour context rotation flags +and do not check coordinates. + +They are intended as basic building blocks for other GFX primitives, filters, +etc. diff --git a/doc/drawing_api.txt b/doc/gfx.txt similarity index 84% rename from doc/drawing_api.txt rename to doc/gfx.txt index 948dea0..c311dbf 100644 --- a/doc/drawing_api.txt +++ b/doc/gfx.txt @@ -1,7 +1,25 @@ Drawing primitives ------------------
-NOTE: You may want to see the link:coordinate_system.html[coordinate system] first. +Drawing primitives implements algorithms to draw basic geometric shapes such +as lines, circles, etc. + +You may want to see the link:coordinate_system.html[coordinate system] first. + +Rotation Flags +~~~~~~~~~~~~~~ + +Drawing orientation is affected by the link:context.html[context rotation +flags]. The parameters passed to the functions are transformed accordingly to +the flags before the drawing, which allows for fast and transparent rotated or +mirrored rendering. + + +GetPixel and PutPixel +~~~~~~~~~~~~~~~~~~~~~ + +link:get_put_pixel.html[GetPixel and PutPixel] are implemented in the library +Core.
Fill ~~~~ @@ -11,8 +29,10 @@ Fill void GP_Fill(GP_Context *context, GP_Pixel pixel); --------------------------------------------------------------------------------
-Fills the whole context bitmap with the specified pixel value. This has the -same effect as calling 'GP_FillRect(context, 0, 0, context->w, context->h, pixel)'. +Fills the whole context bitmap with the specified pixel value. + +NOTE: GP_Fill is implemented in the library Core rather than in GFX so that + it's available to all library parts.
Lines ~~~~~ @@ -227,3 +247,25 @@ void GP_FillTetragon(GP_Context *context, GP_Coord x0, GP_Coord y0, --------------------------------------------------------------------------------
Draws a filled tetragon. + +Polygons +~~~~~~~~ + +[source,c] +-------------------------------------------------------------------------------- +void GP_Polygon(GP_Context *context, unsigned int vertex_count, + const GP_Coord *xy, GP_Pixel pixel); +-------------------------------------------------------------------------------- + +Draws a polygon. + +[source,c] +-------------------------------------------------------------------------------- +void GP_FillPolygon(GP_Context *context, unsigned int vertex_count, + const GP_Coord *xy, GP_Pixel pixel); +-------------------------------------------------------------------------------- + +Draws a filled polygon. + +The coordinages are passed in [x0, y0, x1, y1, ...] order, the vertex count +describes a number of nodes, i.e. half of the size of the array. diff --git a/doc/gfxprim_logo.png b/doc/gfxprim_logo.png index bee1c8b..5cf4f68 100644 Binary files a/doc/gfxprim_logo.png and b/doc/gfxprim_logo.png differ diff --git a/doc/gfxprim_logo_prim.png b/doc/gfxprim_logo_prim.png deleted file mode 100644 index 677ee0c..0000000 Binary files a/doc/gfxprim_logo_prim.png and /dev/null differ diff --git a/doc/grabbers.txt b/doc/grabbers.txt index 65dd71d..86bf056 100644 --- a/doc/grabbers.txt +++ b/doc/grabbers.txt @@ -5,8 +5,7 @@ Grabber is an abstraction for a device whose output is a stream of images.
There is currently V4L2 driver that implements a grabber.
-To link against grabbers use +-lGP_grabbers+ or better -+`gfxprim-config --libs-grabbers`+ in your linker flags. +Link with +-lGP_grabbers+ or better +`gfxprim-config --libs-grabbers`+.
TIP: For example usage see grabber link:example_v4l2.html[examples].
diff --git a/doc/index.html b/doc/index.html deleted file mode 100644 index 905c1b7..0000000 --- a/doc/index.html +++ /dev/null @@ -1,92 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> -<html> - <head> - <meta http-equiv="content-type" content="text/html; charset=iso-8859-2"> - <link rel="icon" type="image/png" href="favicon.png"> - <title>GFXprim</title> - <style type="text/css" title="currentStyle" media="screen"> - @import "style.css"; - </style> - </head> - <body> - <div id="body"> - <div id="logo"> - <h1> - <div id="logo_picture"> - <img src="gfxprim_logo.png" alt="GFXprim"> - </div> - <div id="logo_picture_prim"> - <img src="gfxprim_logo_prim.png" alt=""> - </div> - <div id="clever_line"> - <div style="display: block; text-align: right;"> - <img src="asteroids-corner.png" alt="asteroids" style="position: relative; right: 1em;"> - </div> - What would you like to draw today... - </div> - </h1> - </div> - <div id="menu"> - <ul class="menu-tree"> - <li class="menu-tree-item"><a href="general.html">C API</a></li> - <li class="menu-tree-item"><a href="core_python.html">Pyton API</a></li> - <li class="menu-tree-item"><a href="http://www.ucw.cz/mailman/listinfo/gfxprim">Mailing List</a></li> - <li class="menu-tree-item"><a href="https://github.com/gfxprim/gfxprim">GIT (GitHub)</a></li> - <li class="menu-tree-item"><a href="http://repo.or.cz/w/gfxprim.git">GIT (repo.or.cz)</a></li> - <li class="menu-tree-item"><a href="releases/gfxprim_1.0.0-rc0.tar.bz2">Download 1.0.0-rc0</a></li> - </ul> - </div> - <div id="content"> - <h2>GFXprim</h2> - <p> - <i>GFXprim</i> is Open-source modular 2D bitmap graphics library - with emphasis on speed and correctness. - </p> - <h3>License</h3> - <p> - The code is licensed under LGPL 2.1 or (at your opinion) any later. - </p> - <h3>About</h3> - <p> - Once upon the time <i>GFXprim</i> has started as a simple attempt to - replace SDL_gfx which was unusable then. Soon it outgrew the initial - purpose and yielded into a library that could be used as a replacement - for the family of SDL libraries. In contrast with SDL <i>GFXprim</i> is - not aiming for abstracting the operating system interface. Instead of - that <i>GFXprim</i> provides means for keeping the system dependent parts - in well defined and isolated parts. - </p> - <p> - One of the key points of the library are code generators. Most of the - graphics operations are written using <a href="http://jinja.pocoo.org/">jinja</a> - templating engine which is used to create specialized C code. So, - for an example, once you add pixel definition into configuration file, - creating specialized filters, loaders and conversions to other pixel - formats is just a matter of typing "make rebuild". - </p> - <h3>Documentation</h3> - <p> - For more information about features and API look at the - <a href="general.html">documentation</a>. - </p> - <h3>News</h3> - <p> - <h4>The GFXprim version 1.0.0-rc0 has been released!</h4> - Download <a href="http://gfxprim.ucw.cz/releases/gfxprim_1.0.0-rc0.tar.bz2">GFXprim 1.0.0-rc0</a> tarball (without docs). - Or get the code from directly from <a href="http://github.com/gfxprim/gfxprim/">github</a>. - </p> - <h3>Contact</h3> - <p> - We do have a <a href="http://www.ucw.cz/mailman/listinfo/gfxprim">mailing list</a> - and although there is not much of discussion now, we are there and listening. - </p> - </div> - <div id="cleaner"> </div> - <div id="footer"> - <a href="http://repo.or.cz/w/gfxprim.git">repo.or.cz</a> | - <a href="https://github.com/gfxprim/gfxprim">GitHub</a> | - <a href="http://www.ucw.cz/mailman/listinfo/gfxprim">Mailing List</a> - </div> - </div> - </body> -</html> diff --git a/doc/index.txt b/doc/index.txt new file mode 100644 index 0000000..4c3dff5 --- /dev/null +++ b/doc/index.txt @@ -0,0 +1,55 @@ +GFXprim +------- + +'GFXprim' is Open-source modular 2D bitmap graphics library with emphasis on +speed and correctness. + +The goal of the library is to provide simple but powerful API for applications +that needs to work with bitmap graphics. The library itself started as a +simple replacement for 'SDL_gfx' which was unusable at the time and soon it +outgrew the initial purpose and became main topic of the development. + +GFXprim is not tied to a specific graphic system (such as X11) but on the +other hand provides means to interact with them. + +GFXprim can load and save images in variety of formats, operate on the data on +a pixel level, run image filters, render basic shapes or text, open and manage +X11 windows, draw on Linux framebuffer and more. + +GFXprim also comes with link:core_python.html[Python bindings]. + +There are a few example applications included, the most advanced is a +link:spiv.html[spiv] image viewer which is already a full featured +application. + +See the link:about.html[about page] for more detailed information. + +License +------- + +The code is licensed under LGPL 2.1 or (at your opinion) any later. + +Bugs +---- + +Report bugs on the GFXprim +http://www.ucw.cz/mailman/listinfo/gfxprim%5Bmailing list]. +Eventually you can use GitHub +https://github.com/gfxprim/gfxprim/issues%5Bissue tracker]. + +News +---- + +The GFXprim version 1.0.0-rc0 has been released! +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Download +http://gfxprim.ucw.cz/releases/gfxprim_1.0.0-rc0.tar.bz2%5B1.0.0-rc0] tarball (without docs). + +Or get the code from directly from http://github.com/gfxprim/gfxprim/%5Bgithub]. + +Contact +------- + +We do have a http://www.ucw.cz/mailman/listinfo/gfxprim%5Bmailing list] and +although there is not much of discussion now, we are there and listening. diff --git a/doc/spiv.txt b/doc/spiv.txt new file mode 100644 index 0000000..0b36e17 --- /dev/null +++ b/doc/spiv.txt @@ -0,0 +1,31 @@ +spiv +---- + +'spiv' - Simple yet Powerful Image Viewer. + +Spiv is a fast, lightweight and minimalistic image viewer build on the top of +the GFXprim library. + +Spiv is optimized for keyboard control and although you can use your mouse for +some of the actions, everything could be done from the keyboard as well. + +Spiv supports wide range of image formats, currently supported are JPEG, PNG, +GIF, BMP, TIFF, PSP, PPM, JP2 and CBZ (as well general ZIP archives with +images), and more will come in the near future. + +Spiv implements image caches with LRU (last recently used) algorithm which +speeds up subsequent image operations (rotations, going back and forth). + +Spiv can also crawl a directory, there is no need to pass thousand of images +file names via command line arguments. + +Spiv supports variety of video backends (via GFXprim backends) currently these +are X11, Linux Framebuffer, SDL and AAlib. Spiv also supports wide range of +backend pixel types from 1bit Grayscale to 32bit RGB with optional +Floyd-Steinberg dithering (even, for example, from RGB888 to RGB565). + +Spiv implements feh-like image actions, which are short shell scripts with +printf-like modifiers. The modifiers are substituted to current image path, +name, etc. and executed by pressing function keys). + +See 'spiv(1)' man page for more information. diff --git a/doc/style.css b/doc/style.css deleted file mode 100644 index 27fa6f6..0000000 --- a/doc/style.css +++ /dev/null @@ -1,151 +0,0 @@ -body { - background-color: #aaa; - margin: 10pt; - padding-left: 8%; - padding-right: 8%; -} - -h1 { - background-color: transparent; - border-top: 1px solid #bc8517; - border-bottom: 1px solid #bc8517; -} - -h2 { - color: #bc6217; - padding-bottom: .2em; - border-bottom: 1px solid #db7521; - font-weight: bolder; -} - -h3 { - color: Black; - padding-top: 1em; -} - -a, a:visited { - color: #333; - font-style: oblique; - font-weight: bolder; - text-decoration: none; -} - -a:hover { - color: #aaa; - font-style: oblique; - font-weight: bolder; - text-decoration: none; -} - -li { - list-style-type: disc; - margin-bottom: 4px; -} - -pre { - padding: .5em .5em .5em .5em; - border: 1px solid Black; - border-style: dashed; - background-color: #bbc; - display: inline-block; -} - -/* main div */ -#body { - color: Black; - background-color: #ffffc7; -} - -#logo_picture { - position: relative; - top: 0.1em; - left: 0.5em; - display: inline; -} - -#logo_picture_prim { - position: relative; - display: inline; - left: 0.2em; - top: 30px; -} - -#logo { - background-color: #f7e177; -} - -#clever_line { - font-size: 40%; - color: #bc6217; - float: right; - position: relative; - top: 10px; -} - -#content { - padding: 0 2em 1em 12em; -} - -#menu { - float: left; - color: #eee; - width: 10em; - margin: 0em 0em 1em 1em; - padding: 0; - border: 1px solid #bc6217; - background-color: #f7e177; -} - -#cleaner { - clear: both; -} - -#footer { - background-color: #f7e177; - text-align: center; - padding-top: .3em; - padding-bottom: .3em; - color: #bc6217; - border-top: 1px solid #bc6217; - border-bottom: 1px solid #bc6217; -} - -/* text markers */ -#term { - font-variant: small-caps; -} - -#path { - font-style: italic; -} - -#command { - font-style: oblique; -} - -/* right menu basic style */ -.menu-tree { - line-height: 2em; - margin: 0 0 0 1em; - padding: 0; -} - -.menu-tree-item { - font-size: 89%; - display: block; - margin: 0; - padding: 0; -} - -.menu-tree-item a { - font-variant: small-caps; - text-decoration: none; - font-style: normal; - padding-top: 0.2em; - padding-bottom: 0.25em; - color: #db7521; -} - -.menu-tree-item a:hover { - color: #eee; -} diff --git a/doc/text_api.txt b/doc/text.txt similarity index 97% rename from doc/text_api.txt rename to doc/text.txt index 46f93f3..2ade0f5 100644 --- a/doc/text_api.txt +++ b/doc/text.txt @@ -1,16 +1,12 @@ Text ---- - -NOTE: You may want to see the link:coordinate_system.html[coordinate system] first. - -Text -~~~~ - Text drawing is controlled by the <<TextStyle,GP_TextStyle>> structure. This -structure carries the information about font, letter spacing and pixel +structure carries information about font, letter spacing and pixel multiplication and spacing. (If no font is specified, the default mono-space font is used.)
+You may want to see the link:coordinate_system.html[coordinate system] first. + [source,c] -------------------------------------------------------------------------------- #include <GP.h>
-----------------------------------------------------------------------
Summary of changes: Makefile | 2 +- configure | 3 +- demos/spiv/Makefile | 4 + doc/Makefile | 14 +-- doc/{general.txt => about.txt} | 24 ++-- doc/api.txt | 86 --------------- doc/asciidoc.conf | 144 ++++++++++---------------- doc/asciidoc.css | 211 ++++++++++++++++---------------------- doc/backends.txt | 2 +- doc/compilation.txt | 38 +++---- doc/favicon.png | Bin 768 -> 4929 bytes doc/get_put_pixel.txt | 36 ++++++- doc/{drawing_api.txt => gfx.txt} | 48 ++++++++- doc/gfxprim_logo.png | Bin 11242 -> 8112 bytes doc/gfxprim_logo_prim.png | Bin 4751 -> 0 bytes doc/grabbers.txt | 3 +- doc/index.html | 92 ----------------- doc/index.txt | 55 ++++++++++ doc/spiv.txt | 31 ++++++ doc/style.css | 151 --------------------------- doc/{text_api.txt => text.txt} | 10 +-- install.sh | 1 - pylib/gfxprim/text/text.i | 2 + tests/Makefile | 1 + 24 files changed, 359 insertions(+), 599 deletions(-) rename doc/{general.txt => about.txt} (90%) delete mode 100644 doc/api.txt rename doc/{drawing_api.txt => gfx.txt} (84%) delete mode 100644 doc/gfxprim_logo_prim.png delete mode 100644 doc/index.html create mode 100644 doc/index.txt create mode 100644 doc/spiv.txt delete mode 100644 doc/style.css rename doc/{text_api.txt => text.txt} (97%)
repo.or.cz automatic notification. Contact project admin jiri.bluebear.dluhos@gmail.com if you want to unsubscribe, or site admin admin@repo.or.cz if you receive no reply.