The overall structure of the pipeline I know is roughly divided:
1) basic definition (config, basics ....);
2) basic operations and types (mainly for internal use of math, math_stroke, dda_line, color, rendering_buffer, ect .);
3) conversion (agg_conv_s...) is mainly used to implement some transformation and type conversion operations.
4) font_xx );
5) spans generate scanned lines and colors based on the contour
6) Draw related (renderer_xx) Draw call, interact with the corresponding memory, generate the graphic area to be displayed (can be considered as a continuous memory area)
7) rasterizers raster related files and use the corresponding scanline to complete the stored coordinate information and corresponding commands to the memory block.
On the ghost website, you only need to add the corresponding header file and CPP file to the project as your own file for compilation. However, many people who are just using idea do not understand the functions andCodeStructure, so that only the provided sample can be run. Pipeline Works well across platforms through generics and can be directly compiled in many development environments. We can directly compile it into a static Link Library in vc6, and then all. the H file is written into vc98 \ include \ scripts and compiled. the LIB file is written into vc98 \ Lib. In this way, we may load the compiled file in vc6 through link-> input of ALT + F7. when the Lib file is used to configure the keystore, you can create a CPP file directly # include <alias/agg_basics.h> .... then there is an implementation that inherits agg_platform_support and agg_main to complete a corresponding framework.
In order to make a progress report, I made the work of the previous stage easier, so I drew a few figures, so I can only use my memory to restore it.
Rendering Buffer (frame buffer, which can be understood as a video memory) stores a contiguous memory area. It does not know the structure of its specific storage content. It only provides row pointers Based on the row length, it has the attributes of width, height, and step size.
SPAN render horizontal segment painter, used to draw segments in scanline and directly interact with Rendering Buffer to map scanline content to the video memory.
Outline contour, which converts vector data into internal class of Rasterizer in dot matrix format. Scanline converts the dot matrix set into the horizontal section used by Renderer.
Renderer colors the dot matrix data into the video memory.
Rasterizer raster, used to convert vector data from the upper layer to the raster set.
Vector transitions vector changes. A complex set corresponds to n-plus convs operations on the point set.
Today, I suddenly think of an example to introduce the relationship between the operator, Rasterizer, scanline, and Renderer. they are like you holding a book in front of the blackboard, and using chalk to draw a blackboard. the album is Rasterizer, which stores graphics, and the blackboard set (including chalk) is our Renderer, and you are the scanline in the middle. scanline is used to convert the raster information stored in Rasterizer into rendering_buffer on the blackboard using chalk to complete the final drawing. you still need to read the code ~~ :)!!! Good luck