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
 Color
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

M.Schlegel

Germany
13 Posts

Posted - Aug 05 2018 :  10:14:05  Show Profile  Reply
Hello Team Imageen,
i use delphi 7 with imageen 8.01.
on a form i have a ImageEnDBVect1. How can i change the seltion Color in green?

Thanks for help
Matthias Schlegel

w2m

USA
1990 Posts

Posted - Aug 05 2018 :  11:37:30  Show Profile  Reply
e way is to use the ImageEnViewDrawLayerBox event
procedure TForm1.ImageEnViewDrawLayerBox(Sender: TObject; ACanvas: TCanvas;
  LayerIndex: Integer);
begin
  with ACanvas do
  begin
    Pen.Style := psSolid;
    Pen.Width := 2;
    Pen.mode := pmCopy;
    Pen.Color := clGreen;
    Brush.Style := bsClear;
    with TIELayer(ImageEnView.Layers[LayerIndex]).ClientAreaBox do
      Rectangle(Left-1, Top-1, Right+1, Bottom+1);
  end;
end;

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
Go to Top of Page

M.Schlegel

Germany
13 Posts

Posted - Aug 06 2018 :  03:51:37  Show Profile  Reply
Hello Bill,
thank's for the answer.
My code is now:

procedure TView_Bilder.ImageEnDBVect1DrawLayerBox(Sender: TObject;
  ACanvas: TCanvas; LayerIndex: Integer);
begin
  with ACanvas do
  begin
    Pen.Style := psSolid;
    Pen.Width := 2;
    Pen.mode := pmCopy;
    Pen.Color := clGreen;
    Brush.Style := bsClear;
    with TIELayer(ImageEnDBVect1.Layers[LayerIndex]).ClientAreaBox do
      Rectangle(Left-1, Top-1, Right+1, Bottom+1);
  end;
end;


there is a error message: Undefinierter Bezeichner: 'TIELayer'

Thank's for help
Matthias Schlegel
Go to Top of Page

w2m

USA
1990 Posts

Posted - Aug 06 2018 :  13:42:35  Show Profile  Reply
Add iexLayer to uses. Also to set selection (rubber banding) use SelColor1 and SelColor2 set the two colors of the animated selection polygon.


Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: