ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Legacy Apps now failing because of updates - help
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

andyhill

Australia
68 Posts

Posted - Jul 06 2021 :  17:50:14  Show Profile  Reply

//ie.IEBitmap.Allocate(w, h, clWhite, 255);
ie.IEBitmap.Allocate(w, h, ie24RGB); NOW ?


// Draw Rectangle
with ie.IEBitmap.IECanvas do begin
AV everywhere with Pen access ???
Pen.Width:= 5;
Pen.Style:= psSolid;
Pen.Mode:= pmCopy;
Pen.Color:= clGreen;
Brush.Style:= bsClear;
Rectangle(1, 1, w-1, h-1);
end;
// Refresh view
ie.Update();


Andy

xequte

6248 Posts

Posted - Jul 06 2021 :  22:24:11  Show Profile  Reply
Hi Andy

I added the following code to a blank form with a TImageEnView and it worked without error:

procedure Tfmain.Button1Click(Sender: TObject);
const
  w = 500;
  h = 500;
var
  ie: TImageEnView;
begin
  ie := ImageEnView1;

  ie.IEBitmap.Allocate(w, h, ie24RGB);

  // Draw Rectangle
  with ie.IEBitmap.IECanvas do
  begin
    Pen.Width:= 5;
    Pen.Style:= psSolid;
    Pen.Mode:= pmCopy;
    Pen.Color:= clGreen;
    Brush.Style:= bsClear;
    Rectangle(1, 1, w-1, h-1);
  end;
  // Refresh view
  ie.Update();


What version of Delphi are you using? Is ie.LegacyBitmap set to false?



Nigel
Xequte Software
www.imageen.com
Go to Top of Page

andyhill

Australia
68 Posts

Posted - Jul 06 2021 :  23:33:01  Show Profile  Reply
I have hundreds of applications that are now taken out by the update.

ie:= TImageEnView.Create(nil); // LegacyBitmap = FALSE by default !

ie.LegacyBitmap:= True;


Andy
Go to Top of Page

xequte

6248 Posts

Posted - Jul 07 2021 :  18:06:23  Show Profile  Reply
Hi Andy

Sorry, I still don't see why that would cause an error. Setting LegacyBitmap to true or false should have no effect because you don't use TImageEnView.Bitmap.

Can you send me a small project that shows the error?

Nigel
Xequte Software
www.imageen.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: