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
 IEView: Select, Change Colours
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

andyhill

Australia
133 Posts

Posted - Aug 24 2022 :  17:31:20  Show Profile  Reply
I want to build a select in code and then change matching Colours from --> To, please advise - thanks

ImageEnView1.EndSelect();

// R:192 G:189 B:156
TIEPolylineLayer(ImageEnView1.CurrentLayer).IsMask:= True;
iMinRed:= 190;
iMaxRed:= 194;
iMinGreen:= 187;
iMaxGreen:= 191;
iMinBlue:= 154;
iMaxBlue:= 158;
iMinColor:= RGB(iMinRed, iMinGreen, iMinBlue);
iMaxColor:= RGB(iMaxRed, iMaxGreen, iMaxBlue);
iMinRGB:= TColor2TRGB(iMinColor);
iMaxRGB:= TColor2TRGB(iMaxColor);
//
ImageEnView1.SelectColors(TColor2TRGB(iMinColor), TColor2TRGB(iMaxColor));
//
ImageEnView1.SetSelectedAreaAlpha(0);
ImageEnView1.Update;



Andy

andyhill

Australia
133 Posts

Posted - Aug 24 2022 :  17:44:45  Show Profile  Reply
All Good :)

// R:192 G:189 B:156
TIEPolylineLayer(ImageEnView1.CurrentLayer).IsMask:= True;
iMinRed:= 190;
iMaxRed:= 194;
iMinGreen:= 187;
iMaxGreen:= 191;
iMinBlue:= 154;
iMaxBlue:= 158;
iMinColor:= RGB(iMinRed, iMinGreen, iMinBlue);
iMaxColor:= RGB(iMaxRed, iMaxGreen, iMaxBlue);
iMinRGB:= TColor2TRGB(iMinColor);
iMaxRGB:= TColor2TRGB(iMaxColor);
ImageEnView1.Proc.CastColorRange(iMinColor, iMaxColor, clRed);

Andy
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: