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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Curve Cut Out

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
trixy Posted - Mar 18 2020 : 15:57:45
Help me please. I need to implement the Cut Out feature in the form of waves. Tell me, please, how this can be done? I do not know much product ImageEn.
1   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Mar 19 2020 : 19:44:53
Hi

You are best to do this using selections. Please email me for an update that supports curved selections, like the following:

procedure TMainForm.btnCurvedSelectionClick(Sender: TObject);
const
  WAVE_HEIGHT = 0.4; // Wave selection is 40% height of image
  CURVE_COUNT = 6;   // Number of up and down curves
  CURVE_MULT  = 2.4; // How curved is the line? 1=half circle
var
  waveHt, i: Integer;
  waveWidth, curve, endX: Double;
begin
  ImageEnView1.Deselect();
  ImageEnView1.SelectionBase := iesbBitmap;

  waveHt    := Round( ImageEnView1.IEBitmap.Height * WAVE_HEIGHT );
  waveWidth := ImageEnView1.IEBitmap.Width / CURVE_COUNT;

  ImageEnView1.AddSelPoint( 0, 0 );
  ImageEnView1.AddSelPoint( 0, waveHt );

  curve := CURVE_MULT;
  endX := 0;
  for i := 1 to CURVE_COUNT do
  begin
    endX := endX + waveWidth;
    ImageEnView1.AddSelCurve( Round( endX ), waveHt, curve );
    curve := -1 * curve;   // reverse direction of curve
  end;

  ImageEnView1.AddSelPoint( ImageEnView1.IEBitmap.Width, 0 );
  ImageEnView1.EndSelect();
end;



You can then use ImageEnView1.Proc.CropSel(); to remove the selection, or create layers from the selection:

  ImageEnView1.LayersCreateFromSelection();
  ImageEnView1.CurrentLayer.SoftShadow.Enabled := True;


Nigel
Xequte Software
www.imageen.com