Dear community,
I am rather new with BGRAbitmap, but not with programming at all - using Delphi since 1.0
I want to draw a filled rectangle or ellipse with a gradient fill, e.g. from the lightblue topleft corner to a darkblue right bottom corner. I went through the tutorial within the Lazarus wiki, and tried some other ressources, but I didn't get satisfying results. The image attached shows what I do like to achieve.
I found in some source code this:
grad := TBGRAGradientScanner.Create(BGRA(255,255,0),BGRA(255,0,0),gtLinear,PointF(0,0),PointF(400, 200),True,True);
and used it in:
aBMP.DrawPolygonAntialias(pxls, grad, 5);
But this draws only the outline in different colours, without any infill. And I cannot find any DrawPolygon where I can pas a second (or the same) grad for the background colour.
Is there anyone who can help here or can give me source code sniplet? Thank you very much!
Kind regards,
Sir Twist