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
 Paint Annotations on an ImageenView

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
john_siggy@yahoo.com Posted - Nov 16 2017 : 11:32:21
I am trying to paint rectangular annotations from an ImageEnVect to an ImageEnView. Location and Size of the rectangles is wrong. Thanks in advance.


Code:



Mult := ImageEnView1.Bitmap.Height / ImageEnVect2.Bitmap.Height; {wrong}
for i := 0 to ImageEnVect2.ObjectsCount - 1 do
begin
with ImageEnView1.GetCanvas do
begin
Pen.Color := Colors[1];
Pen.Width := 2;
Brush.Style := bsClear;
Rectangle(
Round(ImageEnVect2.ObjLeft[i] * Mult),
Round(ImageEnVect2.ObjTop[i] * Mult),
Round(ImageEnVect2.ObjRight[i] * Mult),
Round(ImageEnVect2.ObjBottom[i] * Mult))
end;
end;
1   L A T E S T    R E P L I E S    (Newest First)
john_siggy@yahoo.com Posted - Nov 16 2017 : 14:51:43
Found the answer:
Rectangle(
ImageEnView1.Xbmp2Scr(ImageEnVect1.ObjLeft[i]),
ImageEnView1.Ybmp2Scr(ImageEnVect1.ObjTop[i]),
ImageEnView1.Xbmp2Scr(ImageEnVect1.ObjRight[i]),
ImageEnView1.Ybmp2Scr(ImageEnVect1.ObjBottom[i]));
);