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 57673b3b830b3d6434956c656d0cec95156314cc (commit) from 8728ce4ba9c41b1ae214808623111c5c869f31ad (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/57673b3b830b3d6434956c656d0cec9515631...
commit 57673b3b830b3d6434956c656d0cec95156314cc Author: Cyril Hrubis metan@ucw.cz Date: Thu Dec 27 01:08:39 2012 +0100
doc: Add word about coordinate system.
diff --git a/doc/Makefile b/doc/Makefile index 7bda21b..35c23aa 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -1,7 +1,7 @@ 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 - gen.txt pixels.txt + gen.txt pixels.txt coordinate_system.txt
EXAMPLE_SOURCES=$(wildcard example_*.txt)
diff --git a/doc/api.txt b/doc/api.txt index 69d460a..a03d282 100644 --- a/doc/api.txt +++ b/doc/api.txt @@ -1,12 +1,19 @@ -GFXprim API -=========== +GFXprim Documentation +===================== Cyril Hrubis metan@ucw.cz
+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. @@ -62,5 +69,14 @@ Cyril Hrubis metan@ucw.cz + Video grabbers interface such as V4L2. + - + +GFXprim Internals +----------------- + +. link:gen.html[Templating engine] + + + Describes structure and basic usage of the templating engine (C code + generator). + + + There is also a nice page with code link:examples.html[examples]. diff --git a/doc/basic_types.txt b/doc/basic_types.txt index 1542083..2d9b342 100644 --- a/doc/basic_types.txt +++ b/doc/basic_types.txt @@ -1,7 +1,7 @@ Basic types ----------- -Coordinates and Size/Length -~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Coordinates and Size and Length +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Most of the drawing functions use typedefed 'GP_Coord' and 'GP_Size' integer types for parameters. diff --git a/doc/coordinate_system.txt b/doc/coordinate_system.txt new file mode 100644 index 0000000..fb3f408 --- /dev/null +++ b/doc/coordinate_system.txt @@ -0,0 +1,11 @@ +Coordinate System +----------------- + +GFXprim uses Cartesian coordinate system. The pixel +(0, 0)+ lies at the upper +left corner of the bitmap and coordinates grows to the right and to the +bottom. The last valid pixel, that still lies in the bitmap of size +w+ and ++h+, occupies coordinates +(w - 1, h - 1)+. The precise position of the point +with integer coordinates is in the middle of the pixel (and borders between +the pixels lies are integers + 0.5). + +image:coordinates-1.svg[Coordinate System] diff --git a/doc/coordinates-1.svg b/doc/coordinates-1.svg new file mode 100644 index 0000000..841444d --- /dev/null +++ b/doc/coordinates-1.svg @@ -0,0 +1,176 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + version="1.1" + width="546.91302" + height="426.914" + id="svg2" + xml:space="preserve"><metadata + id="metadata8">rdf:RDF<cc:Work + rdf:about="">dc:formatimage/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs + id="defs6"><clipPath + id="clipPath18"><path + d="m 0,0 437.5304,0 0,341.5312 L 0,341.5312 0,0 z" + inkscape:connector-curvature="0" + id="path20" /></clipPath></defs><g + transform="matrix(1.25,0,0,-1.25,0,426.914)" + id="g10"><g + id="g12"><g + id="g14"><g + clip-path="url(#clipPath18)" + id="g16"><g + transform="translate(0,341.5312)" + id="g22"><g + transform="translate(3.5304,-339.5312)" + id="g24"><path + d="M 0,0 432,0" + inkscape:connector-curvature="0" + id="path26" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-opacity:1;stroke-dasharray:none" /><path + d="m 0,48 432,0" + inkscape:connector-curvature="0" + id="path28" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-opacity:1;stroke-dasharray:none" /><path + d="m 0,96 432,0" + inkscape:connector-curvature="0" + id="path30" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-opacity:1;stroke-dasharray:none" /><path + d="m 0,144 432,0" + inkscape:connector-curvature="0" + id="path32" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-opacity:1;stroke-dasharray:none" /><path + d="m 0,192 432,0" + inkscape:connector-curvature="0" + id="path34" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-opacity:1;stroke-dasharray:none" /><path + d="m 0,240 432,0" + inkscape:connector-curvature="0" + id="path36" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-opacity:1;stroke-dasharray:none" /><path + d="m 0,288 432,0" + inkscape:connector-curvature="0" + id="path38" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-opacity:1;stroke-dasharray:none" /><path + d="m 0,336 432,0" + inkscape:connector-curvature="0" + id="path40" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-opacity:1;stroke-dasharray:none" /><path + d="M 0,0 0,336" + inkscape:connector-curvature="0" + id="path42" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-opacity:1;stroke-dasharray:none" /><path + d="m 48,0 0,336" + inkscape:connector-curvature="0" + id="path44" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-opacity:1;stroke-dasharray:none" /><path + d="m 96,0 0,336" + inkscape:connector-curvature="0" + id="path46" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-opacity:1;stroke-dasharray:none" /><path + d="m 144,0 0,336" + inkscape:connector-curvature="0" + id="path48" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-opacity:1;stroke-dasharray:none" /><path + d="m 192,0 0,336" + inkscape:connector-curvature="0" + id="path50" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-opacity:1;stroke-dasharray:none" /><path + d="m 240,0 0,336" + inkscape:connector-curvature="0" + id="path52" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-opacity:1;stroke-dasharray:none" /><path + d="m 288,0 0,336" + inkscape:connector-curvature="0" + id="path54" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-opacity:1;stroke-dasharray:none" /><path + d="m 336,0 0,336" + inkscape:connector-curvature="0" + id="path56" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-opacity:1;stroke-dasharray:none" /><path + d="m 384,0 0,336" + inkscape:connector-curvature="0" + id="path58" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-opacity:1;stroke-dasharray:none" /><path + d="m 432,0 0,336" + inkscape:connector-curvature="0" + id="path60" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-opacity:1;stroke-dasharray:none" /><path + d="M 0,336 0,0" + inkscape:connector-curvature="0" + id="path62" + style="fill:none;stroke:#000000;stroke-width:4;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-opacity:1;stroke-dasharray:none" /><path + d="M -1.5304,3.6946 0,0 l 1.5304,3.6946 -3.0608,0 z" + inkscape:connector-curvature="0" + id="path64" + style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:4;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-opacity:1;stroke-dasharray:none" /><path + d="M 0,0 432,0" + inkscape:connector-curvature="0" + id="path66" + style="fill:none;stroke:#000000;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-opacity:1;stroke-dasharray:none" /><path + d="m 432,0 0,336" + inkscape:connector-curvature="0" + id="path68" + style="fill:none;stroke:#000000;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-opacity:1;stroke-dasharray:none" /><path + d="m 0,336 432,0" + inkscape:connector-curvature="0" + id="path70" + style="fill:none;stroke:#000000;stroke-width:4;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-opacity:1;stroke-dasharray:none" /><path + d="M 428.30338,334.46877 432,336 l -3.69662,1.53123 0,-3.06246 z" + inkscape:connector-curvature="0" + id="path72" + style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:4;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-opacity:1;stroke-dasharray:none" /><g + transform="translate(0,341.5312)" + id="g74"><text + transform="matrix(1,0,0,-1,12.1001,-24.0405)" + id="text76"><tspan + x="0 3.8744552 8.8557549 14.940911 19.922211" + y="0" + id="tspan78" + style="font-size:9.96259975px;font-variant:normal;font-weight:normal;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-family:CMR10;-inkscape-font-specification:CMR10">(0,0)</tspan></text> +<g + transform="translate(0,-341.5312)" + id="g80"><path + d="m 24,312 0,0" + inkscape:connector-curvature="0" + id="path82" + style="fill:none;stroke:#000000;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-opacity:1;stroke-dasharray:none" /><g + transform="translate(0,341.5312)" + id="g84"><text + transform="matrix(1,0,0,-1,386.4142,-312.0405)" + id="text86"><tspan + x="0 3.8744552 11.069445 14.389979 19.371279 25.456436 30.991655 34.312191 39.293491" + y="0" + id="tspan88" + style="font-size:9.96259975px;font-variant:normal;font-weight:normal;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-family:CMR10;-inkscape-font-specification:CMR10">(w-1,h-1)</tspan></text> +<g + transform="translate(0,-341.5312)" + id="g90"><path + d="m 408,24 0,0" + inkscape:connector-curvature="0" + id="path92" + style="fill:none;stroke:#000000;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-opacity:1;stroke-dasharray:none" /><g + transform="translate(0,341.5312)" + id="g94"><text + transform="matrix(1,0,0,-1,98.1,-120.9405)" + id="text96"><tspan + x="0 3.8744552 8.8557549 11.623365 16.604666 22.689821 27.671122" + y="0" + id="tspan98" + style="font-size:9.96259975px;font-variant:normal;font-weight:normal;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-family:CMR10;-inkscape-font-specification:CMR10">(1.5,2)</tspan></text> +<g + transform="translate(0,-341.5312)" + id="g100"><path + d="m 96,216 0,0" + inkscape:connector-curvature="0" + id="path102" + style="fill:none;stroke:#000000;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-opacity:1;stroke-dasharray:none" /><g + transform="translate(0,341.5312)" + id="g104" /></g></g></g></g></g></g></g></g></g></g></g></g></svg> No newline at end of file diff --git a/doc/coordinates.mp b/doc/coordinates.mp new file mode 100644 index 0000000..404ff70 --- /dev/null +++ b/doc/coordinates.mp @@ -0,0 +1,40 @@ +% +% Compile to svg by: +% +% mptopdf coordinates.mp; inkscape -l coordinates-1.svg coordinates-1.pdf +% +beginfig(1) + % Draw grid + u := 48; + w := 9; + h := 7; + + for i=0 upto h: + draw (0, i * u) -- (w * u, i * u); + endfor + + for i=0 upto w: + draw (i * u, 0) -- (i * u, h * u); + endfor + + % Draw frame + pair A, B, C, D; + + A = (0, 0); + B = (w * u, 0); + C = (w * u, h * u); + D = (0, h * u); + + drawarrow D -- A withpen pencircle scaled 4; + draw A -- B withpen pencircle scaled 2; + draw B -- C withpen pencircle scaled 2; + drawarrow D -- C withpen pencircle scaled 4; + + % Draw labels + dotlabel.top(btex (0, 0) etex, (u/2, h * u - u/2)); + dotlabel.top(btex (w-1, h-1) etex, (w * u - u/2, u/2)); + + dotlabel.urt(btex (1.5, 2) etex, (2 * u, h * u - 2 * u - u/2)); + +endfig; +end diff --git a/doc/drawing_api.txt b/doc/drawing_api.txt index 0304138..e2e50db 100644 --- a/doc/drawing_api.txt +++ b/doc/drawing_api.txt @@ -1,6 +1,8 @@ Drawing primitives ------------------
+NOTE: You may want to see the link:coordinate_system.html[coordinate system] first. + Fill ~~~~
-----------------------------------------------------------------------
Summary of changes: doc/Makefile | 2 +- doc/api.txt | 22 +++++- doc/basic_types.txt | 4 +- doc/coordinate_system.txt | 11 +++ doc/coordinates-1.svg | 176 +++++++++++++++++++++++++++++++++++++++++++++ doc/coordinates.mp | 40 ++++++++++ doc/drawing_api.txt | 2 + 7 files changed, 251 insertions(+), 6 deletions(-) create mode 100644 doc/coordinate_system.txt create mode 100644 doc/coordinates-1.svg create mode 100644 doc/coordinates.mp
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.