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
 TImageEnVect - insetr any lines

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
jacek.pokropski Posted - Apr 22 2014 : 04:07:10
Hi,

How can I insert a few lines on TImageEnVect but directly from the program code (without the mouse) e.g when you click a button?
All lines are to have a common begin, but end by some angle.





Jacek
4   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Jun 09 2015 : 19:08:19
Hi

Please try the Annotations\Vectorial\Demo.dpr

It allows you to add ellipse objects to an image and resize them using the mouse.


Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
hamidshali Posted - Jun 06 2015 : 05:59:02
hi
i want create one circle on image and i can change shape it with mouse drug
plz help me
jacek.pokropski Posted - Apr 23 2014 : 04:59:27
Thank you

Jacek
w2m Posted - Apr 22 2014 : 11:41:53
procedure TForm1.Button1Click(Sender: TObject);
{ This example paints a black line from the center of the bitmap to various
  specified points in 360 degree circle around the center point. }
var
  i: Integer;
  ihobj: Integer;
begin
  { Add 10 lines }
  for i := 0 to 9 do
    with ImageEnVect1 do
    begin
      ihobj := AddNewObject;
      { Create a line label so we can add text describing the line }
      ObjKind[ihobj] := iekLINELABEL;
      { Make the line black }
      ObjPenColor[ihobj] := clBlack;
      { Set the line height }
      ObjPenWidth[ihobj] := 2;
      ObjPenStyle[ihobj] := psSolid;
      { Set the center point }
      ObjLeft[ihobj] := IEBitmap.Width div 2;
      ObjTop[ihobj] := IEBitmap.Height div 2;
      { Remove the labels border }
      ObjLabelBorder[ihobj] := ielNone;
      { Set the ObjWidth and ObjHeight to position the ending point of the line
        and to set the objects text.  Think of a line being drawn in a TRect,
        where the Rect is TRect(IEBitmap.Width div 2, IEBitmap.Height div 2,
        ObjWidth[ihobj], ObjHeight[ihobj]). To position the end of a line one
        to the left of the center point negative values and to position the
        end of the line to the right of the center point use positive values. }
      if i = 0 then begin
        ObjWidth[ihobj] := 50;
        ObjHeight[ihobj] := -85;
        ObjText[0] := 'Line 1 (50,-85)';
      end
      else if i = 1 then begin
        ObjWidth[ihobj] := -157;
        ObjHeight[ihobj] := 90;
        ObjText[1] := 'Line 2 (-157,90}';
      end
      else if i = 2 then begin
        ObjWidth[ihobj] := -175;
        ObjHeight[ihobj] := -50;
        ObjText[2] := 'Line 3 (-175,-50)';
      end
      else if i = 3 then begin
        ObjWidth[ihobj] := 100;
        ObjHeight[ihobj] := 200;
        ObjText[3] := 'Line 4 (100,200)';
      end
      else if i = 4 then begin
        ObjWidth[ihobj] := -100;
        ObjHeight[ihobj] := -200;
        ObjText[4] := 'Line 5 (-100, -200)';
      end
      else if i = 5 then begin
        ObjWidth[ihobj] := -100;
        ObjHeight[ihobj] := -125;
        ObjText[5] := 'Line 6 (-100,125)';
      end
      else if i = 6 then begin
        ObjWidth[ihobj] := 300;
        ObjHeight[ihobj] := 0;
        ObjText[6] := 'Line 7 (300,0)';
        ObjPenStyle[ihobj] := psDot;
        ObjPenWidth[ihobj] := 3;
      end
      else if i = 7 then begin
        ObjWidth[ihobj] := -300;
        ObjHeight[ihobj] := 0;
        ObjText[7] := 'Line 8 (-300,0)';
        ObjPenStyle[ihobj] := psDot;
        ObjPenWidth[ihobj] := 3;
      end
      else if i = 8 then begin
        ObjWidth[ihobj] := 0;
        ObjHeight[ihobj] := 300;
        ObjText := 'Line 9 (0,300)';
        ObjPenStyle[ihobj] := psDot;
        ObjPenWidth[ihobj] := 3;
      end
      else if i = 9 then begin
        ObjWidth[ihobj] := 0;
        ObjHeight[ihobj] := -300;
        ObjText[9] := 'Line 10 (0, -300)';
        ObjPenStyle[ihobj] := psDot;
        ObjPenWidth[ihobj] := 3;
      end;
    end;

To precisely position the line, change the ObjWidth and ObjHeight values accordingly.



William Miller
Adirondack Software & Graphics
Email: w2m@frontiernet.net
EBook: http://www.imageen.com/ebook/
Apprehend: http://www.frontiernet.net/~w2m/index.html
Custom ImageEn Development