Sign in Join
Wiki copytemporary

BGRABitmap AggPas: what changed

Revision 0 to 1. Removed lines have a minus sign; added lines have a plus sign.

Title: BGRABitmap AggPas

OldNewLine
1+Here is a series of projects demonstrating advanced capabilities in [[BGRABitmap]] similar to [AggPas](http://www.crossgl.com/aggpas/)
2+
3+The projects are in the <b>bgraaggtest</b> folder in [BGRABitmap repository](https://github.com/bgrabitmap/bgrabitmap/tree/master/test/bgraaggtest)
4+
5+### Antialiasing demo (AA demo)
6+
7+This program shows how the gamma factor affects how antialiasing is rendered.
8+
9+<figure>
10+<img src="aa_demo.png" title="aa_demo.png" width="400" />
11+<figcaption>aa_demo.png</figcaption>
12+</figure>
13+
14+### Alpha gradient
15+
16+This program shows how to apply a complex alpha mask based on a custom gradient. See [[BGRABitmap tutorial 11|Tutorial 11]] on how to create a custom scanner.
17+
18+<figure>
19+<img src="alpha_gradient.png" title="alpha_gradient.png" width="400" />
20+<figcaption>alpha_gradient.png</figcaption>
21+</figure>
22+
23+### Blur
24+
25+This program shows the different types of blurs and their speed.
26+
27+<figure>
28+<img src="blur.png" title="blur.png" width="400" />
29+<figcaption>blur.png</figcaption>
30+</figure>
31+
32+### Bézier like splines (B-spline)
33+
34+This program to demonstrate various kind of spline interpolations and how to use a path cursor.
35+
36+<figure>
37+<img src="bspline.png" title="bspline.png" width="400" />
38+<figcaption>bspline.png</figcaption>
39+</figure>
40+
41+The TBGRAPath objet takes a series of instructions to draw a path in a similar way as with HTML canvas. To define a polygon, you can call `moveTo(x,y)` to define the first point, and then `lineTo(x,y)` for each subsequent point. Finally you can call `closePath` to end the polygon.
42+
43+Once the path is created, you can draw it and fill it, either using its `stroke` and `fill` functions, or by calling `TBGRABitmap.DrawPath` or `FillPath` functions.
44+
45+Do draw a symbol along the path, you can use `TBGRAPath.CreateCursor` function to create a cursor. The cursor has `MoveForward` and `MoveBackward` for example to move along the path. They return the actual moved length, which will be 0 when the end of the path has been reached.
46+
47+The `CurrentCoordinate` property contains the current position and the `CurrentTangent` contains a unit vector to align the shape.
48+
49+### Distortions
50+
51+This program shows how to apply a distortion to an image or a gradient.
52+
53+<figure>
54+<img src="distortions.png" title="distortions.png" width="400" />
55+<figcaption>distortions.png</figcaption>
56+</figure>
57+
58+### Gouraud shading
59+
60+This program demonstrates how to do a multi-polygon Gouraud shading.
61+
62+<figure>
63+<img src="gouraud.png" title="gouraud.png" width="400" />
64+<figcaption>gouraud.png</figcaption>
65+</figure>
66+
67+### Image filters 2
68+
69+This program shows the various interpolation filters that can be used when resampling.
70+
71+<figure>
72+<img src="image_filters2.png" title="image_filters2.png" width="400" />
73+<figcaption>image_filters2.png</figcaption>
74+</figure>
75+
76+### Image perspective
77+
78+This program demonstrates the different ways of applying a texture to a quad.
79+
80+<figure>
81+<img src="image_perspective.png" title="image_perspective.png" width="400" />
82+<figcaption>image_perspective.png</figcaption>
83+</figure>
84+
85+---
86+*From the Free Pascal wiki, page "BGRABitmap AggPas", as it stood on 2023-05-21 after a change by Circular, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*

Back to history