New version of BGRABitmap (7.1) with :
- Phong lighting vertical position fix
- compilation fix for blur for 32-bit
- TBGRAVectorizedFontRenderer : MaxFontResolution property -> you can use quadratic bezier approximation instead of full vectorization
- TBGRAPolygonalGlyph : Closed and MinimumDotProduct properties -> useful for easy bezier (see below)
- added ComputeEasyBezier in BGRATypeWriter unit -> simply define a polygon and it will be rounded using bezier curves when the dot product is above some value (which means it is not too much of an angle)
- BGRACanvas2D : added CurrentPath property -> you can get the points computed for the current path
- TBGRABitmap : InplaceGrayscale and grayscale task -> so you don't need to allocate a new bitmap to apply grayscale
How to use Easy Bezier :
uses BGRABitmap, BGRABitmapTypes, BGRATypewriter;
procedure TForm1.FormPaint(Sender: TObject);
var bmp: TBGRABitmap;
begin
bmp := TBGRABitmap.Create(ClientWidth,ClientHeight,ColorToRGB(clBtnFace));
bmp.DrawPolygonAntialias(ComputeEasyBezier(
[PointF(10,10), PointF(50,10),PointF(90,50),PointF(90,100),PointF(20,100)],
True, 0.5), BGRABlack, 5);
bmp.Draw(Canvas,0,0);
bmp.Free;
end;