# AGDoc TestAn example of text in the AGDoc format

 Example of code AGDoc Formatting Paragraphs Bold, Italic, Underline, Quoted, Code, etc... Linking Images Left aligned images Right aligned image Inline images External images

## Introduction

 Anti-Grain Geometry (AGG) is a toolkit written completely in standard and platform independent C++. It can be used in many areas of computer programming where 2D graphics is essential. AGG uses only C++ and standard C runtime functions, such as memcpy(), sin(), cos(), sqrt(), etc. It doesn't even use STL. Thus, AGG can be used in a very large number of applications, including embedded systems.
 Blah-blah blah-blah blah-blah…
 The effect of replacements:
 \AGG \br \TEX \br \DD\br 
 Appears as:

### Subtible of the Introduction

 Most of the graphic libraries have a single class like "Graphics" in GDI+, that has hunded or even thousands of functions. This object can exist implicitly, like in OpenGL.
 … … …

### The Proposal (Another subtitle)

 I would like to break this ancient as mammoth's manure tradition and show you the beauty of stability, lightness, flexibilty, and freedom. Well, you will have to pay something for that. Namely, you will have to pay your attention to understand the concepts that can seem not very conventional at the beginning. For example, it's not that easy to draw a simple line, because a line is rather a complex graphic object in terms of AGG. The simplest object in AGG is a polygon. Well, it's not quite right either, but all in good time.
 … … …

## Example of code

  template void process_element(Consumer& c, std::basic_string& str) { unsigned i; unsigned cmd_idx = 0; std::basic_string name = ""; if(m_name) { for(i = 0; i < m_name_len; i++) name += m_name[i]; } c.begin_element(name.c_str()); str = ""; for(i = 0; i < m_content_len; i++) { if(m_content[i] == element_char) { if(str.length()) { c.content(str.c_str()); str = ""; } if(cmd_idx < m_elements.size()) { m_elements[cmd_idx].process_element(c, str); i += m_elements[cmd_idx].m_total_len; cmd_idx++; } else { throw std::exception("ELEMENT COUNT ERROR"); } } //else //{ // if(m_content[i] != ignore_char) // { // str += m_content[i]; // } //} } if(str.length()) { c.content(str.c_str()); str = ""; } c.end_element(name.c_str()); } 

## AGDoc Formatting

### Paragraphs

 Leave one or more blank lines between paragraphs.

### Bold, Italic, Underline, Quoted, Code, etc...

Wiki-like styleTEX-like styleAppears as
**Bold text**\b{Bold text}Bold text
~~Italic text~~\i{Italic text}Italic text
*~Bold and italic text*~\em{Bold and italic text}Bold and italic text
__Underlined text__\u{Underlined text}Underlined text
==Nonbreaking text==\nobr{Nonbreaking text}Nonbreaking text
''Quoted text''\sq{Quoted text}‘Quoted text’
""Quoted text""\dq{Quoted text}“Quoted text”
<<Quoted text>>\aq{Quoted text}«Quoted text»
Code: $$while(*p++) {...}$$\m{while(*p++) {...}}while(*p++) {...}
Superscript: 2^^3^^ + 10^^2^^ = 1082\sup{3} + 10\sup{2} = 10823 + 102 = 108
Subscript: Cvv2vvHvv5vvOHC\sub{2}H\sub{5}OHC2H5OH
Em dash --\emdash
Copyright (C)\copy©
Registered (R)\reg®
Trademark (TM)\trade
Ellipsis ...\hellip
Degree 15^o15\deg15°
Superscript 1: 3.1415^13.1415\sup13.14151
Superscript 2: O(N^2 log N)O(N\sup2 log N)O(N2 log N)
Superscript 3: M^3M\sup3M3
Plusmiunus: 10.5+-0.310.5\plusmin{}0.310.5±0.3
Leftwards arrow: A->BA\rarr{}BAB
Rightwards arrow: A<-BA\larr{}BAB
Left-right arrow: A<->BA\harr{}BAB
Nonbreaking space: a~_ba\nbsp{}ba b
Table 1. Wiki- and TeX-like style formatting

### Tables

#### Space separated values tables (ssv_table)

 The rows are separated with the new-line character (LF), the cells in the row are separaeted with any number of spaces (whitespace or tab). If you need to have a space between words in one cell use a nonbreaking space, ~_.
 An example:
 \ssv_table[Table 2. Space separated values table; anchor=TAB2] { \th{ Line Style || Pipeline || add_path || sort || render || total } \al{ < > > > > > } Straight~_lines 2.819 21.207 73.599 71.813 169.437 Bezier~_curves 79.656 98.957 62.393 99.161 340.167 Dashed~_curves 99.332 94.182 39.310 73.310 306.134 } 
 Appears as:
Straight lines2.81921.20773.59971.813169.437
Bezier curves79.65698.95762.39399.161340.167
Dashed curves99.33294.18239.31073.310306.134
Table 2. Space separated values table
 Here “\th{...}” means “Table Header”, “\al{...}” — “Alignments of the Columns”. Both of these elements are optional. The columns of the header must be separated with double vertical bars (||). The “Alignment” extracts the following characters from the line: '<', '>', '|', '-', ignoring all other ones. They mean:
 '<' — “Left Alignment” (by default) '>' — “Right Alignment” '|' — “Centered” '-' — “Justified”
 Each character corresponds to the respective column. You can change the alignment in a separate cell in the folowing way:
 <|Cell Content — “Left Alignment” Cell Content|> — “Right Alignment” <|Cell Content|> — “Centered” <-Cell Content-> — “Justified”
 The same rules about the table header and the alignments are applicable to the other types of tables (see below).

#### Vertical bar separated tables (vbar_table)

 An example:
 \vbar_table[Table 3. Vertical bar separated table; anchor=TAB3] { \th{==Test Type==||Action ||Required to Pass} compile ||compile only ||Compiler returns 0. compile-fail ||compile only ||Compiler must return non-zero. link ||compile, link ||Both compiler & linker return 0. link-fail ||compile, link ||Either the compiler or linker must return non-zero. run ||compile, link, execute ||Compiler, linker, and executable must all return 0. run-fail ||compile, link, execute ||Both compiler and linker must return 0, and the executable must return non-zero. } 
 Appears as:
Test TypeActionRequired to Pass
compilecompile onlyCompiler returns 0.
compile-failcompile onlyCompiler must return non-zero.
run-failcompile, link, executeBoth compiler and linker must return 0, and the executable must return non-zero.
Table 3. Vertical bar separated table

#### Empty line separated tables (eln_table)

 An example:
 \eln_table[Table 4. Empty line separated table; anchor=TAB4] { \th{==Test Type== || Action || Required to Pass || Description and Use } \al{< < < - } compile compile only Compiler returns 0. Verify that a source file will compile correctly, but without any attempt to link or execute. Used when factors such as possible object library unavailability make a run test impractical. ---- ==compile-fail== compile only Compiler must return non-zero. Verify that a source file fails to compile. Used to verify that an expected compile-time error was detected. ---- link compile, link Both compiler & linker return 0. Verify that a source file will compile and link correctly, but without any attempt to execute the result. Used when factors such as possible data file unavailability make a run test impractical. ---- link-fail compile, link Either the compiler or linker must return non-zero. Verify that a source file fails to compile and link. Used to verify that error detect which depends on unresolved externals works correctly. } 
 Appears as:
Test TypeActionRequired to PassDescription and Use
compilecompile onlyCompiler returns 0.Verify that a source file will compile correctly, but without any attempt to link or execute. Used when factors such as possible object library unavailability make a run test impractical.
compile-failcompile onlyCompiler must return non-zero.Verify that a source file fails to compile. Used to verify that an expected compile-time error was detected.
linkcompile, linkBoth compiler & linker return 0.Verify that a source file will compile and link correctly, but without any attempt to execute the result. Used when factors such as possible data file unavailability make a run test impractical.
link-failcompile, linkEither the compiler or linker must return non-zero.Verify that a source file fails to compile and link. Used to verify that error detect which depends on unresolved externals works correctly.
Table 4. Empty line table

 http://www.antigrain.com \br ftp://www.antigrain.com \br \href [http://www.antigrain.com] {==Anti-Grain Geometry img://inline_image.png ==} \br mailto:joe_sixpack@somewhere_on_the.moon \br \download [http://www.antigrain.com/agg2.zip] { Latest AGG snapshot } 

### Images

#### Left aligned images

 some text some text some text some some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text.

 Left Image
some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text.

#### Right aligned image

 some text some text some text some text some some text some text some text some text some text some text some text some some text some text some text some text some text some text some text some some text some text some text some text some text some text some text some some some text some text some text some text some text some text some text some some text some text some text some text some text some text some text some some text some text some text some text some text some text some text some some text some text some text some text some text some text some text some some text some text some text some text some text some text some text some

 Right Image
some text some text some text some text some some text some text some text some text some text some text some text some some text some text some text some text some text some text some text some some text some text some text some text some text some text some text some some some text some text some text some text some text some text some text some some text some text some text some text some text some text some text some some text some text some text some text some text some text some text some some some text some text some text some text some text some text some text some some text some text some text some text some text some text some text some some text some text some text some text some text some text some text some

#### Inline images

 some some text some text some text some text some text some text some text some some text some text some text some text some text some text some text some some text some. An inline image: text some text some text some text some text some text some some some text some text some text some text some text some text some text some some text some text some text some text some text some text some text some some text some text some text some text some text some text some text some

#### Centered image

##### Variant Two
 Figure 1

## Itemized lists

### Ordered lists

  1. Select Open under the FILE menu. \br or \br click the Open button on the MAIN Toolbar. 2. The standard Windows OPEN dialog box will appear, see Figure 3. 3. Designate the appropriate folder in the Look In field. See 3 in Figure 4. 2. Type the file name in the File Name field and click Open. See 4A in Figure 5. \br or \br Double click on the desired document file. See 4B in Figure 6. 2. The designated document will open with structures displayed. See Figure 9. 
 Appears as:
 Select Open under the FILE menu. or click the Open button on the MAIN Toolbar. The standard Windows OPEN dialog box will appear, see Figure 3. Designate the appropriate folder in the Look In field. See 3 in Figure 4. Type the file name in the File Name field and click Open. See 4A in Figure 5. or Double click on the desired document file. See 4B in Figure 6. The designated document will open with structures displayed. See Figure 9.

### Unordered lists

  * Number of rows and columns displayed in the grid is selected by increasing or decreasing the numbers in the Rows (1 in Figure 1) and Cols (2 in Figure 1) fields. * Background color for the unselected (Background, 3 in Figure 2) and selected (Selected Background, 4 in Figure 4) structures can be set. See below. * The grid cell style (Normal, Raised, or Sunken) can be selected (5 in Figure 6). * The \b{border thickness} can be selected (6 in Figure 8). 
 Appears as: Number of rows and columns displayed in the grid is selected by increasing or decreasing the numbers in the Rows (1 in Figure 1) and Cols (2 in Figure 1) fields. Background color for the unselected (Background, 3 in Figure 2) and selected (Selected Background, 4 in Figure 4) structures can be set. See below. The grid cell style (Normal, Raised, or Sunken) can be selected (5 in Figure 6). The border thickness can be selected (6 in Figure 8).

### Mixed and Nested lists

  1. Number of rows and columns displayed in the grid is selected by increasing or decreasing the numbers in the Rows (1 in Figure 1) and Cols (2 in Figure 1) fields. * The Browser Window * Open Collections and Libraries * View Collections and Libraries 1. Background color for the unselected (Background, 3 in Figure 2) and selected (Selected Background, 4 in Figure 4) structures can be set. See below. * Edit Collections and Libraries * Create Zero Based Index (ZBI) files * Create New Collections * Summary of Mouse and Keyboard Commands 1. The grid cell style (Normal, Raised, or Sunken) can be selected (5 in Figure 6). 1. The \b{border thickness} can be selected (6 in Figure 8). 
 Appears as: Number of rows and columns displayed in the grid is selected by increasing or decreasing the numbers in the Rows (1 in Figure 1) and Cols (2 in Figure 1) fields. The Browser Window Open Collections and Libraries View Collections and Libraries Background color for the unselected (Background, 3 in Figure 2) and selected (Selected Background, 4 in Figure 4) structures can be set. See below. Edit Collections and Libraries Create Zero Based Index (ZBI) files Create New Collections Summary of Mouse and Keyboard Commands The grid cell style (Normal, Raised, or Sunken) can be selected (5 in Figure 6). The border thickness can be selected (6 in Figure 8).
  * kbool algebra * Re: kbool algebra * Re: kbool algebra * Re: kbool algebra * Re: kbool algebra * Re: kbool algebra * Re: kbool algebra * Re: kbool algebra * Re: kbool algebra [OT] * Re: kbool algebra * New "coolstuff" - perspective transformations * Re: New "coolstuff" - perspective transformations * Re: New "coolstuff" - perspective transformations * Re: New "coolstuff" - perspective transformations * Help, looking for Matrix functions~! * Re: Help, looking for Matrix functions~! * Problem of low level languages * another way * So much for so little.. [nt] * Re: So much for so little.. [nt] * Did I miss something? * Re: Did I miss something? * Re: Did I miss something? 
 Appears as: kbool algebra Re: kbool algebra Re: kbool algebra Re: kbool algebra Re: kbool algebra Re: kbool algebra Re: kbool algebra Re: kbool algebra Re: kbool algebra [OT] Re: kbool algebra New "coolstuff" - perspective transformations Re: New "coolstuff" - perspective transformations Re: New "coolstuff" - perspective transformations Re: New "coolstuff" - perspective transformations Help, looking for Matrix functions~! Re: Help, looking for Matrix functions~! Problem of low level languages another way So much for so little.. [nt] Re: So much for so little.. [nt] Did I miss something? Re: Did I miss something? Re: Did I miss something?