[fpc-pascal] Drawing bitmap by pixel
Felipe Monteiro de Carvalho
felipemonteiro.carvalho at gmail.com
Thu Jan 19 18:07:16 CET 2017
On Thu, Jan 19, 2017 at 3:59 PM, Ryan Joseph <ryan at thealchemistguild.com> wrote:
> I used the image canvas before to draw bitmap fonts so I have this code
> working. Is there anyway to set a pixel using TFPImageCanvas?
Use the Colors property, it is fast:
property Colors [x,y:integer] : TFPColor read GetColor write SetColor;
> canvas.Brush.FPColor := colRed; // how do I set the color as an RGB?
Use this function:
function FPColor (r,g,b,a:word) : TFPColor;
fcl-image is from Free Pascal, not from Lazarus, but in
lcl/lazcanvas.pas there is TLazCanvas which extends TFPImageCanvas
adding convenience functions for example for alpha blending among
other stuff.
--
Felipe Monteiro de Carvalho
More information about the fpc-pascal
mailing list