In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
1 Source Code Directory 1) examples
The greatest reference value, the author in the AGG library under the example directory, to create a lot of win32 test cases, the creation of a project using VC6.0, currently using VS2005, can easily import the project. Beginners can use it easily. Go to the agg\ examples\ win32_api directory, click example.dsw, allow the project to be imported, and OK. Then we will analyze the application of each example in detail.
2) font_freetype
??
3) font_win32_tt
??
4) gps
Polygon set algorithm, after the analysis of one or two!
5) include
This is a very important folder, which contains three folders and a pile of header files: ctrl,platform (the author encapsulates the function of the system here, provides a simple way to test AGG), util. Most of the header files are complete declarations and implementations of containing classes, which are limited by the definition of module classes.
6) src
The source files in this directory include vcgen,trans, etc., but there is also platform.
Folders such as util, which corresponds to the implementation files for each platform.
2 frame code analysis
Rendering buffer (frame buffer we can understand as video memory) stores a continuous memory area, does not know the structure of its own specific storage content, and only provides line pointers to the outside according to the length of the row, with width, height and step size attributes.
Spanrender horizontal section plotter, which is used to draw segments in scanline, interact directly with renderingbuffer, and map the contents of scanline to video memory.
Outline contours, the vector data into the lattice format rasterizer inner class.
Scanline converts a collection of points in lattice format into horizontal sections used by renderer.
Renderer fills the dot matrix data with color and puts it into the video memory.
Rasterizer gridder, which is used to convert the upper vector data into the grid collection.
The Vectortransitions vector changes, and a complex set corresponds to the operation of n multi-convs point sets.
For example, introduce a set of relationships in AGG, rasterizer,scanline, and renderer. They are like you holding a book in front of the blackboard and drawing the blackboard newspaper with chalk. The picture book is rasterizer, he stores graphics, the blackboard set (including chalk) is our renderer, and you are the scanline in the middle. In AGG, the raster information stored in rasterizer is transformed into blackboard rendering_buffer by chalk pixfmt_renderer through scanline to complete the final drawing.
Variable definition: float or double type
In fact, this comes from the handling of the float and double types by CCompact +. If you define a function like this:
Void foo (float x, float y), the parameter values passed are always of type double. In addition, in matrix transformation, the use of double type is the most reasonable, because the use of float type, can only display 7 to 10 decimal places, the accuracy of the calculation error is difficult to avoid. So it's a natural choice to use the double type for CCompact +.
Whenever there are exceptions, I am quite in favor of using the float type in vertex sources, such as agg::path_storage, and other converters save a large number of vertex arrays (agg::conv_stroke). Cross-use of double and float types can complicate the problem.
V is the abbreviation of vertex and g is the abbreviation of generator.
1 agg_vcgen_xxxx
History from agg_gen_xxxx to agg_cgen_xxxx to agg_vcgen_xxxx
"vcgen" is the abbreviation of "VertexaccCumulating Generators".
2 agg_vpgen_xxxxx
"vpgen" is the abbreviation of "Vertex Pass-through Generator".
3 other names
Affine_matrix à trans_affine
Viewport à trans_viewport
4 Mail record
I also would like to rename some classesand files, particulary agg_gen_xxxx to
Agg_cgen_xxxx (where 'c' refers to "Cumulating" generators), there're also will
Be agg_pgen_xxxxx refering to "Pass-through" generators. First ones acculumate
Vertices of the whole contour (not path) before generating the path, the last
Ones are fed with vertices and then askedto produce some other vertices on
Demand. A typical example of thePass-through generator is Liang-Barski polygon
Clipper.
Also, for the sake of consistency I'd liketo rename affine_matrix to
Trans_affine, because there are trans_perspective,trans_bilinear, and
Trans_warp_magnifier.
>
> > Or just:
> >
> > agg::rasterizer_fill
> > agg::rasterizer_fill_aa
> > agg::rasterizer_line
> > agg::rasterizer_line_aa
> >
> > It's shorter but maybe a bit less clear.
>
> If you want to fit the PostScript naming, maybe you could use:
>
> agg::rasterizer_fill...
> agg::rasterizer_stroke...
I like these also.
>
> > So, what is your vote: solid/outline, scanline/outline
> > of fill/line?
>
My preference in order would be:
1) rasterizer_fill/stroke
2) rasterizer_fill/line
Rendering buffer (frame buffer we can understand as video memory) stores a continuous area of memory without knowing its own specific storage.
The structure of the content, which provides a row pointer only according to the length of the line, has width, height, and step size attributes.
Spanrender horizontal section painter, which is used to draw segments in scanline, interact directly with rendering buffer, and transform the inner parts of scanline
Capacity is mapped to video memory.
Outline contours, the vector data into the lattice format rasterizer inner class.
Scanline converts a collection of points in lattice format into horizontal sections used by renderer.
Renderer fills the dot matrix data with color and puts it into the video memory.
Rasterizer gridder, which is used to convert the upper vector data into the grid collection.
The Vectortransitions vector changes, and a complex set corresponds to the operation of n multi-convs point sets.
Cw (clockwise): clockwise
Ccw (counter-clockwise): counterclockwise
Flip_y flips the y-axis, which comes from the direction of some operating systems for rendering cached y-axis coordinates (windows,BeOS system)
6)
Premultiplied pre means in advance, and multiply means multiplication, which literally means pre-multiplication, referred to as pre-multiplication, for some pictures, although the value of the alpha channel is provided, all the RGB components have been multiplied by the alpha channel, so that the superimposed display of the picture (technical term is mixing) can be carried out, reducing a process.
Previously color = alpha*A+ (1-alpha) * B
Now color = A * (1-alpha) * B
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.