Difference between revisions of "BGRABitmap tutorial"
(→Run the program: screenshot) |
(→More: wiki pasdoc) |
||
(15 intermediate revisions by 8 users not shown) | |||
Line 1: | Line 1: | ||
{{BGRABitmap_tutorial}} | {{BGRABitmap_tutorial}} | ||
− | + | {{BGRABitmap_tutorial_index}} | |
− | + | Welcome to the index of the tutorials for the [[BGRABitmap|BGRABitmap]] library. You can browse tutorials by number with the bar on the top, or by the following categories: | |
− | + | === Install BGRABitmap and draw basic shapes === | |
− | + | TBGRABitmap images have drawing functions using floating point coordinates or integer coordinates. | |
− | |||
− | + | * [[BGRABitmap tutorial 1|Installing BGRABitmap (No. 1)]] | |
+ | * [[BGRABitmap tutorial 2|Loading and displaying an image (No. 2)]] | ||
+ | * [[BGRABitmap tutorial 3|Drawing with the mouse (No. 3)]] | ||
+ | * [[BGRABitmap tutorial 6|Line styles (No. 6)]] | ||
+ | * [[BGRABitmap tutorial 7|Splines and Bézier curves (No. 7)]] | ||
+ | * [[BGRABitmap tutorial 12|Text functions (No. 12)]] | ||
+ | * [[BGRABitmap tutorial 13|Integer coordinates and floating point coordinates (No. 13)]] | ||
− | + | === Textures and scanners === | |
− | + | Pixels are a table in memory containing values in the TBGRAPixel format. At this level, we can do various operations: | |
− | |||
− | + | * [[BGRABitmap tutorial 4|Direct pixel access with Scanline (No. 4)]] | |
+ | * [[BGRABitmap tutorial 5|Combining layers of pixels (No. 5)]] | ||
+ | * [[BGRABitmap tutorial 8|Generating textures (No. 8)]] | ||
+ | * [[BGRABitmap tutorial 9|Phong shading using textures (No. 9)]] | ||
+ | * [[BGRABitmap tutorial 10|Texture mapping (No. 10)]] | ||
+ | * [[BGRABitmap tutorial 11|Using scanners to combine transformations (No. 11)]] | ||
− | + | === Other drawing contexts === | |
− | + | It is possible to have other contexts, that provide/allow other basic drawing functions: | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | * Standard Canvas (Canvas and CanvasOpacity properties) : avoid using it because of the slowness of conversions of bitmap data | |
− | + | * Canvas with features brought by BGRABitmap (CanvasBGRA property, Brush and Pen have an Opacity property) | |
+ | ** [http://www.youtube.com/watch?v=HGYSLgtYx-U How to convert your application from TCanvas to CanvasBGRA (video)] | ||
+ | * [[BGRABitmap tutorial 14|Drawing with a 2D canvas with affine transformations (No. 14)]] | ||
+ | * [[BGRABitmap tutorial 15|Real 3D rendering (No. 15)]] | ||
+ | * [[BGRABitmap tutorial 16|Using textures with 3D rendering (No. 16)]] | ||
− | + | === More === | |
− | + | You can use BGRABitmap to [[BGRABitmap_tutorial_TAChart|improve TAChart rendering]]. | |
− | |||
− | + | You can use it as well to display icons with the [[SVG_Image_List|SVG Image List]]. | |
− | + | More classes are available (you need to create them when you need them): | |
− | + | * [https://bgrabitmap.github.io/doc/BGRATextFX.TBGRATextEffect.html TBGRATextEffect], in unit BGRATextFX, allows to prepare the drawing of text line, to add effects like contour and shadow. | |
+ | * [https://bgrabitmap.github.io/doc/BGRALayers.TBGRALayeredBitmap.html TBGRALayeredBitmap], in unit BGRALayers, allow to create a multi-layered bitmap. Units [https://bgrabitmap.github.io/doc/BGRAPaintNet.TPaintDotNetFile.html BGRAPaintNet] and [https://bgrabitmap.github.io/doc/BGRAOpenRaster.html BGRAOpenRaster] contain implementations to read and write in Paint.NET format (read only) and OpenRaster format (read and write). | ||
+ | * Units [https://bgrabitmap.github.io/doc/BGRAGradientScanner.html BGRAGradientScanner] and [https://bgrabitmap.github.io/doc/BGRATransform.html BGRATransform] contain scanners to do various effects. | ||
+ | * Unit [https://bgrabitmap.github.io/doc/BGRAGradients.html BGRAGradients] contain procedures to generate gradients and TPhongShading class for Phong shading. | ||
+ | * [https://bgrabitmap.github.io/doc/BGRACompressableBitmap.html TBGRACompressableBitmap], in unit BGRACompressableBitmap, allow to store and compress images. | ||
− | + | See [https://bgrabitmap.github.io/doc/AllUnits.html list of all units]. | |
− | + | Some units contient low level functions, and you should not need to use them for a normal usage. | |
− | + | [[Category:Graphics]] | |
− | + | [[Category:Tutorials]] | |
− | + | [[Category:BGRABitmap]] | |
− | + | [[Category:Lazarus]] | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | [[ | ||
− | |||
− | [[ |
Latest revision as of 09:13, 3 April 2024
│
Deutsch (de) │
English (en) │
español (es) │
français (fr) │
русский (ru) │
Home | Tutorial 1 | Tutorial 2 | Tutorial 3 | Tutorial 4 | Tutorial 5 | Tutorial 6 | Tutorial 7 | Tutorial 8 | Tutorial 9 | Tutorial 10 | Tutorial 11 | Tutorial 12 | Tutorial 13 | Tutorial 14 | Tutorial 15 | Tutorial 16 | Edit
Welcome to the index of the tutorials for the BGRABitmap library. You can browse tutorials by number with the bar on the top, or by the following categories:
Install BGRABitmap and draw basic shapes
TBGRABitmap images have drawing functions using floating point coordinates or integer coordinates.
- Installing BGRABitmap (No. 1)
- Loading and displaying an image (No. 2)
- Drawing with the mouse (No. 3)
- Line styles (No. 6)
- Splines and Bézier curves (No. 7)
- Text functions (No. 12)
- Integer coordinates and floating point coordinates (No. 13)
Textures and scanners
Pixels are a table in memory containing values in the TBGRAPixel format. At this level, we can do various operations:
- Direct pixel access with Scanline (No. 4)
- Combining layers of pixels (No. 5)
- Generating textures (No. 8)
- Phong shading using textures (No. 9)
- Texture mapping (No. 10)
- Using scanners to combine transformations (No. 11)
Other drawing contexts
It is possible to have other contexts, that provide/allow other basic drawing functions:
- Standard Canvas (Canvas and CanvasOpacity properties) : avoid using it because of the slowness of conversions of bitmap data
- Canvas with features brought by BGRABitmap (CanvasBGRA property, Brush and Pen have an Opacity property)
- Drawing with a 2D canvas with affine transformations (No. 14)
- Real 3D rendering (No. 15)
- Using textures with 3D rendering (No. 16)
More
You can use BGRABitmap to improve TAChart rendering.
You can use it as well to display icons with the SVG Image List.
More classes are available (you need to create them when you need them):
- TBGRATextEffect, in unit BGRATextFX, allows to prepare the drawing of text line, to add effects like contour and shadow.
- TBGRALayeredBitmap, in unit BGRALayers, allow to create a multi-layered bitmap. Units BGRAPaintNet and BGRAOpenRaster contain implementations to read and write in Paint.NET format (read only) and OpenRaster format (read and write).
- Units BGRAGradientScanner and BGRATransform contain scanners to do various effects.
- Unit BGRAGradients contain procedures to generate gradients and TPhongShading class for Phong shading.
- TBGRACompressableBitmap, in unit BGRACompressableBitmap, allow to store and compress images.
See list of all units.
Some units contient low level functions, and you should not need to use them for a normal usage.