Recent

Author Topic: TBGRACanvas2D question from tutorial page 14  (Read 291 times)

Adri

  • New Member
  • *
  • Posts: 21
TBGRACanvas2D question from tutorial page 14
« on: September 03, 2020, 11:11:35 pm »
Hello all,

When using the example from tutorial 14 (https://wiki.freepascal.org/BGRABitmap_tutorial_14) I stumble upon an error. When compiling the IDE mentiones an error [Identifier not found "TGBRACanvas2D"] regarding line 3 of the first, simple example where 'ctx: TBGRACanvas2D;' has been declared as a variable. (BGRABitmap and BGRABitmapTypes are both mentioned under the 'uses' declarations).
When I remove this variable and replace every instance of 'ctx' with 'bmp.Canvas2' this first example does compile and run, but then I get into problems with the second, 'complex shapes' example and the third regarding 'translations' off course too.
Is anybody able to shed some light on this behavior? Is it a setting in my IDE which understands that 'ctx' translates into 'bmp.Canvas2D'?     :(   I cannot imagine / do not expect these examples are wrong in any way.
Many thanks for a reaction.
« Last Edit: September 03, 2020, 11:17:52 pm by Adri »

winni

  • Hero Member
  • *****
  • Posts: 2000
Re: TBGRACanvas2D question from tutorial page 14
« Reply #1 on: September 03, 2020, 11:20:13 pm »
Hi!

You forgot:

Code: Pascal  [Select][+][-]
  1. uses ........,BGRACanvas2D;

Winni


PS:  BGRA graphics has its own board in this forum:
https://forum.lazarus.freepascal.org/index.php/board,46.0.html
« Last Edit: September 03, 2020, 11:25:41 pm by winni »

Adri

  • New Member
  • *
  • Posts: 21
Re: TBGRACanvas2D question from tutorial page 14
« Reply #2 on: September 04, 2020, 05:46:39 pm »
Winni: thanks, it works now!      :D

 

TinyPortal © 2005-2018