Atozed Forums
numerous TBitmap errors - Printable Version

+- Atozed Forums (https://www.atozed.com/forums)
+-- Forum: Atozed Software Products (https://www.atozed.com/forums/forum-1.html)
+--- Forum: IntraWeb (https://www.atozed.com/forums/forum-3.html)
+---- Forum: English (https://www.atozed.com/forums/forum-16.html)
+----- Forum: IntraWeb General Discussion (https://www.atozed.com/forums/forum-4.html)
+----- Thread: numerous TBitmap errors (/thread-1410.html)



numerous TBitmap errors - MrSpock - 12-02-2019

My desktop app works OK, but when I tried to move the code to intraweb I got many errors, "unknown identifiers"
"canvas has no brush class"

starting from
napis.PixelFormat:= pf24bit; "property is read only"

intraweb 15.1.5 delphi xe7

uses
FMX.graphics;

var
napis:= TBitmap;

napis:= TBitmap.Create;
napis.PixelFormat:= pf24bit;
napis.Canvas.Brush.Color := RGB(50,50,50);
napis.Canvas.Brush.Style := bsSolid;
napis.Width:= zdjęcie.Width;
napis.Height:= zdjęcie.Height;
napis.Canvas.FillRect(Rect(0,0,napis.width-1,napis.height-1));
napis.Canvas.Font.Quality:= fqAntialiased;
napis.Canvas.Font.Size:=68;
napis.Canvas.Font.Name:='Microsoft Sans Serif';


RE: numerous TBitmap errors - MrSpock - 12-02-2019

[quote pid='4685' dateline='1575293764']
So the order of declarations matters.

I have
uses
Classes, SysUtils, Vcl.Graphics, Vcl.Controls, IWAppForm, IWApplication, IWColor,
  IWTypes, IWCompButton, IWCompRadioButton, IWCompExtCtrls,  IWVCLBaseControl,
  IWBaseControl, IWBaseHTMLControl, IWControl, IWCompEdit, IWHTMLControls;

and it has turned out that
Winapi.Windows, //for TRGBTriple and scanline
FMX.graphics, //for TBitmap;
has to be put at the beggining of the "uses" part, and now it all works only pretty slowly, comparing with the desktop app with the same code.

[/quote]


RE: numerous TBitmap errors - Alexandre Machado - 12-03-2019

FMX.Graphics shouldn't be included in IntraWeb applications. IntraWeb uses VCL, not FMX framework.